# TricryptoLPStrategy.compoundAmount always returns 0 because it's using staticall vs call

TricryptoLPStrategy.compoundAmount uses staticcall on Curve gauge's claimable_tokens, which reverts on state change, returning 0 and underpricing shares to steal rewards.

- Payout: Contest reward
- Severity: high
- Program: Tapioca DAO
- Credited: GalloDaSballo
- Disclosed: 2023-11-16
- Write-up quality: 7/10
- Original: https://github.com/code-423n4/2023-07-tapioca-findings/issues/1428
- Library page: https://bugbountylibrary.com/r/c4%3A2023-07-tapioca%3AH-09
- Tags: domain:web3 impact:funds-loss kind:contest platform:code4rena sev:high tech:evm tech:solidity technique:source-review vuln:accounting-error vuln:business-logic

**Target:** TricryptoLPStrategy.sol compoundAmount / Curve LP gauge claimable_tokens
**Root cause:** compoundAmount reads claimable_tokens via staticcall, but the gauge's claimable_tokens calls checkpoint which mutates storage, so staticcall reverts and the function returns 0.
**Steps:**
1. Call `claimable_tokens(address)` on Arb Tricrypto gauge `0x555766f3da968ecBefa690Ffd49A2Ac02f47aa5f` via `staticcall` -> reverts (success=false), returns flag 1
2. Call same function via `call` -> succeeds, returns 0 claimable
3. Run Foundry test `test_callWorks` with `--rpc-url` to confirm staticcall reverts while call works
**How found:** Code-reading of compoundAmount's staticcall against Curve gauge; recognized claimable_tokens mutates state via checkpoint, so staticcall reverts; verified with Foundry comparing staticcall vs call on live Arbitrum gauge.
**Exploitation:** Deposit to hold high % of strategy shares (underpriced since compoundAmount=0), call compound so yield socializes to new total supply capturing majority, then withdraw to lock in immediate profit without contributing to yield.
**Insight:** When reading a Curve/Convex gauge's claimable_tokens or similar view-looking functions, check whether they internally call checkpoint (state-mutating); staticcall will revert and silently return 0, underpricing shares. Use call or accrue-then-revert pattern.
