Reproduced Exploit
Tapioca DAO — AaveStrategy setMultiSwapper bricks compound
1. Constructor approves the initial multiSwapper for rewardToken. 2. setMultiSwapper only stores the new address. 3. New swapper has zero allowance → compound transferFrom fails → withdrawals that compound first brick.
Chain
Other
Category
untagged
Date
Jul 2023
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: 27529-h-39-aavestrategysol-changing-swapper-breaks-the-contract-co. Standalone Foundry PoC and full write-up: 27529-h-39-aavestrategysol-changing-swapper-breaks-the-contract-co_exp in the
evm-hack-registrymirror.
Vulnerability classes: vuln/wrong-condition · vuln/access-roles · vuln/permanent
Reproduction: self-contained Foundry PoC with only
forge-std— no fork, no RPC. Full trace: output.txt. PoC: test/27529-h-39-aavestrategysol-changing-swapper-breaks-the-contract-co.sol.
Key info#
| Impact | HIGH — after swapper upgrade, compound() reverts; rewards stuck and withdraw paths that compound first break |
| Protocol | Tapioca DAO |
| Vulnerable code | AaveStrategy.setMultiSwapper — updates pointer without approve |
| Bug class | Incomplete admin setter / missing allowance transfer |
| Finding | Code4rena — Tapioca, 2023-07 · #27529 · reporter carrotsmuggler |
| Report | code4rena.com/reports/2023-07-tapioca |
| Source | AuditVault |
| Status | Confirmed by Tapioca (dup #222) |
| Compiler | ^0.8.24 (PoC) |
TL;DR#
- Constructor approves the initial multiSwapper for rewardToken.
setMultiSwapperonly stores the new address.- New swapper has zero allowance →
compoundtransferFrom fails → withdrawals that compound first brick.
The vulnerable code#
function setMultiSwapper(address _swapper) external onlyOwner {
emit MultiSwapper(address(swapper), _swapper);
// @> VULN: no approve / revoke
swapper = ISwapper(_swapper);
}
Fix: revoke old allowance, assign, approve new (as in ConvexTricryptoStrategy).
Root cause#
Allowance is treated as constructor-only setup, but the swapper is mutable.
Attack walkthrough#
- Strategy holds 100 AAVE rewards; initial swapper is approved.
- Owner upgrades multiSwapper (routine ops).
- Anyone calling
compoundreverts; rewards remain unswapped; WETH balance stays 0.
Diagrams#
Impact#
Broken compounding and withdraw liveness after any legitimate swapper upgrade — permanent fund impairment until emergency re-approve.
Taxonomy#
- genome: wrong-condition, permanent, access-roles, fot-slippage, liquidation-underwater, oracle-freshness
- sector: dex, governance, lending, token, vault
- severity: high
- platform: code4rena
Sources#
- AuditVault finding #27529
- Code4rena report 2023-07-tapioca
- Reduced from Tapioca AaveStrategy.sol setMultiSwapper (2023-07 contest)
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 27529-h-39-aavestrategysol-changing-swapper-breaks-the-contract-co_exp (evm-hack-registry mirror).
- AuditVault finding: 27529-h-39-aavestrategysol-changing-swapper-breaks-the-contract-co.
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.