How a Rounding Error in Bunni's Custom Math Cost It $8.4 Million
Bunni built a custom Liquidity Distribution Function on top of Uniswap V4, designed to squeeze extra efficiency out of every trade. On September 1st, an attacker found a way to break that math and turned it into an $8.4 million loss for the protocol — spread across two pools on two different networks, Ethereum and Unichain, without needing a flash loan or any oracle manipulation.
The method was simple in concept: trades sized precisely enough to corrupt the rebalancing calculations, opening the door to repeated withdrawals that drained the affected pools in quick succession.

Timeline of discovery and response
BlockSec raised the first alarm late on September 1st, flagging suspicious activity against Bunni's Ethereum contracts and estimating roughly $2.3 million in losses. Within about an hour, CertiK identified the same exploit pattern replaying on Unichain, which pushed the combined total to $8.4 million.
By that point, half of the stolen Unichain funds had already been converted to ETH and were being bridged toward Ethereum via Across Protocol, moving in structured batches of 100 ETH at a time.
Bunni acknowledged the incident roughly two hours after BlockSec's initial post, stating: "The Bunni app has been affected by a security exploit. As a precaution, we have paused all smart contract functions on all networks." About four hours after that, the team narrowed down the scope to two affected pools: USDC/USDT on Ethereum and ETH/weETH on Unichain. A Bunni representative known as Silent P confirmed the full contract pause while the team brought in outside help from Hypernative, Cyfrin Audits, Impossible, and BlockSec. By the time the pause took effect, the funds were already gone.
The mechanism: precision-sized trades exploiting rounding
Unlike most decentralized exchanges, which rely on Uniswap's established liquidity logic unmodified, Bunni implemented its own Liquidity Distribution Function intended to optimize returns for liquidity providers. The LDF triggers a rebalance whenever token ratios drift meaningfully from their targets.
According to Victor Tran of KyberSwap, the attacker discovered that trades of very specific sizes could manipulate this rebalancing logic, producing incorrect calculations of each LP share's underlying value. By repeating the same maneuver, the attacker was able to withdraw more tokens than they were actually entitled to on each pass, with the error compounding each cycle.
William Li identified a key detail: the attacker had pushed one token balance down to just 25 wei. At that scale, rounding precision collapses and the underlying math produces unreliable results. Notably, the attacker's transactions left over 1,000 log entries, including descriptive markers such as "Depositing to euler" and "Unlock Callback" — effectively documenting their own methodology in public.
Funds movement and on-chain trail
Primary attacker address (both Ethereum and Unichain): 0x0C3d8fA7762Ca5225260039ab2d3990C035B458D (Unichain link).
Attack contract on Ethereum: 0x657D8BcCDD9C6e1Da8DA1e7d331CFdeA8357AdBc. Attack contract on Unichain: 0x6F559f75ba08d7f45a344E12ECBe8BC15A700DdA.
Attack transaction on Ethereum: 0x1c27c4d625429acfc0f97e466eda725fd09ebdc77550e529ba4cbdbc33beb97b. Attack transaction on Unichain: 0x4776f31156501dd456664cd3c91662ac8acc78358b9d4fd79337211eb6a1d451.
Two Ethereum addresses received the consolidated proceeds: 0xe04efd87f410e260cf940a3bcb8bc61f33464f2b and 0x18a0Aa63C07534f69aD626E6F72f20Cbe5969263.
The attack unfolded in two stages. First, $2.4 million was drained from Ethereum's USDC/USDT pool. Then a larger $6 million was taken from Unichain's ETH/weETH pool. Roughly half of the Unichain proceeds were swapped to ETH and bridged to Ethereum in consistent 100 ETH increments, rather than a single large transfer, before settling into the two receiving addresses above.
Audit history raises questions
Bunni had undergone multiple third-party audits prior to the exploit, making the incident a case study in audit scope and timing rather than an absence of security review.
Trail of Bits (January 2025) flagged the underlying issue category directly: finding TOB-BUNNI-13 described a "lack of systematic approach to rounding and arithmetic errors," alongside TOB-BUNNI-9 concerning excess liquidity manipulation. The firm's recommendations called for fixing the rounding behavior and expanding fuzz testing; the codebase continued changing before, during, and after that review.
Pashov Audit Group (August–September 2024) conducted an earlier, broader review that surfaced 45 issues, six of them critical, with further code changes following its completion.

Cyfrin's main audit (June 2025) is central to the story. In response to questions from Rekt News, Cyfrin confirmed it identified more than 50 issues and stated it was "statistically likely that there are more complex bugs still present," recommending a follow-up audit and a more rigorous stateful fuzz-testing suite before deploying significant additional capital. Cyfrin did not catch the specific rounding flaw that was later exploited, but it did flag the general risk that further undiscovered bugs remained. A separate Cyfrin audit in July 2025 covered only fee-override logic and did not examine withdrawal mechanics at all.
Despite Cyfrin's caution against scaling further without additional review, Bunni's TVL grew from $2.4 million to $23.9 million between July 31st and August 1st — immediately following the June audit, and in the opposite direction of what was recommended.
What Bunni's own post-mortem found
According to Bunni's post-mortem, the exploit involved a three-step attack that manipulated small withdrawals to trigger rounding errors, reducing the USDC active balance from 28 wei to 4 wei — an 85.7% decrease disproportionate to the amount of liquidity shares actually burned. Bunni's team acknowledged its existing test coverage — Foundry unit and fuzz tests, plus Medusa fuzz testing — did not cover the specific scenario that was ultimately exploited. In effect, individually reasonable rounding behavior became dangerous once chained together in sequence, precisely the category of risk Cyfrin had warned about months earlier. Cyfrin subsequently published its own technical breakdown of the exploit mechanics after the fact.
Takeaway
Bunni's custom liquidity math, intended as a competitive advantage over stock Uniswap logic, ended up being the exact vulnerability multiple audits had warned could exist somewhere in the system, even though none pinpointed this specific flaw in advance. The episode underscores a recurring pattern in DeFi: protocols that deviate from well-tested designs in pursuit of efficiency gains take on risk that standard testing frameworks may not catch until it's exploited in production.
Get new scam files the moment we publish them — usually 2–3 emails a week.