x402 Global: frictionless cross-asset FX with Uniswap, seamless payments, no barriers
At its core, x402 Global upgrades the x402 standard into a rich, machine-readable payment language that unlocks global reach. Extending the simple “payment required” banner, the server returns a structured payment requirements object: which token to pay, on which chain, how much, to which vault address, and before what deadline. The client (buyer) can use this payload to decide how much they’re willing to spend, sign the necessary approvals, and then retry the request with a fully-formed, on-chain-ready payment. In our demo, we showcase OTC-style asset sales over plain HTTP. A server exposes endpoints like GET /buy-asset; a client with a EUR wallet asks to buy a given amount of an on-chain asset (e.g., yield-bearing pool shares, tokenized deposits, ERC-4626 vault shares) that the seller prices in USD. Payments are settled in EUR and USD stablecoins on Polygon Amoy: the seller thinks in USD, while the buyer manges her affairs in EUR. Instead of manually juggling approve transactions, both buyer and seller sign EIP-712 permits. The buyer authorizes a facilitator contract to pull tokens from her wallet, and the seller authorizes the same contract to move the asset tokens from his wallet into a vault. The server then submits a single transaction that consumes both permits and pulls funds and assets into a secure settlement vault. The vault briefly holds the client’s EUR while the system uses a Uniswap v4 pool plus a custom hook to convert EUR →USD. The hook is designed to preserve vault integrity: if the swap doesn’t produce enough USD, the entire transaction reverts and the vault stays consistent and safe. x402 Global is aimed squarely at high-frequency, high-stakes transactions—the kind where a $10M payment really matters. That’s why we put a strong emphasis on finality awareness: assets remain locked in the vault until the underlying transactions reach the configured finality threshold. Only then are the assets and proceeds released, combining fast, modern infrastructure with a safety posture that serious capital can confidently rely on.
We built x402 Global as an end-to-end technical demo that connects HTTP 402, EIP-2612, Uniswap V4, and finality-aware settlement on Polygon Amoy.
On-chain:
Settlement vault in Solidity that escrows:
Facilitator/puller contract that consumes two EIP-2612/EIP-712 permits in a single transaction:
Uniswap V4 hook integrated with our own PoolManager, swap router, and liquidity router on Amoy:
On success: pushes MockUSDC and any residual MockEURC back to the vault, so vault accounting is always consistent.
Off-chain x402 HTTP server (Python) that:
Client script that:
Finality-aware watcher that:
Observability
Notable technical innovations

