Mushroom Finance Yield Manipulation Theft: Difference between revisions

From Quadriga Initiative Cryptocurrency Hacks, Scams, and Frauds Repository
Jump to navigation Jump to search
(Created page with "{{Imported Case Study|source=https://www.quadrigainitiative.com/casestudy/mushroomfinanceyieldmanipulationtheft.php}} thumb|Mushroom FinanceDespite two audits, Mushroom Finance still had a smart contract error which allowed a malicious actor to steal some of the yield. This did not appear to take any user funds, but rather reduced the profitability slightly. The error was corrected with minimal exploit and a bug bounty paid. This is a glob...")
 
No edit summary
Line 1: Line 1:
{{Imported Case Study|source=https://www.quadrigainitiative.com/casestudy/mushroomfinanceyieldmanipulationtheft.php}}
{{Imported Case Study|source=https://www.quadrigainitiative.com/casestudy/mushroomfinanceyieldmanipulationtheft.php}}
{{Unattributed Sources}}


[[File:Mushroomfinance.jpg|thumb|Mushroom Finance]]Despite two audits, Mushroom Finance still had a smart contract error which allowed a malicious actor to steal some of the yield. This did not appear to take any user funds, but rather reduced the profitability slightly.
[[File:Mushroomfinance.jpg|thumb|Mushroom Finance]]Despite two audits, Mushroom Finance still had a smart contract error which allowed a malicious actor to steal some of the yield. This did not appear to take any user funds, but rather reduced the profitability slightly.
Line 6: Line 7:


This is a global/international case not involving a specific country.
This is a global/international case not involving a specific country.
<ref name="openzeppelinforum-1155" /><ref name="immunefimedium-1930" /><ref name="mushroomsfinance-1931" /><ref name="immunefi-1932" /><ref name="coinfabrikblog-1933" /><ref name="mushroomsforestgithub-1934" /><ref name="github-739" /><ref name="mushroomsforestgithub-1935" /><ref name="reddit-1936" />


== About Mushroom Finance ==
== About Mushroom Finance ==
Line 80: Line 82:


== Total Amount Recovered ==
== Total Amount Recovered ==
The total amount recovered has been estimated at $0 USD.
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?
What funds were recovered? What funds were reimbursed for those affected users?
Line 91: Line 93:


== References ==
== References ==
[https://forum.openzeppelin.com/t/list-of-ethereum-smart-contracts-post-mortems/1191 List of Ethereum Smart Contracts Post-Mortems - Security - OpenZeppelin Community] (Jun 22)
<references><ref name="openzeppelinforum-1155">[https://forum.openzeppelin.com/t/list-of-ethereum-smart-contracts-post-mortems/1191 List of Ethereum Smart Contracts Post-Mortems - Security - OpenZeppelin Community] (Jun 22, 2021)</ref>


[https://medium.com/immunefi/mushrooms-finance-theft-of-yield-bug-fix-postmortem-16bd6961388f Mushrooms Finance Theft Of Yield Bug Fix Postmortem] (Jun 21)
<ref name="immunefimedium-1930">[https://medium.com/immunefi/mushrooms-finance-theft-of-yield-bug-fix-postmortem-16bd6961388f Mushrooms Finance Theft Of Yield Bug Fix Postmortem] (Jun 21, 2021)</ref>


[https://mushrooms.finance/ Mushrooms] (Jul 27)
<ref name="mushroomsfinance-1931">[https://mushrooms.finance/ Mushrooms] (Jul 27, 2021)</ref>


[https://immunefi.com/bounty/mushroomsfinance/ Mushrooms Finance Bug Bounties | Immunefi] (Jul 27)
<ref name="immunefi-1932">[https://immunefi.com/bounty/mushroomsfinance/ Mushrooms Finance Bug Bounties | Immunefi] (Jul 27, 2021)</ref>


[https://blog.coinfabrik.com/mushroom-finance-smart-contract-audit/ Mushroom Finance Smart Contract Audit - CoinFabrik Blog] (Jul 27)
<ref name="coinfabrikblog-1933">[https://blog.coinfabrik.com/mushroom-finance-smart-contract-audit/ Mushroom Finance Smart Contract Audit - CoinFabrik Blog] (Jul 27, 2021)</ref>


[https://github.com/mushroomsforest/deployment/blob/main/security.md deployment/security.md at main · mushroomsforest/deployment · GitHub] (Jul 27)
<ref name="mushroomsforestgithub-1934">[https://github.com/mushroomsforest/deployment/blob/main/security.md deployment/security.md at main · mushroomsforest/deployment · GitHub] (Jul 27, 2021)</ref>


[https://github.com/peckshield/publications/blob/master/audit_reports/peckshield-audit-report-btdotfinance-v1.0.pdf publications/peckshield-audit-report-btdotfinance-v1.0.pdf at master · peckshield/publications · GitHub] (May 18)
<ref name="github-739">[https://github.com/peckshield/publications/blob/master/audit_reports/peckshield-audit-report-btdotfinance-v1.0.pdf publications/peckshield-audit-report-btdotfinance-v1.0.pdf at master · peckshield/publications · GitHub] (May 18, 2021)</ref>


[https://github.com/mushroomsforest/deployment/blob/main/audits/Mushrooms%20Finance%20audit-dedaub.pdf deployment/Mushrooms Finance audit-dedaub.pdf at main · mushroomsforest/deployment · GitHub] (Jul 27)
<ref name="mushroomsforestgithub-1935">[https://github.com/mushroomsforest/deployment/blob/main/audits/Mushrooms%20Finance%20audit-dedaub.pdf deployment/Mushrooms Finance audit-dedaub.pdf at main · mushroomsforest/deployment · GitHub] (Jul 27, 2021)</ref>


[https://www.reddit.com/r/CryptoMoonShots/comments/ld3kh2/mm_mushroomsfinance_26mil_market_cap/ $MM - Mushrooms.finance ($2.6mil market cap) : CryptoMoonShots] (Jul 27)
<ref name="reddit-1936">[https://www.reddit.com/r/CryptoMoonShots/comments/ld3kh2/mm_mushroomsfinance_26mil_market_cap/ $MM - Mushrooms.finance ($2.6mil market cap) : CryptoMoonShots] (Jul 27, 2021)</ref></references>

Revision as of 11:31, 22 February 2023

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' section 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!

Mushroom Finance

Despite two audits, Mushroom Finance still had a smart contract error which allowed a malicious actor to steal some of the yield. This did not appear to take any user funds, but rather reduced the profitability slightly.

The error was corrected with minimal exploit and a bug bounty paid.

This is a global/international case not involving a specific country. [1][2][3][4][5][6][7][8][9]

About Mushroom Finance

"Mushrooms Finance smart contracts out of inspiration from popular DeFi projects like Yearn Finance (YFI) Pickle Finance and Sushiswap among others. This project is fairly new (Oct 2020), but are picking up steam quickly. As a DeFi project, Mushrooms Finance deploys a fair-launch fashion from day1 to distribute the governance token (MM) among all its contributors: builder, liquidity provider, community..etc. Mushrooms Finance has integrated the ETH-USD Chainlink Price Feed, Mushrooms' smart contracts have a secure, fair-market price reference when checking the collateralization of its Maker CDPs(collateralized debt position). If collateralization is found to be below a certain threshold, then Mushrooms' smart contracts can execute actions to avoid user funds from being liquidated."

"Mushrooms Finance is a crypto-earning vault with a focus on seeking sustainable profit in the DeFi universe. The first version of the Mushrooms Finance smart contracts were inspired by other popular DeFi projects like Yearn Finance (YFI) and Sushiswap, among many others." "Mushrooms Finance Vaults help users earn passive profit on crypto assets like WETH, WBTC, DAI, USDC, and many more. The earning strategies associated with the Vaults will automate user yield farming on Alchemix or Curve by auto-compounding the profit. Vaults earn in the denomination of whatever token users deposited. Users will then receive mTokens upon Vault deposit which represent their share in that Vault. When users withdraw from the Vault, the mToken share allows users to withdraw both the principal plus any earned profit over the deposit period."

"CoinFabrik was asked to audit the contracts for the Mushroom project." Dedaub was also commissioned to perform a security audit. "Mushrooms Finance has a Bug Bounty program to encourage security white-hat hacker/developer to spend time studying our code in order to uncover vulnerabilities. We believe they should get fairly awarded for their time and effort and acknowledged for the remarkable contributions to entire community."

"Before [a] harvest transaction occurs, it can be sandwiched to manipulate the Uniswap price before, and return it afterwards, earning a portion of the Mushroom harvest." "This particular vulnerability was an MEV searcher sandwich attack made easier by the existence of flash bots."

"Whitehat Wen-Ding Li reported a vulnerability in Mushrooms Finance classified as “high” to Immunefi on April 27. The vulnerability was a theft of yield, but the attack was not a flash loan. Rather, the attack was an MEV (miner-extractable value) attack with flash bots, which is similar but distinct from a flash loan."

"Regrettably, the vulnerability was exploited twice (block 12312954 (~0.0345 eth) and block 12319752 (~0.0504 ETH)) prior to Wen-Ding Li’s report, leading to a loss of ~$222 in total. Mushrooms Finance has since patched the vulnerability. If this attack had not been mitigated swiftly by Mushrooms, it would have been repeatable."

"The harvest transaction is now being run more frequently, to make it unprofitable to pay miners for including the sandwich transactions." "Mushrooms Finance has configured its keep3r to run harvests more frequently, as merely adding permission requirements on the harvest function and adding EOA requirements are insufficient. Keeping harvests small but frequent makes it economically unprofitable for MEV searchers to perform this attack because the size of the swap required to distort the Uniswap pool incurs more swap fee than the profit from the harvest."

"Mushrooms Finance has paid a bounty of $4,000 USDC to whitehat Wen-Ding Li for the report." Subsequently, Mushroom Finance underwent a further audit by Peckshield.

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 - Mushroom Finance Yield Manipulation Theft
Date Event Description
May 20th, 2021 12:00:00 AM Main Event Expand this into a brief description of what happened and the impact. If multiple lines are necessary, add them here.

Total Amount Lost

The total amount lost has been estimated at $4,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?

Ultimate Outcome

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

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?

Prevention Policies

No user funds were lost in this case.

References