Merlin Labs Flashed

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!

Merlin Labs

The Merlin Labs smart contract featured two bugs. One of them was around the rewards minting mechanism, and the other was around incorrect pricing of one particular crypto-asset.

These were exploited by an attacker to make off with liquidity funds. The team launched a subsequent compensation plan for affected users.

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]

About Merlin Labs

"Merlin Lab is the highest APY auto-compounding yield aggregator on BSC." Merlin is a way to "Auto-compound & Earn BTCB, ETH, BNB & extra MERL." "Merlin Lab’s vision is to create a suite of complementary DeFi products that will operate in a harmonious ecosystem."

"User security has always been Merlin Lab’s top priority." "It has been always a top priority and it is for the simple reason that without security the platform can't be run." "Our development team has implemented routine checks of our smart contracts and codes to continuously bring improved security standards into the Merlin ecosystem." "Merlin Labs was audited by Hacken on May 15th." "According to the assessment, the Customer's smart contracts are well-secured." "Our team performed an analysis of code functionality, manual audit, and automated checks with Mythril and Slither."

"On May 26, 2021, 03:59:05 AM +UTC, less than 48 hrs after the Autoshark hack. Merlin Lab, another Bunny fork, [was] attacked in a similar fashion to the Bunny and the Autoshark hack." "As a result, the hacker was able to remove ~240 ETH (~680K USD)."

The attacker (1) "Added a small sum of deposit to the LINK-BNB Vault (with this transaction). (2) Sen[t] 180 CAKE to the LINK-BNB Vault contract. (this is important! this is the key that leads to the hack.) (3) Call[ed] getReward with the deposit of LINK-BNB Vault from the first step. (4) With the rather large amount of CAKE token in the wallet balance of the vault contract (sent by the hacker at step 2), returned a large amount of profit (see detailed analysis below). As a result, the system minted 100 MERLIN as a reward to the hacker. (5) Repeated 36 times. Got 49K of MERLIN token in total. (6) Swapped MERLIN token into 240 ETH and transferred out of BSC using Anyswap."

"No vaults were breached. All funds are safe. We have currently paused all Merlin minting. Vaults are auto-compounding as per usual, with their rewards being in the native token only."

"Just 8 hours after the first attack, [Merlin Labs] lost another ~200 ETH to a completely different exploit." "The second attack took advantage of a mistake in their new priceCalculator that mispriced only BAND."

"The incident was not a flashloan attack, as the development team had implemented security measures to mitigate the possibility of this. The incident related to an exploit of the getReward code as a large amount of CAKE tokens were manually transferred into the vault contract, which maniplated the minter to create excessive MERL as part of the vault reward. This led to a total of ~59,000 MERL minted during this process." "As this was not a flashloan exploit, a comparably much smaller amount of tokens were minted to other DeFi exploits. This means the team will rectify and rebalance the token economics to their true supply quickly with our below plans."

"The development team is rectifying the code and has engaged a White Hack Specialist consultant to work along with us in this process." This includes "[i]mplementation of Fair LP Price calculation (by Alpha Homora) and the use of Fair Asset Price via Decentralized Price Oracle — Chainlink. The combination of fair asset price and fiar asset reserves enables Merlin to derive the fair LP token price that is unmanipulatable and safe from attack vectors such as flash loan attacks." "Merlin has [also] implemented a stop on all external smart contracts to interact with Merlin's contract. This means we have mitigated the risk of any flash loan attack within our protocol."

"We have further advised Certik & Haechi of this incident and working with them on the updated code security." "Once a complete review has been completed for the Merlin vaults, we will enable Merlin minting again."

"All MERL token holders as at May-26–2021 10:29:54 AM +UTC will be eligible for the compensation plan. A compensation Merlin token — cMERL will be airdropped to the users. The details of this will be shared in a separate announcement. cMERL holders will be able to earn MERL & BNB rewards from our Compensation Pool funded by The Merlin Team Contribution. The duration of the pool will last for 6 weeks. Over the course of the following months, additional Development Team Funds will be used to perform burn and buyback activities to rectify token economics until true supply is reached." "In the coming weeks, the team will commit to launching our Lottery and additional Buyback and Burn contributions to aggressively facilitate the deflation of MERL."

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 - Merlin Labs Flashed
Date Event Description
May 26th, 2021 Main Event Expand this into a brief description of what happened and the impact. If multiple lines are necessary, add them here.

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 $1,230,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?

General Prevention Policies

Merlin Labs was already audited, and history shows that this does not preclude the possibility of exploits existing.

The only safe storage of funds is an offline multi-signature setup.

Individual Prevention Policies

No specific policies for individual prevention have yet been identified in this case.

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

Platform Prevention Policies

Policies for platforms to take to prevent this situation have not yet been selected in this case.

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

Regulatory Prevention Policies

No specific regulatory policies have yet been identified in this case.

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

References