Reproduced Exploit

Tapioca DAO — AaveStrategy rewards locked as unredeemable stkAAVE

1. AAVE incentivesController stakes claimed rewards into stkAAVE immediately. 2. compound() claims incentives but never calls redeem. 3. Strategy holds stkAAVE with zero free AAVE/WETH — rewards unusable.

Jul 2023Otheruntagged2 min read

Chain

Other

Category

untagged

Date

Jul 2023

Source

AuditVault

EVM Playground

Source-level debugger — step opcodes and Solidity in sync

evm-hack-analyzer

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.

Loading fork state…

Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 27531-h-41-rewards-compounded-in-aavestrategy-are-unredeemable-cod. Standalone Foundry PoC and full write-up: 27531-h-41-rewards-compounded-in-aavestrategy-are-unredeemable-cod_exp in the evm-hack-registry mirror.


Vulnerability classes: vuln/frozen-funds · vuln/reward-accounting · vuln/direct-drain

Reproduction: self-contained Foundry PoC with only forge-std — no fork, no RPC. Full trace: output.txt. PoC: test/27531-h-41-rewards-compounded-in-aavestrategy-are-unredeemable-cod.sol.


Key info#

ImpactHIGH — claimed AAVE incentives auto-stake to stkAAVE and are never redeemed → permanent reward lock
ProtocolTapioca DAO
Vulnerable codeAaveStrategy.compound — missing stakingRewardToken.redeem
Bug classIncomplete reward path / frozen funds
FindingCode4rena — Tapioca, 2023-07 · #27531 · reporter Ack
Reportcode4rena.com/reports/2023-07-tapioca
SourceAuditVault
StatusConfirmed (dup #243)
Compiler^0.8.24 (PoC)

TL;DR#

  1. AAVE incentivesController stakes claimed rewards into stkAAVE immediately.
  2. compound() claims incentives but never calls redeem.
  3. Strategy holds stkAAVE with zero free AAVE/WETH — rewards unusable.

The vulnerable code#

SOLIDITY
function compound() external {
    incentivesController.claimRewards(...); // auto-stakes to stkAAVE
    // @> VULN: never calls stakingRewardToken.redeem()
}

Fix: after cooldown, redeem stkAAVE → swap free AAVE → re-deposit WETH.

Root cause#

Compounding was designed around free rewardToken balances; the incentives path delivers staked receipts instead.

Attack walkthrough#

  1. Strategy accrues 500 AAVE claimable incentives.
  2. compound() stakes them as 500 stkAAVE.
  3. Free AAVE = 0, WETH compounded = 0; no strategy path unlocks stk.

Diagrams#

sequenceDiagram participant Strat as AaveStrategy participant IC as IncentivesController participant Stk as stkAAVE Strat->>IC: claimRewards IC->>Stk: stake to Strat Note over Strat: free AAVE = 0, no redeem call

Impact#

Yield intended for depositors is permanently stuck as staked receipt tokens.

Taxonomy#

  • genome: frozen-funds, direct-drain, reward-accounting
  • sector: governance, lending, staking, staking-pool, token
  • severity: high
  • platform: code4rena

Sources#


Sources & further analysis#

Reproductions & code

Alerts & third-party analyses

  • Web3Sec X hacked database: search.
  • Rekt leaderboard: search.
  • Solodit incident search: search.

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.