PancakeBunny Reward Calculation Bug

From Quadriga Initiative Cryptocurrency Hacks, Scams, and Frauds Repository
Jump to navigation Jump to search

Notice: This page is a freshly imported case study from the original repository. The original content was in a different format, and may not have relevant information for all sections. Please help restructure the content by moving information from the 'About' and 'General Prevention' sections to other sections, and add any missing information or sources you can find. If you are new here, please read General Tutorial on Wikis or Anatomy of a Case Study for help getting started.

Notice: This page contains sources which are not attributed to any text. The unattributed sources follow the initial description. Please assist by visiting each source, reviewing the content, and placing that reference next to any text it can be used to support. Feel free to add any information that you come across which isn't present already. Sources which don't contain any relevant information can be removed. Broken links can be replaced with versions from the Internet Archive. See General Tutorial on Wikis, Anatomy of a Case Study, and/or Citing Your Sources Guide for additional information. Thanks for your help!

PancakeBunny

PancakeBunny is a staking platform for crypto-assets. Hackers used the smart contract along with flash loans to manipulate prices, and made $2.4m in profit.

The project has made an effort to reimburse investors and continues to operate.

This is a global/international case not involving a specific country.[1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21]

About PancakeBunny

PancakeBunny is a "DeFi revenue aggregator". Their "Bunny team is dedicated to support the underlying DeFi ecosystem by providing users with an easy way to automatically compound their yields through the Binance Smart Chain. The DeFi movement, and more specifically Yield Aggregators, have seen a huge surge in activity in 2020. The Rise of Yearn, which uses existing protocols such as Compound, DyDx, and Curve, has influenced the development of various other Yield Aggregator projects on the Ethereum Network. [Their] goal is to expand that same interest through the Binance Smart Chain Ecosystem."

"Bunny, like other yield aggregators on BSC, uses Pancake Swap since it is the most prominent platform for Yield Farming. Bunny is continuously striving to create innovative new Yield Optimization Strategies. Currently [they] have BUNNY, CAKE, BUNNY-BNB, CAKE-BNB BUSD-BNB, USDT-BNB, DAI-BNB, USDC-BNB, VAI-BUSD, USDT-BUSD Pools. Furthermore, on [their] website, you can see we have the maximizer vaults. These strategies allow users to get the profits from certain pools and these profits are automatically auto compounded into the CAKE compounding pool, giving users a much greater return, while protecting the principal. We are currently launching our cross chain project, which will allow ETH-BSC cross chain, bringing more ETH users on bsc yield farming as well."

"As many of you are aware, there was an economic exploit of polyBUNNY outside the polygon.pancakebunny.finance platform, resulting in the minting of 2.1M polyBUNNY and a drop in the price of polyBUNNY to just over $2 at Jul-16–2021 07:17:11 PM +UTC." PancakeBunny "tweeted that its version on Polygon was attacked by outsiders and has suspended all Polygon Sushi Vaults. According to officials, Polygon vaults, BSC PancakeBunny vaults, and BUNNY are currently safe. Details will be announced later. The attacker made a profit of 1281 WETH." "2.1 million PolyBunny (polyBUNNY) tokens have been minted, leading to an 82% worth plunge from $10 previous to the exploit, to simply over $2 submit the preliminary harm."

"Two months ago PancakeBunny got rekt on BSC, now the same thing has happened on Polygon. $2.4 million lost. How earitating."

"The attacker made a small deposit in one of [the] Bunny Vaults and at the same time, made a deposit of large value directly to MiniChefV2 (SushiSwap) and then called the function “withdrawAll” to execute the attack with the amount deposited in the MiniChefV2 as interest."

"Chronologically, the attacker made a small deposit ( roughly $19,203) in one of many Bunny Vaults, whereas on the similar time, made a large deposit (roughly $47,990,975) on to SushiSwap, and by calling the “withdrawAll” operate executed the assault with the quantity deposited to SushiSwap as curiosity. By efficiently manipulating the oracle to extend the curiosity, the inflated efficiency charge resulted in minting roughly 2.1 million PolyBunny tokens to the attacker, who at that time repaid Aave’s flash mortgage and exited the assault with about 1,281 Ethereum, in line with the official post mortem."

"The attacker followed the following steps to exploit the polyBUNNY minter: (1) Deposit 0.000000009416941138 SLP (~19,203 USD) into the polygon.pancakebunny USDT-USDC Vault. (2) Deposit 0.000023532935903931 SLP (~47,990,975 USD) to the USDT-USDC MiniChefV2 contract on SushiSwap. (3) This generated a performance fee of 0.000007006743943544 SLP (~14,284,950 USD) and minted 2.1 million polyBUNNY to the attacker. (4) Dump polyBUNNY for WETH. (5) Repay AAVE’s flashloan and exit the attack, gaining 1,281.702952074137533313 ETH."


