Pact Agent

Get paid in USDT on Whitechain. Your client signs once. We pay the gas. So do agents.

Pact Agent

Created At

ETHGlobal Mumbai

Project Description

A designer sends a $1,000 invoice to a client abroad. If the client pays by card, Stripe takes $54.30 before she sees a cent, and a dispute costs another $15. Right away.

USDT should fix that. It doesn't, because now the client needs a wallet, the right chain and gas just to pay one invoice.

Pact removes that step. The client signs once. Our relayer sends the transaction and pays the gas. The client's AI agent can pay the same way, over x402, inside spending caps the merchant sets.

Getting the first payment through is easy. We spent the weekend on what comes after it: refunds, renewals that can't overcharge, invoices she can sell today instead of waiting 30 days ($1,000 due next month becomes $865 now), and Face ID instead of seed phrases.

She pays 0.8%. She signs those terms once, and after that nobody can raise them. Not her client, and not us.

Testnet only (Whitechain Sepolia, chain 1874).

How it's Made

We don't trust our own server. The frontend only collects signatures. The backend only turns them into transactions. Every rule that touches money lives in the contracts, so if our API goes down, the contracts still refuse anything outside the rules.

Contracts are Solidity 0.8.26, built and tested with Foundry, targeting Prague because that's what Whitechain runs. All deployed on Whitechain Sepolia on 7 Nov:

FeeSchedule holds versioned fee terms. The merchant accepts one version with an EIP-712 signature and stays on it until she signs a newer one, so nobody can raise her fee. Router checks the signed intent against every rule. When it says no, the reason is emitted onchain, not buried in our logs. PaymentEscrow does the one-signature charge and takes the fee out of the payment. The payer signs a single USDT authorization, so there's no approval transaction first. Refunds are capped and signed by the merchant herself, and she pays their gas in USDT. PasskeyAccount verifies WebAuthn signatures onchain through the P256 precompile Whitechain gets from the OP Stack. In the demo, you pay with your laptop's fingerprint. SubscriptionManagerV2 caps every renewal, and every refused renewal is an event. X402AgentAccount gives each AI agent a per-call and a daily limit. Permit2 and the standard x402 contracts are already on Whitechain, so an unmodified x402 client can pay a merchant's API. InvoiceReceivables + InvestorRegistry turn a signed invoice into something an approved investor can buy. Payment and receivable swap in one transaction. It can't be sold twice or moved in the last 24 hours before it's due, and after a 7-day grace anyone can mark it defaulted. The registry is a testnet stand-in for KYC.

Gas sponsorship can't lose money. A payment costs about 168k gas. The relayer measures it and refuses any payment whose fee wouldn't cover it, and the fee floor is enforced in the contract. We couldn't subsidize ourselves into a hole even if we tried.

Off-chain: the API is Hono on Node with SQLite. It runs the relayer, the indexer, the renewal keeper, signed webhooks and an x402 facilitator built on the x402 packages. The merchant app is Next.js with Privy for sign-in and viem for the chain. There's a TypeScript SDK with React and React Native checkout components, and agent-first docs with an llms.txt.

background image mobile

Join the mailing list

Get the latest news and updates

Pact Agent | ETHGlobal