AI agent payments usually get the flow right and the trust wrong
Over the last two weeks I kept running into AI agent payment projects: a pay-per-call facilitator, a swap API built for agents, a test suite for x402 payments, a guard that sits between an agent an
Who decides where the money goes
</h2> <p>An x402 facilitator live on mainnet gives each merchant their own vault contract, which pulls the payment and splits it in one transaction, the net to the merchant and the fee to the protocol.</p> <p>To change where a vault pays, the merchant has to sign. That's the strong control. But the operator deploys the vault, and the first payout address comes from what was saved in the dashboard. The docs call that setting a preference, not an authority. You only see that it decides the first payments in the vault code, not in the docs.</p> <p>So the weaker path picks where the money goes, and the merchant's signature only matters after that. If the operator key leaks, every merchant who hasn't been paid yet can get a vault that pays someone else.</p> <p>The dev agreed and is fixing it so operator-created vaults always pay the merchant. If you ever fix something like this, remember the payout is written once, when the vault is created. A fix in the factory only covers new vaults. The existing ones keep whatever they were given, so you go through the creation events and ask those merchants to confirm.</p> <h2>If the address comes from the API, it's not a check
</h2> <p>Then there was a free swap API and MCP server for agents. It asks several aggregators and bridges for quotes, ranks the routes and returns calldata, and the agent signs whatever comes back.</p> <p>That makes the upstream APIs part of the agent's wallet. If one of them is compromised, it can hand back calldata that sends the swap to someone else, and every agent using the API signs it.</p> <p>I suggested decoding the calldata on the server first: the router is on an allowlist, the recipient is the user, and the minimum output matches the quote. They shipped it within a day.</p> <p>Then they hit the harder case, a bridge where the recipient is bound off chain. Their fix was good: fetch the order, recompute its id, check the recipient and the minimum amount, and require the deposit to go to the bridge's deposit contract. But the deposit contract address came from the same bridge API at runtime. A compromised API could list its own contract, and every order check would still pass, because the funds never reach the real one.</p> <p>Pin addresses like that per chain in your config, and alert when the API disagrees.</p> <h2>"A payment exists" is not "this payment paid for this"
</h2> <p>This one is an open-source CI suite that injects faults into x402 settlement on Solana, so a server can test how it handles bad payments. The author asked which checks were missing.</p> <p>I'd start with a valid payment made for a cheaper route, or to a different recipient, replayed against a pricier route. A server that only checks that a settled payment exists will serve it.</p> <p>They took it as tests for amount, recipient and resource substitution. Then I asked about the same amount paid in a different token, or on devnet, replayed against a mainnet route. Checks that only compare amount and recipient let that through. They shipped both as new checks in their next release.</p> <p>The same thing comes up on the client side. In x402 the 402 response tells the agent which token contract and which network to pay on. So a spend limit that pins the recipient but not the asset and the network can be walked around by an endpoint that keeps the number the same and changes the token. And when a human approves a payment, they should see the exact requirements that get signed, not the agent's summary of them.</p> <h2>The signature your guard doesn't know about
</h2> <p>An open-source guard for agent wallets holds unlimited approvals, Permit signatures and long expiries by default, which are the ones that usually bite.</p> <p>The one missing was EIP-7702. An authorization is a signature over a chain id, an address and a nonce. It isn't typed data and it isn't a normal transaction, but it delegates the whole account to a contract, which is worse than any unlimited approval. And a chain id of 0 makes it valid on every chain.</p> <p>The guard approved a type 4 transaction even when its authorization list delegated the account, and the framework plugin didn't look at the authorization list at all. The author fixed both and published within three hours.</p> <p>He was also honest about the limit: the guard only sees what goes through the wrapped client. If the agent can reach the raw key, nothing on the client side sees the authorization. One thing a guard can still do on its own is read its account's code before each send. A delegated account returns 0xef0100 followed by the delegate's address. If that points somewhere you don't expect, stop signing.</p> <h2>The text the model still writes
</h2> <p>The banking agent was already well built. The customer types the payee and the amount, and the confirm screen sits outside the chat, so the model can't misdescribe the transfer.</p> <p>But the transfer note is still written by the model, and it leaves the bank and lands with someone outside. A model that read a malicious message can put the customer's balance or another account number in the note of a small transfer. It's the same problem as email tools where the recipient is pinned but the model writes the body.</p> <p>The simplest fix I can think of is a note field on the confirm screen that the customer fills in. Then the model never writes it.</p> <h2>What I check now
</h2> <p>These are the questions I ask about an agent payment design now:</p> <ol> <li> <strong>Who can set where the money goes, and in what order?</strong> If a weaker control decides first and the strong one only applies later, the weak one is the real control.</li> <li> <strong>Where does every address come from?</strong> If it comes from the same API you're checking, it's not a check. Pin it.</li> <li> <strong>What is the payment bound to?</strong> Amount, recipient, resource, token and network. Not just "a settled payment exists".</li> <li> <strong>Which signatures can the agent's key produce?</strong> Transactions, typed data, permits and EIP-7702 authorizations. A guard that only knows some of them isn't a guard for the others.</li> <li> <strong>What free text does the model still write that reaches someone outside?</strong> Notes, memos, email bodies, metadata. That's a way to send data out.</li> </ol> <p>None of the fixes needed a smarter model.</p> <p>If you're building agent payments, I'm curious which address in your flow still comes from an API you don't control.</p> <p>I first wrote a short version of this <a href="https://x.com/TheBlockChainer/status/2114410387328102707" rel="noopener noreferrer">on X</a>.</p> <p><em>I wrote this with help from AI for drafting and editing. The opinions and the review experience are mine.</em></p>Original source
Tags
Related Articles
Continue reading with these similar posts

Sources: Missouri RB Hardy, shot in offseason, to return vs. Arkansas
Missouri All-America tailback Ahmad Hardy is set to make his season debut for the Tigers this weekend at Arkansas, sources told ESPN.

Red Wings suspend Larkin as team explores trade options; players keen to move on
The Red Wings announced Thursday that star forward Dylan Larkin has been suspended without pay after informing the team he no longer wanted to play for Detroit.

Packers' Jacobs says TD celebration was ode to gospel song, not mocking arrest
The Packers' Josh Jacobs said he was surprised his first-half TD celebration was perceived by some as mocking his May arrest, saying it was an ode to a gospel song.

Israel faces weeks of coalition haggling as Netanyahu’s party claims election 'stolen'
Israel's election leaves the country facing weeks of coalition bargaining and an uphill battle for the opposition party to form a majority government.
Herdr has released native app
Comments

Satellite vs Fiber Internet: ഇന്ത്യയുടെ ഇന്റർനെറ്റ് വിപ്ലവത്തിന് ആര് മികച്ചത്?
ഇന്ന് ഇന്റർനെറ്റ് ഒഴിച്ചുകൂടാനാവാത്ത ഭാഗമായി മാറിക്കഴിഞ്ഞു. ഇപ്പോൾ ഇന്ത്യയിൽ നിലവിൽ ഏറ്റവും ജനപ്രിയമായ ഇന്റർനെറ്റ് മാധ്യമം ഒപ്റ്റിക്കൽ ഫൈബർ (Fiber Internet) ആണ്. എന്നാൽ രാജ്യത്ത് സജീവ ചർച്ചയായി മാറിക്