Platypus Finance Hack
What happened
On July 11, 2023, Platypus Finance, a stableswap DEX on Avalanche, lost roughly $50,000 to an attacker who exploited how its pools priced one stablecoin against another. It was the second of three Platypus exploits in 2023.
Platypus valued the stablecoins in its pools as if they were worth exactly the same. The attacker deposited USDC, received LP-USDC, and withdrew that position as a different stablecoin asset in the pool, getting back more than the value put in. Verichains described the flaw this way: _deposit accepted the attacker's USDC, but _withdrawFrom returned more tokens than were deposited because of a logical error in the exchange-rate calculation. BlockSec described the same root cause as the protocol assuming a 1:1 ratio between stablecoins and ignoring their market price gap.
The team acknowledged the issue and paused pool operations. CertiK later put Platypus's total July 11 losses at about $157,000, because several addresses took the same arbitrage, not just the one attacker covered here.
Attacker address: 0xc64afc460290ed3df848f378621b96cb7179521a
Attack contract: 0x16a3c9e492dee1503f46dea84c52c6a0608f1ed8
Example attack transaction: 0x5e785b87e62252b1fff3283ce260d74cb5b3efc4588d7a0297f505482cbab388
How it happened
- The attack contract (
0x16a3c9...1ed8) borrowed 85,000 USDC from0x625E7708f30cA75bfd92586e17077590C60eb4cDat the start of the transaction. - The contract deposited the USDC into the Platypus main pool and received LP-USDC tokens.
- It then withdrew the LP-USDC position through the pool's USDT.e asset and converted that back to USDC, ending with about 87,889 USDC. Because of the exchange-rate error in the withdrawal math, it got back more than it had deposited.
- In the same transaction it repaid 85,042.5 USDC to the lender and kept the difference.
- The attacker repeated this in several transactions, taking roughly $50,000 in total.
Protocol details
Security review history
- Omniscia View report
- Hacken View report
Evidence
- report @BeosinAlert incident report twitter.com
- transaction Snowtrace transaction 0x5e785b87...b388 snowtrace.io
- transaction showtrace.io transaction 0x5e78…b388 showtrace.io
- address showtrace.io address 0x16a3…1ed8 showtrace.io
- address showtrace.io address 0xc64a…521a showtrace.io
- analysis DeFiLlama defillama.com
- analysis #5: Platypus Finance: Surviving Three Attacks with a Stroke of Luck blocksec.com
- analysis Verichains Weekly Security Digest (July 21, 2023) blog.verichains.io
- analysis Platypus DeFi Incident Analysis certik.com
Understand the attack patterns
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.