BurgerSwap Hack

Reported loss $7.2M
Bnb Smart Chain
Malicious-token reentrancy funded by a flash swap

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.

How it happened

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.

Protocol details

Classification Reentrancy and AMM invariant failure
Protocol Type DEX
Affected asset / contract BURGER
Protocol links Website @burger_swap

Build your security review skills

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