fx402
Let an AI agent pay an x402 merchant in a different stablecoin, live on Arc.
fx402 lets an AI agent pay an x402 merchant in a different stablecoin from the one the merchant
asks for. The merchant still answers 402 Payment Required with its own price and currency. The agent pays in what it
holds, Aqua0 liquidity converts it, and the merchant receives exactly the amount it asked for. One transaction does all
of it, so if any part fails, nothing moves.
fx402 runs on Arc mainnet (chainId 5042) since October 27, 2026. Its facilitator is not open to outside merchants
yet.
How a payment works
- The agent requests a paid resource. The merchant replies
402with its price, for example 0.25 USD. - The agent asks the fx402 facilitator what that costs in the currency it holds. fx402 quotes from the Aqua0 pool for that pair and adds a small buffer for price movement.
- The agent signs one transfer authorization for the quoted amount (EIP-3009 where its token supports it, otherwise Permit2) and retries the request with it. It sends no approval transaction and pays no gas.
- The facilitator checks the signature against the quote and submits the settle transaction.
- In that one transaction the fx402 settler takes the agent's tokens, swaps them through the pool, pays the merchant its exact price, takes the fee and refunds whatever part of the buffer the swap didn't use.
Gas on Arc is paid in USDC.
Contracts on Arc
Arc has USDC and EURC, but no MYR, IDR, SGD or BRL stablecoins yet. Until it does, the FX side runs on test stablecoins with the same 6-decimal ERC-20 and permit interface as USDC. Each has an Aqua0 vault, and every FX pool is backed by the a0USD vault.
| Contract | Address |
|---|---|
| fx402 settler | 0x665dffdc9c4db3e41e401c4ea3c010a860b7b427 |
| Token | Address | Aqua0 vault |
|---|---|---|
| a0USD | 0x9a253711bde7e29604b4407c0e095a9591a7cd17 | 0x17106F0EdB8D279Bcb2a922A85FDce152b9B415f |
| a0MYR | 0x7c2c135baa2a2bbfdf3f7794c900309b28464a4e | 0x3b4788455A3cbFcC520cdB7e677Ec3643080Ad6d |
| a0IDR | 0x5571d9e1fedba5bca2fe5905160dfa54db8a40cc | 0x821dCa8EDBC1b804f22C99F7eB0e587b4347EF6C |
| a0SGD | 0x0ff39b945fb9ae0f1e1b79a26f766313e59daf9f | 0x680d8EF631402D7796B5d51d625Fbd759a786D9F |
| a0BRL | 0x2ed6db698f4a875147c53d0f7ee89d39d6822627 | 0x94839554aFBFAefAa1Ca059F87e59630B1C9127F |
Four pools trade each FX token against a0USD, with a 0.05% fee.
| Pair | Aqua strategy id |
|---|---|
| a0USD/a0MYR | 0xdaf4d59c9b6f94d0429b38e18559d8880a646e57db7672f9e607f9c7942d2311 |
| a0USD/a0IDR | 0xcecdd1cc8cdb54ceea662e77e9b42f6915f1f988ffa5b44feaa4f963fc19e758 |
| a0USD/a0SGD | 0x3134f4241ed22075ccc4f28ba82fb54a9ed2407ac6fc05524b89c88cac5e374b |
| a0USD/a0BRL | 0xa1575d8b16f1f12aee470ecf12052e7b9ae0ce25f08335e4ae05db0d39090a6e |
The first payment
On October 27, 2026 a test agent paid 1.020627 a0MYR for a merchant's 0.25 a0USD resource, in transaction
0x6ed88415…b6d0
(block 28167072).
- The pool took 1.019607 a0MYR and sold 0.25 a0USD.
- The merchant received exactly 0.25 a0USD.
- The fee was 0.001020 a0MYR.
- The settler refunded the unused 0.005098 a0MYR of the buffer.
- The settle used 598,412 gas, which cost 0.0143 USDC.
What the deployment took
- Deployment. One script deployed the test tokens and the settler, created a vault for each token through Aqua0's open vault factory, added liquidity and opened the four pools. The whole deployment cost about 0.80 USDC in gas.
- Testing before mainnet. Arc's USDC moves balances through a chain precompile, which local fork tools such as anvil cannot run, so USDC transfers fail on a fork. To test locally we copied a plain ERC-20 over the USDC address, and on mainnet we use our own test dollar (a0USD) for the payment side so the fork and mainnet behave the same.
- RPC limits. The public RPC allows about two requests a second for each address. Our indexer was rate-limited during its backfill, so we added a proxy that caches history and paces every call, with payment reads going first.
Where Arc's tooling fell short
- Forking Arc. There is no documented way to run a local fork where USDC works. An anvil-compatible precompile, or a published test harness, would remove the workaround above.
- RPC capacity. An indexer backfill cannot run at two requests a second without its own pacing layer. Keyed or higher limits for builders would help.
- Non-USD stablecoins. For FX across emerging-market currencies there are no MYR, IDR, SGD or BRL stablecoins on Arc yet, so liquidity for those pairs can only be test liquidity today.
- x402 on Arc. We wrote our own facilitator for Arc. A reference facilitator, or Arc listed as an x402 network by the existing facilitators, would make it easier for merchants to accept payments on Arc.
What's next
- Open the facilitator to outside merchants and agents.
- Add real stablecoin pairs as they arrive on Arc, starting with USDC/EURC.
- Route quotes across more liquidity sources, so the agent always gets the best available rate.