"They say there’s a plan to compensate their users, so it seems they’re not ready to give up yet." "Everyone who held polyBUNNY at the time of the exploit, including polyBUNNY-ETH and polyBUNNY-QUICK, is eligible to participate in the Compensation program. This means that the Team will verify all of the wallet addresses that held polyBUNNy (whether in token form or as part of an LP pair) during the exploited block." "Everyone who held polyBUNNY at the time of the exploit will receive MND tokens from the Team’s share of MND." "Team Bunny will distribute a total of $2.4M in MND tokens as total compensation to polyBUNNY holders. This amount corresponds to the amount that was exploited by the attacker. The number of MND tokens you will receive depends on the price of MND. Suppose the final value (i.e. the total value of assets committed to the Vault by 26 July) in the Mound (MND) Vault is $50M and 1M MND is minted. Then each MND would be worth $50, and all of the polyBUNNY holders would receive 2.4M/50 = 48,000 MND in total. And you would get a number proportional to the size of your bag of polyBUNNY vs. the total number of polyBUNNY prior to the exploit."

"Following the exploit, the staff introduced it has “revised its protocols to maximise safety for the launch of latest merchandise,” whereas publishing particulars on the Qubit lending protocol launch course of and the Mound (MND) Vault replace." "All vaults on Polygon.PancakeBunny have been rendered safe. The vulnerability that allowed for this mishap has been addressed and the Sushi Vaults, where the issue occurred, has been reopened."

"As ever, Bunny Fam, we remain profoundly grateful for your trust and support. We deeply regret this incident, and will do our best to restore the upward trajectory of polyBUNNY."

This is a global/international case not involving a specific country.

The background of the exchange platform, service, or individuals involved, as it would have been seen or understood at the time of the events.

Include:

  • Known history of when and how the service was started.
  • What problems does the company or service claim to solve?
  • What marketing materials were used by the firm or business?
  • Audits performed, and excerpts that may have been included.
  • Business registration documents shown (fake or legitimate).
  • How were people recruited to participate?
  • Public warnings and announcements prior to the event.

Don't Include:

  • Any wording which directly states or implies that the business is/was illegitimate, or that a vulnerability existed.
  • Anything that wasn't reasonably knowable at the time of the event.

There could be more than one section here. If the same platform is involved with multiple incidents, then it can be linked to a main article page.

The Reality

This sections is included if a case involved deception or information that was unknown at the time. Examples include:

  • When the service was actually started (if different than the "official story").
  • Who actually ran a service and their own personal history.
  • How the service was structured behind the scenes. (For example, there was no "trading bot".)
  • Details of what audits reported and how vulnerabilities were missed during auditing.

What Happened

The specific events of the loss and how it came about. What actually happened to cause the loss and some of the events leading up to it.

Key Event Timeline - PancakeBunny Reward Calculation Bug
Date Event Description
July 16th, 2021 Main Event Expand this into a brief description of what happened and the impact. If multiple lines are necessary, add them here.
July 19th, 2021 11:18:00 PM MDT BeInCrypto Article Published The situation is reported on by BeInCrypto[22]. TBD more description.
July 20th, 2021 6:04:20 AM MDT CoinCu News Article Published The situation is reported on by CoinCu News[23]. TBD more description.
August 20th, 2021 12:49:44 AM MDT Qubit Launch PancakePunny launches the Qubit (unrelated?)[24]
August 25th, 2021 8:48:28 PM MDT ImmuneFi Bug Bounty Announced PancakeBunny announces the launch of a bug bounty program through ImmuneFi[25]. TBD more details.
August 26th, 2021 6:40:09 PM MDT PolyBunny Pool Relaunching The PancakeBunny team announces the "reboot" of the bunny pool. "It remains the goal of Team Bunny to return to the original tokenomics of the Bunny Distribution-as-Community Profit Share as soon as possible."[26] TBD fill in more of this.

Technical Details

This section includes specific detailed technical analysis of any security breaches which happened. What specific software vulnerabilities contributed to the problem and how were they exploited?

Total Amount Lost

The total amount lost has been estimated at $2,402,000 USD.

How much was lost and how was it calculated? If there are conflicting reports, which are accurate and where does the discrepancy lie?

Immediate Reactions

How did the various parties involved (firm, platform, management, and/or affected individual(s)) deal with the events? Were services shut down? Were announcements made? Were groups formed?


[27][28][29]

Ultimate Outcome

What was the end result? Was any investigation done? Were any individuals prosecuted? Was there a lawsuit? Was any tracing done?

ImmuneFi Bug Bounty Program

[25]

Relaunch of Bunny Pool

The team ultimately relaunched the bunny pool[26].

Total Amount Recovered

There do not appear to have been any funds recovered in this case.

What funds were recovered? What funds were reimbursed for those affected users?

Ongoing Developments

What parts of this case are still remaining to be concluded?

General Prevention Policies

While decentralized finance is made progressively more secure after learning from each attack, the most secure way of storing cryptoassets continues to be offline multi-signature wallets with keys held by reputable people.

