Metero

Creating EAS (Ethereum Agentic Servers), onChain contract +SDK, to create instant MCP servers

Repo
Metero banner

About

Metero — Trust-Minimized Micropayments for MCP / Agentic Services One-liner

Pay AI/agent services directly from your wallet with cryptographic IOUs. No middleman required. Stake once, sign EIP-712 “debits” per call, and providers claim on-chain from escrow—batchable, replay-safe, and gas-efficient.

What it does

Lets users stake USDC and call any registered MCP/agent service.

Each call is authorized by a user-signed EIP-712 IOU (with nonce/epoch/deadline).

Providers receive micropayments from user escrow via a Settlement contract (anyone can relay).

Optional cumulative IOUs (“running tab”): user signs totals; Settlement pays only the delta.

Works peer-to-peer: users connect to providers directly via WebSocket (or through our relayer).

Supports hosted AI agents (text-in/text-out) powered by Gemini as a built-in demo provider.

Why it’s different

Middleman-optional: cryptographic payments + endpoint discovery on-chain; clients can talk straight to providers.

Standardizable: an EAS (Ethereum Agentic Servers) registry behaves like ENS for agents—canonical endpoints + pricing + network pointers.

Provider-friendly: batch settlement, per-delta limits, event-driven unstake alerts; easy webhooks/WS adapters.

User-safe: stake caps, allow-listed tokens, per-call limits, short deadlines, nonces/epochs, and an unstake window.

How it works (flow)

Discover: Client reads EAS to get Settlement/Escrow/USDC addresses, provider WebSocket URL, and service metadata (unit + price).

Quote & Sign: Client computes price, builds a Debit (payer, provider, serviceId, amount, token, nonce, epoch, deadline) and signs EIP-712.

Call:

Direct mode: Client sends {request, debit, signature} over WebSocket to the provider.

Relayer mode: Same payload via our Express API (stores IOUs for the provider).

Verify (provider/relayer): checks signature, nonce, epoch, deadline, amount==quoted, budget/unstake.

Execute: Provider runs the service and returns the result; IOU is stored off-chain.

Claim: Provider (or anyone) calls settleBatch(debits, sigs) → Escrow pays provider in USDC.

Unstake: User requests unstake (7-day window); event notifies providers to claim outstanding IOUs.

Architecture

Smart contracts

Escrow: stake/unstake; guarded withdraw post-deadline.

Settlement: verifies EIP-712 debits, enforces nonce/epoch/deadline, token allow-list & per-call cap, pays providers; supports cumulative IOUs with paidUpTo.

EAS (Registry): provider endpoints, service metadata (unit, 6-dp price), allowDirect flag, and network pointers (escrow/settlement/usdc). Global service index for pagination.

SDK (TypeScript, ethers v6)

Client: new MCP({ signer, chain, registry }) → getService(serviceId) → request({ input }) (handles pricing, nonce/epoch lookup, EIP-712 signing, WS send with bigint-safe JSON).

Provider: new McpServer({ allowDirect, saveIOU }) → bindService(def) → start(port) (verifies debit on-chain, executes handler, stores IOUs).

Claiming: ProviderClaimer groups pending IOUs, sorts by nonce, enforces caps/unstake, submits settleBatch, marks settled.

Relayer/API (Express) (optional)

Provider onboarding, service registry mirror, /call/:serviceId, /providers/claim, Mongo-ready (MVP uses in-memory).

Security model

Authorization: EIP-712 typed data; ERC-1271 ready.

Anti-replay: per-(payer,provider) nonce, epoch bumps on pause/unstake; short deadlines.

Spending caps: per-call limit (delta) + stake budget.

Unstake protection: after unstakeAt, settlements revert; providers are notified via event.

Direct transport: HMAC for webhooks, WS JSON schema validation, rate limits, timeouts.

Bigint-safe wire: custom JSON (stringify/hydrate) for robust cross-lang clients.

What we built during the hackathon

Working contracts (Escrow, Settlement with cumulative IOUs, EAS registry with global indexing).

Hardhat tests & scripts: single & batch settlement, unstake window reverts, cumulative delta behavior.

Production-style SDK: client, provider WS server, claim utility, bigint-safe JSON.

Express backend (optional relayer): provider register, add service, call, claim.

Hosted Agent demo: create an agent webhook (Gemini), priced per 1K chars, billed with the same EIP-712 flow.

Demo scenario

User stakes 100 USDC.

Calls “web.fetch” service → signs debit → provider returns result.

Provider hits Claim → receives USDC from user’s escrow.

User requests unstake → providers are notified via event; further settlements after the deadline revert.

From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

Not checked yet.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

Micropay Agents

Trustless micropayment channels for pay-as-you-go DeFi data using Hashchain Protocol and 1inch API.