ERC20 transfer reports "Transferred" when the transaction reverts (receipt status ignored)
Maintainers usually reply within 1 day
@AgenticFinanceGraph is already working on this.
Since Oct 12, 2026.
- #1556 by @AgenticFinanceGraph — open
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
Research direction
Start in ERC20ActionProvider.transfer and inspect how the receipt returned by waitForTransactionReceipt is handled; the issue says the standard transfer path discards it, and that approve and gasless transfer may do the same. Add coverage for a reverted receipt and verify the action reports failure instead of claiming the transfer succeeded. The issue offers a reproduction archive, but does not name test files.
Written by the indexing model from the issue text.
Description
Version: @coinbase/agentkit 0.10.4 (latest on npm); same code on main at 2e6dbaf.
What happens. ERC20ActionProvider.transfer sends the transaction, awaits the receipt and then always returns a success message:
const hash = await walletProvider.sendTransaction({ ... functionName: "transfer" ... });
await walletProvider.waitForTransactionReceipt(hash); // receipt discarded
return Transferred ${args.amount} of ${tokenDetails?.name} ...;
With ViemWalletProvider, waitForTransactionReceipt resolves with status: "reverted" for a mined, failed transaction; it does not throw. So a transfer that reverts after AgentKit's pre-checks pass is reported to the agent as "Transferred …", with the hash. No tokens moved.
This happens whenever the token's state changes between gas estimation and inclusion: an issuer pause or blacklist (as USDC supports), a balance or allowance used by a concurrent transaction, or a token with conditional transfer logic.
Reproduction. Attached agentkit-reverted-transfer-poc.zip: npm install && node poc.mjs. It runs on a local Ganache chain with throwaway keys, using the unmodified AgentKit, ViemWalletProvider and erc20ActionProvider; the only test hook pauses the token immediately before the signed transfer is broadcast.
== Control: normal transfer
AgentKit output : Transferred 100 of PoC Token (0x…) to 0x….
Receipt status : success
Transfer events : 1
Payee received : 100 POC
== Bug: token paused after signing, before inclusion
AgentKit output : Transferred 100 of PoC Token (0x…) to 0x….
Receipt status : reverted
Transfer events : 0
Payee received : 0 POC
The same behaviour on public Base Sepolia with our own test token and wallet: https://sepolia.basescan.org/tx/0x844bfcd961a4422ce050bef365f1274b480db60504b55311c1a97287ae839a82 (reverted, no Transfer event; AgentKit returned "Transferred 200 … Transaction hash for the transfer: 0x844bfcd9…").
Why it matters. An agent is told a payment succeeded, with a valid hash, when nothing moved. It then marks the invoice paid or confirms the order. No funds are taken from the wallet; the problem is a false payment confirmation.
Suggested fix.
const receipt = await walletProvider.waitForTransactionReceipt(hash);
if (receipt.status !== "success") {
return Error: transfer transaction ${hash} was mined but reverted; no tokens were transferred.;
}
By code inspection (not separately reproduced), approve and the gasless-transfer path of transfer in the published 0.10.4 build follow the same pattern.
Related: #1547 is the opposite case (a sent transfer reported as failed because the receipt lookup throws). A fix for both could wait for the receipt in its own try, return the hash with "sent, not confirmed" when the wait throws, and return an explicit revert error when status is "reverted".
Happy to open a PR with the fix and tests.
Found with EmberTail (https://embertail.xyz/), which tests payment correctness of AI agents.
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 842
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from coinbase/agentkit
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
coinbase-agentkit 0.7.x fails on fresh install: imports solana.rpc.api, which solana>=0.37 removedPossibly taken @JulienKervarrec claimed this 20 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Maintainers usually reply within 1 day
-
x402 action provider: optional pre-pay spot-check hookPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 4/5 3-5 days Newbie friendliness 8/100
coinbase/agentkit#1548 · 5 comments ·
Maintainers usually reply within 1 day
-
ERC-20 transfer reports "Error transferring the asset" when only the receipt lookup fails, so an agent sends the payment againPossibly taken @AgenticFinanceGraph claimed this 1 day ago. Open
Difficulty 3/5 Half a day Newbie friendliness 45/100
coinbase/agentkit#1547 · 3 comments ·
Maintainers usually reply within 1 day
All issues in coinbase/agentkit
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
db-ux-design-system/core-web#8461 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Cannot run an integration on windows when power shell is selected as the default profile terminalOpenPriority/Blocker Type/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
wso2/product-integrator#2767 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
severity:low
Difficulty 1/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day