Dedaub
banner
dedaub.bsky.social
Dedaub
@dedaub.bsky.social
Security audits, static analysis, realtime threat monitoring

https://app.dedaub.com
🇪🇺 Book an audit ⟹dedaub.com
Lessons:

- In Move (and other languages), left shifts don't abort on overflow - manual checks needed
- Edge cases in DeFi = attack vectors
- Test/model your calculations with boundary values

Talk to us to secure your
@Aptos
/
@SuiNetwork
project.
May 26, 2025 at 10:00 AM
And thus, the exploit (simplified):

1. Flash loan 10B tokens
2. Open LP position with massive liquidity param
3. Due to overflow, only 1 token required (instead of ~1.7M)
4. Remove liquidity → drains pool
5. Repay flash loan, keep profits
May 26, 2025 at 10:00 AM

When calculating tokens needed for claiming an exorbitant amount of Pool, attacker causes AMM to multiply huge numbers (2^113 × 2^79 = 2^192)

And result is left-shifted by 64, resulting in an overflow.

A function designed to prevent this is incorrectly implemented.
May 26, 2025 at 10:00 AM