Reproduced Exploit
Autonomint — `ABONDToken::transferFrom` corrupts `userStates` and enables Treasury ETH theft
1. transferFrom debits the from State, then writes it to msg.sender. 2. The true from keeps their full ethBacked State; the spender inherits a quasi-copy of the rich State. 3. redeemYields pays aBondAmount * ethBacked / PRECISION using the
Chain
Other
Category
accounting
Date
Nov 2024
Source
AuditVault
EVM Playground
Source-level debugger — step opcodes and Solidity in sync
The attack is replayed in an in-browser EVM preloaded with the exact dumped fork state. The execution tree shows every call; step by Solidity line or by opcode across all depths — source, Stack, Memory, Storage, Balances (native / ERC-20 / NFT), Transient storage and Return value stay in sync. Click a tree node, opcode, or source line to jump. No backend, no live RPC.
Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 45462-h-9-abondtokentransferfrom-does-not-work-as-intended-and-all. Standalone Foundry PoC and full write-up: 45462-h-9-abondtokentransferfrom-does-not-work-as-intended-and-all_exp in the
evm-hack-registrymirror.
Vulnerability classes: vuln/accounting/state-key · vuln/token/erc20-inconsistency · vuln/logic/direct-drain
Reproduction: a self-contained Foundry PoC that compiles & runs in an isolated project with only
forge-std— no fork, no RPC, noanvil_state. Full trace: output.txt. PoC: test/45462-h-9-abondtokentransferfrom-does-not-work-as-intended-and-all_exp.sol.
AuditVault taxonomy: lang/solidity · sector/lending · sector/stable · sector/token · platform/sherlock · has/github · has/poc · severity/high · impact/loss-of-funds/direct-drain · genome: missing-modifier · direct-drain · liquidation-underwater · reentrancy-guard · timestamp-dependence
Key info#
| Impact | HIGH — duplicated high-ethBacked State on the spender lets them redeem inflated ETH from Treasury |
| Protocol | Autonomint Colored Dollar V1 — ABONDToken.transferFrom |
| Vulnerable code | userStates[msg.sender] = fromState after _debit (should be userStates[from]) |
| Bug class | Wrong mapping key / dual-ledger ERC20 |
| Finding | Sherlock — 2024-11-autonomint · #45462 (H-9) · reporter tjonair |
| Report | 2024-11-autonomint-judging |
| Source | AuditVault |
| Status | Audit finding. Reproduced here as a standalone local PoC. |
| Compiler | ^0.8.24 (PoC) |
TL;DR#
transferFromdebits thefromState, then writes it tomsg.sender.- The true
fromkeeps their fullethBackedState; the spender inherits a quasi-copy of the rich State. redeemYieldspaysaBondAmount * ethBacked / PRECISIONusing the duplicated State against the spender's ERC20 balance.- A poor account can redeem ~2× ETH after transferFrom-ing 1 wei from a rich account.
The vulnerable code#
fromState = Colors._debit(fromState, uint128(value));
userStates[msg.sender] = fromState; // @> VULN: should be userStates[from]
super.transferFrom(from, to, value);
Fix:
- userStates[msg.sender] = fromState;
+ userStates[from] = fromState;
Root cause#
Dual accounting (ERC20 balances + colored userStates) updates the wrong
address key after debit, breaking EIP-20 semantics and yield redemption.
Preconditions#
- Account with high
ethBackedapproves the attacker. - Attacker holds some ABOND with lower
ethBacked. - Treasury has ETH to pay redemptions.
Attack walkthrough#
- account1: 100 ABOND, ethBacked=2e18. account2: 10 ABOND, ethBacked=1e18.
- account1 approves account2 for 1 wei; account2
transferFrom→ account3. - account2's
userStatesnow carries ethBacked=2e18. - account2 redeems 10 ABOND → ~20 ETH instead of ~10 ETH.
Diagrams#
Impact#
Treasury ETH theft; broken ABOND accounting; EIP-20 non-compliance for colored state.
Sources#
- AuditVault finding #45462
- Sherlock 2024-11-autonomint judging #636
- Reduced source: sherlock-audit/2024-11-autonomint@0d324e0
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 45462-h-9-abondtokentransferfrom-does-not-work-as-intended-and-all_exp (evm-hack-registry mirror).
- AuditVault finding: 45462-h-9-abondtokentransferfrom-does-not-work-as-intended-and-all.
Alerts & third-party analyses
These dashboards index community alerts tweets, post-mortems, and independent write-ups. Reach them through the protocol name above to cross-check this reproduction against other analyses.