DualPools Hack
What happened
DualPools, a lending, borrowing and swap protocol on BNB Chain built from a modified Venus Protocol, was exploited on 15 February 2024 for about $41,000. The attacker went after a new dLINK market that had no liquidity. By minting a tiny amount of dLINK and then sending LINK straight to the market, they pushed its exchange rate up enormously. Two base units of dLINK were then enough collateral to borrow WBNB, BTCB, ETH, ADA and BUSD from the other markets. A rounding-down error in redeemUnderlying let them take back almost all of the LINK they had put in while burning only one of the two dLINK units. Lunaray put the proceeds at 50 BNB, 0.17 BTCB, 3.99 ETH, 6,378 ADA and about 904-911 BUSD.
Attacker: 0x4645863205b47a0A3344684489e8c446a437D66C (0x7F27C9ed8CEb95Ae69E8361221fe17100f826616 is also listed as an additional attacker address)
Exploit transaction: 0x90f374ca33fbd5aaa0d01f5fcf5dee4c7af49a98dc56b47459d8b7ad52ef1e93
Attack contract: 0x38721b0d67DFdba1411BB277d95AF3D53FA7200E
According to the existing record, the proceeds were swapped to BNB, sent to another address and deposited into Tornado Cash about a week later (0xcedff18c5478037f057072a9dc2eb808398c47e8c2023f4848430a73e5b741c2, 0x7de2a931257c5a2aef16a410402729fb238e7c35f6f40e6304d62c95a2aa24ec).
How it happened
- The attacker flash-borrowed BNB and BUSD from DODO private pools and PancakeSwap V3, supplied them to Venus as collateral, and borrowed 11,500 LINK.
- They minted 2 base units of
dLINKin the new, empty DualPools LINK market, then transferred about 11,500 LINK directly into it. WithtotalSupplyat 2 and no borrows or reserves,exchangeRate = (totalCash + totalBorrows - totalReserves) / totalSupplyjumped to about 5.75e21. - Now valued at the inflated rate, the 2
dLINKunits served as collateral to borrow 50 BNB, 0.17 BTCB, 3.99 ETH, 6,378 ADA and 911 BUSD from other DualPools markets. - They called
redeemUnderlyingfor almost all the LINK in the market. The number ofdLINKto burn worked out to about 1.999999, which integer division truncated to 1, so they got the LINK back while burning only one unit. - They repaid Venus and the flash loans and kept the borrowed assets, about $41,000.
Protocol details
Evidence
- report @CyversAlerts incident report twitter.com
- transaction bscscan.com transaction 0x7de2…24ec bscscan.com
- transaction bscscan.com transaction 0x90f3…1e93 bscscan.com
- transaction bscscan.com transaction 0xcedf…41c2 bscscan.com
- address bscscan.com address 0x3872…200E bscscan.com
- address bscscan.com address 0x4645…D66C bscscan.com
- address bscscan.com address 0x7F27…6616 bscscan.com
- code DeFiHackLabs 2024 incident index: 20240215 DualPools github.com
- analysis DeFiLlama defillama.com
- analysis DualPools Hack Analysis (Lunaray, 20 Feb 2024, archived) web.archive.org
- analysis DeFiHackLabs DualPools_exp.sol proof of concept raw.githubusercontent.com
Understand the attack patterns
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.