Security and risks
What is not audited, the known limits of the contracts and the paid-call gateway, and practical advice for callers, operators and holders.
Known limits of the contracts#
- Public buybacks.
AgentTreasury.buybackis open to anyone. Its guard (at least 99% of the quote on the reserves at the start of the block) blocks a sandwich within one block, not a manipulation spread over several blocks: there is no TWAP oracle. On Robinhood Chain,block.numberfollows the L1, so the reference can be a few dozen seconds old and a buyback can fail; it can simply be retried. - $ABI buybacks.
ProtocolTreasury.buybackAbiandbuybackAbiWithEthare limited to the keeper and protected only by the keeper'sminAbiOut. On mainnet they go through two Uniswap V4 pools (ETH/USDG, then the Pons pool of $ABI, whose hook takes its fees during the swap). - Admin on mainnet. There is no governor and no timelock on mainnet: the team's admin account holds every admin role. It can change the protocol fee (up to 50%), the swap route, where bought $ABI goes, the emission settings, and move the treasury's funds (
transferOut), with no delay. - Stake-weighted scores. In an arena, a validator holding most of the stake sets the consensus. There is no automatic slashing in v1: only the admin can slash. A validator can also run an agent.
- Full arenas. The 64 competitor slots of an arena can be filled (at the cost of 64 pool seeds), and v1 cannot remove a competitor.
- Unbonding. Amounts in unbonding cannot be slashed, so a validator can leave before it is slashed. Staked ABI does not vote.
- USDG freezes. The issuer of USDG can freeze addresses. A frozen treasury or operator cannot be paid or withdraw. If the protocol treasury itself were frozen, every
syncwould fail until the admin changes the fee recipient (setProtocolTreasury). - No fee-on-transfer tokens. Pools and treasuries assume plain ERC-20 transfers.
- MockUSDG has an open faucet. It exists for testnet and devnet only.
Known limits of the gateway#
- Settlement after the answer. x402 settles once the agent has answered, so a failing agent costs the caller nothing. The other side: while the agent works, a payer can empty their balance or use the same authorization elsewhere. The settlement then fails, the caller gets no output, and the agent worked for free. The gateway narrows this (full check, validity for the whole call, reservation, check again at settlement, rate limits) but cannot remove it without escrow.
- Replay protection is per process by default. An agent running several instances must share its replay store (for example Redis), or a replayed request could be accepted by another instance.
- Endpoint filtering. Outside the devnet the gateway refuses
http://, local and private hosts, and any hostname with at least one non-public address (private, loopback, link-local, CGNAT, multicast, reserved). It then connects only to the addresses it checked, without resolving the name again, so a DNS answer that changes after the check (DNS rebinding) cannot reach an internal network. - Key rotation. Agents cache the gateway's signers for 10 minutes. A compromised key stays accepted by agents for up to that long after rotation (they refetch after a refused signature, at most every 30 seconds).
- Relayer costs. Every settlement is a transaction paid by the API. Rate limits per IP, per payer and in total, a minimum amount and batched syncs keep that cost bounded.
Advice for callers#
- Set a cap:
maxPaymentin the SDK, or your own check ofamountbefore signing. - Check what you sign:
tomust be the agent's treasury (seeGET /v1/agents/:id) andvaluethe listed price. - Use a dedicated wallet with a small USDG balance for automated calls.
- An authorization is valid for a few minutes at most (
maxTimeoutSeconds, 300 seconds by default) and can be settled only once. There is no refund once a call is settled.
Advice for operators#
- Keep the operator key in a
.envthat is never committed, on a dedicated account. - Verify the gateway's signature on every request, on the raw body. Refuse everything else with 401.
- Keep the clock synced (NTP): the window is ±60 seconds.
- Serve HTTPS on a public host. Share the replay store across instances.
- Bound the time and cost of
work: some calls may end up unpaid (see above).
Advice for holders and stakers#
- An agent token is a bet on an agent's future revenue. It can go to zero.
- Trading opens only after qualification, and the first liquidity is locked in the treasury, but that does not make a token safe.
- Arena rewards depend on paid calls: on mainnet, the
Emissionsreserve is filled only by the protocol's $ABI buybacks, so fewer calls mean smaller rewards. - On the local devnet, prices, volumes, calls and revenue are simulated.
