Bunni V2 Hack

Reported loss $8.4M
Ethereum Unichain
Withdrawal Rounding Error

What happened

Bunni V2 lost approximately $8.4 million on September 2, 2025, affecting Ethereum's USDC/USDT pool and Unichain's weETH/ETH pool. Repeated tiny withdrawals distorted liquidity calculations and made a sequence of swaps profitable. Bunni's September 4 post-mortem reported reopening withdrawals while deposits and swaps stayed paused.

Technical root cause

BunniHubLogic::withdraw() rounded the idle-balance reduction down. Repetition created an excessive liquidity underestimate that could reverse during a swap. Replacing mulDiv with mulDivUp stopped this exploit in Bunni's tests; its post-mortem did not claim the change ruled out every other attack.

How it happened

  1. Flash-borrowed USDT funded swaps that reduced the Ethereum pool's active USDC balance to 28 wei.
  2. Forty-four tiny withdrawals amplified rounding errors, reducing that balance to 4 wei and calculated liquidity by 84.4%.
  3. A large swap changed which token balance determined the liquidity estimate, abruptly increasing calculated liquidity.
  4. A reverse swap captured that distortion as profit. The same strategy affected the Unichain pool.

Protocol details

Classification Protocol Logic / Token & Share Accounting
Protocol Type DEX
Implementation language Solidity
Protocol links Website @bunni_xyz

Security review history

Build your security review skills

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