Individual Prevention Policies

Avoid the use of smart contracts unless necessary. Minimize the level of exposure by removing or withdrawing assets whenever possible. Aim to choose smart contracts which have obtained third party security audits, preferably having been audited by at least three separate reputable firms. Pay attention to the audit reports, which smart contracts are covered, and whether the smart contract has been upgraded or modified since the report. Ensure that any administrative functions with the ability to remove funds from the smart contract are under the authority of a multi-signature wallet which is controlled by at least three separate and reputable entities.

For the full list of how to protect your funds as an individual, check our Prevention Policies for Individuals guide.

Platform Prevention Policies

All aspects of any platform should undergo a regular validation/inspection by experts. This validation should include a security audit of any smart contracts, reporting any risks to the backing (of any customer assets, ensuring treasuries or minting functions are properly secured under the control of a multi-signature wallet, and finding any inadequacies in the level of training or integrity of the team. The recommended interval is twice prior to launch or significant system upgrade, once after 3 months, and every 6 months thereafter. It is recommended that the third party performing the inspection not be repeated within a 14 month period.

For the full list of how to protect your funds as a financial service, check our Prevention Policies for Platforms guide.

Regulatory Prevention Policies

All platforms should undergo published security and risk assessments by independent third parties. Two assessments are required at founding or major upgrade, one after 3 months, and one every 6 months thereafter. The third parties must not repeat within the past 14 months. A risk assessment needs to include what assets back customer deposits and the risk of default from any third parties being lent to. The security assessment must include ensuring a proper multi-signature wallet, and that all signatories are properly trained. Assessments must be performed on social media, databases, and DNS security.

For the full list of regulatory policies that can prevent loss, check our Prevention Policies for Regulators guide.

References

  1. SlowMist Hacked - SlowMist Zone (May 18, 2021)
  2. Rekt - PancakeBunny - REKT 2 (Jul 30, 2021)
  3. blocksec-incidents/2021.md at main · openblocksec/blocksec-incidents · GitHub (Aug 11, 2021)
  4. Polybunny Post Mortem Compensation (Aug 11, 2021)
  5. Introduction — PancakeBunny Docs documentation (Jun 2, 2021)
  6. Address 0xa6021d8c36b2de6ceb4fe281b89d37d2be321431 | PolygonScan (Aug 27, 2021)
  7. Polygon Transaction Hash (Txhash) Details | PolygonScan (Aug 27, 2021)
  8. @RektHQ Twitter (Aug 27, 2021)
  9. Ethereum Transaction Hash (Txhash) Details | Etherscan (Aug 27, 2021)
  10. VaultSushiFlipToFlip.sol - Diff Checker (Aug 27, 2021)
  11. PancakeBunny Hit With Another Flash Loan Exploit, This Time on Polygon (Aug 27, 2021)
  12. BSC DeFi app 'Pancakebunny' releases post-mortem of $2.4 million exploit - Crypto News BTC (Aug 27, 2021)
  13. @PancakeBunnyFin Twitter (Aug 27, 2021)
  14. @PancakeBunnyFin Twitter (Aug 27, 2021)
  15. Updates From Devs Qubit Launch Mound Vault (Aug 27, 2021)
  16. Prioritizing Security Multi Layer Code Review With Immunefi (May 7, 2022)
  17. Mnd Week 4 Final Days To Swap Bunny For Mnd (May 7, 2022)
  18. https://pancakebunny.medium.com/polybunny-recovery-the-burn-and-mnd-compensation-1318ffc5986 (May 7, 2022)
  19. Polybunny Pbunny Mnd Compensation (May 7, 2022)
  20. Pbunny Pool Update (May 7, 2022)
  21. Bunny Reward Pool Updates Profit Sharing Next Steps (May 7, 2022)
  22. PolyBunny Finance Releases $2.4M DeFi Attack Post Mortem Report - BeInCrypto (May 18, 2023)
  23. PolyBunny Finance explains the latest hack and a $ 2.4 million compensation plan - CoinCu News (May 18, 2023)
  24. Qubit Launch Get Ready For Liftoff - PancakeBunny Medium (May 7, 2022)
  25. 25.0 25.1 Pancakebunny Announces Immunefi Bounty Awards - PancakeBunny Medium (May 7, 2022)
  26. 26.0 26.1 Bunny Pool Reboot - PancakeBunny Medium (May 7, 2022)
  27. With polybunny getting "exploited": can someone let me know the next time a bunny project is going to wreck me? It's getting really old. : pancakeswap (May 18, 2023)
  28. With polybunny getting "exploited": can someone let me know the next time a bunny project is going to wreck me? It's getting really old. : pancakeswap (May 18, 2023)
  29. BetItAllJonny comments on With polybunny getting "exploited": can someone let me know the next time a bunny project is going to wreck me? It's getting really old. (Oct 2, 2022)