Shadow Arena #013: Tapioca DAO (Full Contest)
Tapioca DAO is a Liquity-inspired CDP shipped inside a cross-chain stack: BigBang mints USDO against ETH (and later non-ETH) collateral, Singularity is a Compound-style isolated lending pair sitting next door, YieldBox is the share-based strategy layer underneath both, and TOFT is the LayerZero-based Omnichain Fungible Token system that lets users move collateral and debt between chains. Code4rena ran the audit in July-August 2023 with 134 wardens, a $390,000 prize pool, and 13,499 SLOC across 5 sub-repos. The contest yielded 60 High + 99 Medium + 79 Low/NC findings -- the largest finding count of any Shadow Arena entry by an order of magnitude. This is the boss fight of the four Liquity-fork picks. You've built Liquity V1, you've audited Gravita's multi-collateral fork, you've audited Lybra's LSD-collateral fork. Tapioca is what happens when the same CDP primitives ship inside a 13,500-line cross-chain stack. We curated 16 findings that map directly onto the Liquity V1 mental model -- the BigBang/USDO CDP bugs, the Singularity liquidation accounting bugs, the YieldBox share-vs-amount confusion, the TOFT cross-chain symmetry breaks, and the oracle/fee pricing inconsistencies. The other 143 findings are bonus material in the linked C4 report if you want to go deeper. Note: Tapioca was exploited in October 2024 for ~$4M via a signer key compromise, an attack vector entirely separate from the 2023 audit findings. The bugs in this entry are pre-exploit, were fixed in the audited codebase, and are not in any active bug-bounty scope. Four weeks. Go.
Scope (13499 SLOC)
| File | SLOC |
|---|---|
| tapioca-bar-audit/ | 4062 |
| tapioca-bar-audit/contracts/markets/bigBang/BigBang.sol | 820 |
| tapioca-bar-audit/contracts/markets/Market.sol | 480 |
| tapioca-bar-audit/contracts/markets/MarketERC20.sol | 280 |
| tapioca-bar-audit/contracts/markets/singularity/Singularity.sol | 460 |
| tapioca-bar-audit/contracts/markets/singularity/SGLLiquidation.sol | 360 |
| tapioca-bar-audit/contracts/markets/singularity/SGLCommon.sol | 200 |
| tapioca-bar-audit/contracts/usd0/USDO.sol | 380 |
| tapioca-bar-audit/contracts/Penrose.sol | 520 |
| tapioca-yieldbox-audit/ | 1820 |
| tapioca-yieldbox-audit/contracts/YieldBoxRebase.sol | 110 |
| tapioca-toft-audit/ | 3210 |
| tapioca-toft-audit/contracts/tOFT/BaseTOFT.sol | 580 |
| tapioca-tap-token-audit/ | 2410 |
| tapioca-tap-token-audit/contracts/options/TapiocaOptionBroker.sol | 380 |
| tapioca-periph-audit/ | 1697 |
| tapioca-periph-audit/contracts/Magnetar/MagnetarV2.sol | 420 |
Documentation
Part of the Liquity V1 Path
This shadow audit connects to the Liquity V1 Build module. Students who built the CDP protocol have an advantage because they understand Trove accounting, Stability Pool P/S decay, redistribution liquidations, and redemption-driven peg mechanics.
View Build Module