{"investigation":{"slug":"bunni-v2","entity_name":"Bunni V2","trust_score":10,"severity_base":null,"score_modifier":0,"confidence":0.92,"status":"published","content_type":"investigation","summary":"Bunni V2 was a decentralized exchange and liquidity layer built on Uniswap v4, developed by Timeless Finance. On September 1-2, 2025, the protocol suffered a critical exploit draining approximately $8.4 million across Ethereum and Unichain through a rounding-direction vulnerability in its withdrawal mechanism. The team permanently shut down the protocol on October 23, 2025, citing inability to finance a secure relaunch after the exploit erased 97% of TVL.","sections":[{"content":"On September 1-2, 2025, an attacker exploited a precision vulnerability in Bunni V2's BunniHubLogic::withdraw() function, draining approximately $8.4 million from two liquidity pools: the USDC/USDT pool on Ethereum (approximately $2.3-2.4 million) and the ETH/weETH pool on Unichain (approximately $6 million). The exploit required no oracle manipulation; instead, the attacker used flash loans — 3 million USDT from Uniswap v3 on Ethereum and 2,000 WETH from Morpho on Unichain — as working capital for a three-phase attack. In the first phase, the attacker executed precisely sized swaps to manipulate the pool's spot price. In the second phase, the attacker performed 44 sequential tiny withdrawals that exploited cumulative rounding errors in the idle balance calculation, reducing the pool's active USDC balance from 28 wei to 4 wei — an 85.7% reduction while burning only a minimal number of LP shares. In the third phase, with liquidity artificially suppressed, the attacker executed a sandwich attack, profiting from the distorted price before repaying flash loans. The spot price tick was pushed to 5000 (1 USDC = 1.68 USDT) during the attack. BlockSec flagged suspicious transactions on Ethereum, and approximately one hour later CertiK identified the same exploit pattern on Unichain. Bunni paused all smart contract functions approximately two hours after the initial alert. The protocol confirmed only two pools were compromised four hours into the incident.","heading":"The September 2025 Exploit","sources":[{"url":"https://rekt.news/bunni-rekt","name":"rekt.news","type":"other","credibility":3},{"url":"https://www.quillaudits.com/blog/hack-analysis/bunni-v2-exploit","name":"quillaudits.com","type":"other","credibility":3},{"url":"https://www.coindesk.com/business/2025/10/23/bunni-dex-shuts-down-cites-recovery-costs-after-usd8-4m-exploit","name":"coindesk.com","type":"other","credibility":3},{"url":"https://decrypt.co/345621/decentralized-exchange-bunni-pulls-the-plug-following-8-4m-flash-loan-exploit","name":"decrypt.co","type":"other","credibility":3},{"url":"https://cryptonews.com/news/bunni-hit-by-8-4m-flash-loan-exploit-rounding-error-blamed/","name":"cryptonews.com","type":"other","credibility":3}],"severity":"medium"},{"content":"The vulnerability originated in Bunni V2's custom Liquidity Distribution Function (LDF), an architectural component that distinguished Bunni from standard Uniswap v4 pool mechanics. Specifically, the BunniHubLogic::withdraw() function used rounding-down logic during withdrawal calculations under the assumption that underestimating liquidity would favor pool safety. However, this assumption failed when an attacker executed many small withdrawals in sequence, causing rounding errors to compound disproportionately and allowing more tokens to be withdrawn than mathematically justified. The protocol acknowledged this in its post-mortem, stating that its Foundry unit tests, fuzz tests, and Medusa fuzz tests did not cover the specific scenario that was exploited. Independent security researchers characterized the flaw as a logic-level vulnerability rather than a pure implementation error — a class of bug that is historically difficult to detect through standard audit techniques alone.","heading":"Root Cause: Rounding Vulnerability in Liquidity Accounting","sources":[{"url":"https://rekt.news/bunni-rekt","name":"rekt.news","type":"other","credibility":3},{"url":"https://www.quillaudits.com/blog/hack-analysis/bunni-v2-exploit","name":"quillaudits.com","type":"other","credibility":3},{"url":"https://quillaudits.medium.com/bunni-v2-exploit-8-3m-drained-50acbdcd9e7b","name":"quillaudits.medium.com","type":"other","credibility":3},{"url":"https://www.resonance.security/blog-posts/bunni-dex-hack-when-custom-liquidity-logic-pays-out-fantasy-money","name":"resonance.security","type":"other","credibility":3}],"severity":"medium"},{"content":"Bunni V2 underwent multiple professional security audits prior to the exploit, yet none caught the specific vulnerability that was ultimately exploited. Pashov Audit Group conducted a review in August-September 2024 and identified 45 issues including 6 critical findings. Trail of Bits conducted a review in January 2025 and explicitly flagged rounding and arithmetic risks: finding TOB-BUNNI-13 identified a 'lack of systematic approach to rounding and arithmetic errors' and finding TOB-BUNNI-9 identified excess liquidity manipulation concerns. Trail of Bits reportedly advised the team to fix their rounding logic and add more fuzzing coverage. Cyfrin conducted a main audit in June 2025 — one of approximately 50+ issues identified — and issued a direct warning stating: 'Considering the number of issues identified, it is statistically likely that there are more complex bugs still present... it is recommended that a follow-up audit and development of a more complex stateful fuzz test suite be undertaken prior to continuing to deploy significant capital.' Despite this warning, TVL surged from $2.4 million to $23.9 million between July 31 and August 1, 2025, immediately following Cyfrin's audit publication. TVL continued growing to a peak of approximately $80 million by August 19, 2025. A limited-scope Cyfrin audit of the Fee Hooklet in July 2025 explicitly excluded withdrawal logic from its scope — the component that was subsequently exploited.","heading":"Audit History and Pre-Exploit Warnings","sources":[{"url":"https://rekt.news/bunni-rekt","name":"rekt.news","type":"other","credibility":3},{"url":"https://docs.bunni.xyz/docs/v2/audits/","name":"docs.bunni.xyz","type":"other","credibility":3},{"url":"https://solodit.cyfrin.io/issues/dirty-bits-of-narrow-types-are-not-cleaned-trailofbits-none-bunni-v2-pdf","name":"solodit.cyfrin.io","type":"other","credibility":3},{"url":"https://www.quillaudits.com/blog/hack-analysis/bunni-v2-exploit","name":"quillaudits.com","type":"other","credibility":3}],"severity":"medium"},{"content":"Following the exploit, the attacker's primary address (0x0C3d8fA7762Ca5225260039ab2d3990C035B458D) was identified by on-chain investigators as responsible for activity on both Ethereum and Unichain. Attack contracts deployed were: 0x657D8BcCDD9C6e1Da8DA1e7d331CFdeA8357AdBc on Ethereum and 0x6F559f75ba08d7f45a344E12ECBe8BC15A700DdA on Unichain. Stolen funds were consolidated into two Ethereum receiving wallets (0xe04efd87f410e260cf940a3bcb8bc61f33464f2b and 0x18a0Aa63C07534f69aD626E6F72f20Cbe5969263). Portions of the stolen ETH — bridged from Unichain via Across Protocol in methodical 100 ETH increments — were deposited into Aave as aTokens. According to reporting by security researchers, the attacker's funding wallets were traced to Tornado Cash, severely hampering identification of the perpetrator. As of October 2025, the Bunni team confirmed it had offered a 10% recovery bounty to the attacker, which was rejected. The team stated it was working with law enforcement and cooperating with centralized exchanges to freeze accounts linked to the attacker's wallets. Approximately $2.2 million reportedly remained in the attacker's EOA as of post-incident analysis.","heading":"Stolen Funds and Recovery Efforts","sources":[{"url":"https://rekt.news/bunni-rekt","name":"rekt.news","type":"other","credibility":3},{"url":"https://www.coindesk.com/business/2025/10/23/bunni-dex-shuts-down-cites-recovery-costs-after-usd8-4m-exploit","name":"coindesk.com","type":"other","credibility":3},{"url":"https://www.quillaudits.com/blog/hack-analysis/bunni-v2-exploit","name":"quillaudits.com","type":"other","credibility":3},{"url":"https://decrypt.co/345621/decentralized-exchange-bunni-pulls-the-plug-following-8-4m-flash-loan-exploit","name":"decrypt.co","type":"other","credibility":3}],"severity":"medium"},{"content":"On October 23, 2025, the Bunni team announced the permanent shutdown of the protocol via its official X (formerly Twitter) account. The team stated that a secure relaunch would require six to seven figures in audit and monitoring costs alone, plus months of additional development and business development effort they could not afford. TVL declined from approximately $50.82 million at the time of the exploit to $1.3 million within one month — a 97.44% collapse. The wind-down plan included: maintaining withdrawal access for remaining liquidity providers; distributing approximately $2 million in remaining treasury funds to BUNNI, LIT, and veBUNNI token holders (explicitly excluding the team); deactivating all front-end interfaces and support channels; and open-sourcing V2 smart contracts under the MIT license (relicensed from BUSL). The team noted they had 'spent years of our lives and millions of dollars to launch Bunni.' The shutdown was the second such crypto project closure in the same week in October 2025, occurring days after the Kadena Organization collapse.","heading":"Protocol Shutdown and Wind-Down","sources":[{"url":"https://www.coindesk.com/business/2025/10/23/bunni-dex-shuts-down-cites-recovery-costs-after-usd8-4m-exploit","name":"coindesk.com","type":"other","credibility":3},{"url":"https://decrypt.co/345621/decentralized-exchange-bunni-pulls-the-plug-following-8-4m-flash-loan-exploit","name":"decrypt.co","type":"other","credibility":3},{"url":"https://beincrypto.com/bunni-shutdown-defi-hack/","name":"beincrypto.com","type":"other","credibility":3},{"url":"https://en.coinotag.com/bunni-dex-winds-down-after-8-4m-exploit-open-sources-v2-contracts-under-mit/","name":"en.coinotag.com","type":"other","credibility":3}],"severity":"medium"},{"content":"Bunni V2 was developed by Timeless Finance, the team also responsible for the Timeless yield tokenization protocol. Bunni V2 was positioned as the leading Uniswap v4 hook — a shapeshifting DEX designed to maximize liquidity provider yields via dynamic, automated pools. Its distinguishing architectural feature was the Liquidity Distribution Function (LDF), which enabled autonomous liquidity rebalancing and combined swap fees with lending yields. Bunni V2 was deployed on both Ethereum mainnet and Unichain, Uniswap Labs' Layer 2 network. At peak, the protocol managed approximately $80 million in TVL. The same LDF mechanism that defined Bunni V2's value proposition became the attack surface for the September 2025 exploit. Following shutdown, the team open-sourced the V2 contracts under MIT license to allow other developers to build upon innovations including surge fees, LDFs, and autonomous rebalancing.","heading":"Protocol Background and Technology","sources":[{"url":"https://github.com/Bunniapp/bunni-v2","name":"github.com","type":"other","credibility":3},{"url":"https://bunni.pro/","name":"bunni.pro","type":"other","credibility":3},{"url":"https://defillama.com/protocol/bunni-v2","name":"defillama.com","type":"other","credibility":3},{"url":"https://www.bankless.com/read/bunni-v2-liquidity","name":"bankless.com","type":"other","credibility":3}],"severity":"medium"},{"content":"The Bunni V2 exploit occurred in September 2025, during a month in which the crypto industry recorded approximately $127 million in losses across 20 large-scale attacks. Security researchers cited Bunni as a cautionary example of the risks of deploying novel custom liquidity logic — particularly hooks and LDF-style mechanisms — in Uniswap v4 without exhaustive stateful fuzzing coverage. Multiple analysts noted that the exploit did not require flash loans in the traditional sense for the core precision manipulation; flash loans were used as cost-efficient capital for the surrounding sandwich trades. The case highlighted the gap between passing traditional code audits and achieving real-world security for complex algorithmic market-making logic. The exploit also demonstrated the risk of rapidly scaling capital into a protocol immediately following an audit that explicitly warned against such scaling — a pattern that Cyfrin's June 2025 audit report had directly cautioned against.","heading":"Broader DeFi Context and Lessons","sources":[{"url":"https://getfailsafe.com/bunni-hack-liquidity-risks","name":"getfailsafe.com","type":"other","credibility":3},{"url":"https://www.halborn.com/blog/post/explained-the-bunni-hack-september-2025","name":"halborn.com","type":"other","credibility":3},{"url":"https://www.dynamisllp.com/knowledge/bunni-dex-hack-lessons-learned","name":"dynamisllp.com","type":"other","credibility":3},{"url":"https://www.onesafe.io/blog/bunni-defi-exploit-security-lessons","name":"onesafe.io","type":"other","credibility":3}],"severity":"medium"}],"timeline":[{"date":"2024-08","event":"Pashov Audit Group conducts security review of Bunni V2, identifying 45 issues including 6 critical findings.","source":"","date_original":"2024-08-01"},{"date":"2025","event":"Trail of Bits completes audit of Bunni V2, explicitly flagging rounding and arithmetic error risks (findings TOB-BUNNI-13 and TOB-BUNNI-9) and recommending additional fuzzing.","source":"","date_original":"2025-01-01"},{"date":"2025-06","event":"Cyfrin completes main audit of Bunni V2, identifying 50+ issues and recommending against deploying significant capital without a follow-up audit and stateful fuzzing suite.","source":"","date_original":"2025-06-01"},{"date":"2025-07-31","event":"TVL surges from $2.4 million to $23.9 million immediately following publication of Cyfrin's audit, despite explicit warnings against scaling.","source":""},{"date":"2025-08-19","event":"Bunni V2 TVL reaches peak of approximately $80 million.","source":""},{"date":"2025-09","event":"Exploit begins. Attacker (primary address: 0x0C3d8fA7762Ca5225260039ab2d3990C035B458D) drains USDC/USDT pool on Ethereum (~$2.4M) and ETH/weETH pool on Unichain (~$6M) via rounding vulnerability in BunniHubLogic::withdraw(). BlockSec alerts the team; CertiK identifies the Unichain component approximately one hour later.","source":"","date_original":"2025-09-01"},{"date":"2025-09","event":"Bunni pauses all smart contract functions approximately two hours after the initial BlockSec alert. Stolen ETH begins bridging from Unichain to Ethereum via Across Protocol in 100 ETH increments.","source":"","date_original":"2025-09-01"},{"date":"2025-09-02","event":"Bunni confirms only two pools were compromised. Team offers attacker a 10% recovery bounty; offer is rejected. Stolen funds traced to Tornado Cash-funded wallets, preventing identity attribution.","source":""},{"date":"2025-10-23","event":"Bunni announces permanent shutdown. Team cites inability to afford 'six to seven figures' in relaunch costs. TVL had fallen 97.44% from $50.82M to $1.3M in the intervening month.","source":""},{"date":"2025-10-23","event":"Bunni open-sources V2 smart contracts under MIT license. Team states it will distribute approximately $2 million in remaining treasury to BUNNI, LIT, and veBUNNI token holders (excluding team).","source":""}],"sources_used":[{"url":"https://rekt.news/bunni-rekt","name":"rekt.news","type":"other","archive_url":"http://web.archive.org/web/20260812220754/https://rekt.news/bunni-rekt","credibility":3,"archive_timestamp":"2026-08-12T22:07:54+00:00"},{"url":"https://www.quillaudits.com/blog/hack-analysis/bunni-v2-exploit","name":"quillaudits.com","type":"other","archive_url":"http://web.archive.org/web/20260626164058/https://www.quillaudits.com/blog/hack-analysis/bunni-v2-exploit","credibility":3,"archive_timestamp":"2026-06-26T16:40:58+00:00"},{"url":"https://www.coindesk.com/business/2025/10/23/bunni-dex-shuts-down-cites-recovery-costs-after-usd8-4m-exploit","name":"coindesk.com","type":"other","archive_url":"http://web.archive.org/web/20251103212747/https://www.coindesk.com/business/2025/10/23/bunni-dex-shuts-down-cites-recovery-costs-after-usd8-4m-exploit","credibility":3,"archive_timestamp":"2025-11-03T21:27:47+00:00"},{"url":"https://decrypt.co/345621/decentralized-exchange-bunni-pulls-the-plug-following-8-4m-flash-loan-exploit","name":"decrypt.co","type":"other","archive_url":"http://web.archive.org/web/20260812220745/https://decrypt.co/345621/decentralized-exchange-bunni-pulls-the-plug-following-8-4m-flash-loan-exploit","credibility":3,"archive_timestamp":"2026-08-12T22:07:45+00:00"},{"url":"https://cryptonews.com/news/bunni-hit-by-8-4m-flash-loan-exploit-rounding-error-blamed/","name":"cryptonews.com","type":"other","archive_url":"http://web.archive.org/web/20250905123850/https://cryptonews.com/news/bunni-hit-by-8-4m-flash-loan-exploit-rounding-error-blamed/","credibility":3,"archive_timestamp":"2025-09-05T12:38:50+00:00"},{"url":"https://quillaudits.medium.com/bunni-v2-exploit-8-3m-drained-50acbdcd9e7b","name":"quillaudits.medium.com","type":"other","archive_url":"http://web.archive.org/web/20251017175403/https://quillaudits.medium.com/bunni-v2-exploit-8-3m-drained-50acbdcd9e7b","credibility":3,"archive_timestamp":"2025-10-17T17:54:03+00:00"},{"url":"https://www.resonance.security/blog-posts/bunni-dex-hack-when-custom-liquidity-logic-pays-out-fantasy-money","name":"resonance.security","type":"other","archive_url":"http://web.archive.org/web/20260412022603/https://www.resonance.security/blog-posts/bunni-dex-hack-when-custom-liquidity-logic-pays-out-fantasy-money","credibility":3,"archive_timestamp":"2026-04-12T02:26:03+00:00"},{"url":"https://docs.bunni.xyz/docs/v2/audits/","name":"docs.bunni.xyz","type":"other","archive_url":"https://web.archive.org/web/20260829031942/https://docs.bunni.xyz/docs/v2/audits/","credibility":3,"archive_timestamp":"2026-08-29T03:19:42+00:00"},{"url":"https://solodit.cyfrin.io/issues/dirty-bits-of-narrow-types-are-not-cleaned-trailofbits-none-bunni-v2-pdf","name":"solodit.cyfrin.io","type":"other","archive_url":"https://web.archive.org/web/20260829041510/https://solodit.cyfrin.io/issues/dirty-bits-of-narrow-types-are-not-cleaned-trailofbits-none-bunni-v2-pdf","credibility":3,"archive_timestamp":"2026-08-29T04:15:10+00:00"},{"url":"https://beincrypto.com/bunni-shutdown-defi-hack/","name":"beincrypto.com","type":"other","archive_url":"http://web.archive.org/web/20251023093745/https://beincrypto.com/bunni-shutdown-defi-hack/","credibility":3,"archive_timestamp":"2025-10-23T09:37:45+00:00"},{"url":"https://en.coinotag.com/bunni-dex-winds-down-after-8-4m-exploit-open-sources-v2-contracts-under-mit/","name":"en.coinotag.com","type":"other","archive_url":"http://web.archive.org/web/20251023102637/https://en.coinotag.com/bunni-dex-winds-down-after-8-4m-exploit-open-sources-v2-contracts-under-mit/","credibility":3,"archive_timestamp":"2025-10-23T10:26:37+00:00"},{"url":"https://github.com/Bunniapp/bunni-v2","name":"github.com","type":"other","archive_url":"http://web.archive.org/web/20250913141244/https://github.com/Bunniapp/bunni-v2","credibility":3,"archive_timestamp":"2025-09-13T14:12:44+00:00"},{"url":"https://bunni.pro/","name":"bunni.pro","type":"other","archive_url":"http://web.archive.org/web/20260421035036/https://bunni.pro/","credibility":3,"archive_timestamp":"2026-04-21T03:50:36+00:00"},{"url":"https://defillama.com/protocol/bunni-v2","name":"defillama.com","type":"other","archive_url":null,"credibility":3,"archive_error":"error:no-request","archive_status":"unarchivable","archive_timestamp":null},{"url":"https://www.bankless.com/read/bunni-v2-liquidity","name":"bankless.com","type":"other","archive_url":"http://web.archive.org/web/20260317033344/https://www.bankless.com/read/bunni-v2-liquidity","credibility":3,"archive_timestamp":"2026-03-17T03:33:44+00:00"},{"url":"https://getfailsafe.com/bunni-hack-liquidity-risks","name":"getfailsafe.com","type":"other","archive_url":"http://web.archive.org/web/20260521165507/https://getfailsafe.com/bunni-hack-liquidity-risks","credibility":3,"archive_timestamp":"2026-05-21T16:55:07+00:00"},{"url":"https://www.halborn.com/blog/post/explained-the-bunni-hack-september-2025","name":"halborn.com","type":"other","archive_url":"http://web.archive.org/web/20260414124215/https://www.halborn.com/blog/post/explained-the-bunni-hack-september-2025","credibility":3,"archive_timestamp":"2026-04-14T12:42:15+00:00"},{"url":"https://www.dynamisllp.com/knowledge/bunni-dex-hack-lessons-learned","name":"dynamisllp.com","type":"other","archive_url":"https://web.archive.org/web/20260829050050/https://www.dynamisllp.com/knowledge/bunni-dex-hack-lessons-learned","credibility":3,"archive_timestamp":"2026-08-29T05:00:50+00:00"},{"url":"https://www.onesafe.io/blog/bunni-defi-exploit-security-lessons","name":"onesafe.io","type":"other","archive_url":"https://web.archive.org/web/20260830073507/https://www.onesafe.io/blog","credibility":3,"archive_timestamp":"2026-08-30T07:35:07+00:00"}],"source_tags":["defillama"],"addresses":[],"reviewed":false,"reviewed_by":null,"model_used":"claude-sonnet-4-6","created_at":"2026-05-04T02:54:15.958055+00:00","updated_at":"2026-08-30T07:44:37.29385+00:00"}}