BurgerSwap Hack

TOTAL LOST $7.2M
Medium Flash Loan Attacks BNB Smart Chain

What happened

On May 28, 2021, BurgerSwap's BNB Smart Chain AMM was exploited in 14 transactions for about $7.2 million. Flash liquidity from PancakeSwap funded the operation, but the drain depended on reentrancy through a malicious token and faulty AMM reserve validation.

Technical Root Cause

BurgerSwap's Uniswap V2-derived swap path allowed callback-driven reentrancy and lacked the constant-product invariant validation needed to reject a second output calculated from stale reserves.

Case & protocol details

Classification Reentrancy and AMM invariant failure
Protocol Type DEX
Affected asset / contract BURGER
Official Website burgerswap.org/
Protocol Twitter/X @burger_swap

Attack Timeline

The attacker created a non-standard token and paired it with BURGER. During a multi-hop swap, the token re-entered BurgerSwap before the relevant reserves were safely settled. Because the protocol lacked the constant-product invariant check used in Uniswap V2, it could honor a second output using stale accounting.

The flash swap was repaid within the transaction, leaving the extracted assets as the result.

Practice this exploit pattern safely

Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.