Merlin Labs Hack
Incident Overview
The attacker:
https://bscscan.com/address/0x400fa7ed…c162fa
The transaction behind the attack:
https://bscscan.com/tx/0x8e20a111…56ff97
The attacker:
- added a small sum of deposit to the LINK-BNB Vault at:
https://bscscan.com/tx/0x3ce0be64…f475ac
- sent 180 CAKE to the LINK-BNB Vault contract (leads to the hack)
- called getReward() with the deposit of LINK-BNB Vault from the first step
- with a large amount of CAKE token in the wallet balance of the vault contract (sent by the hacker in step 2), it returns a large amount of profit. As a result, the system minted 100 MERL as a reward to the hacker
- repeated 36 times, received 49K of MERL token in total
- swapped MERLIN token into 240 ETH and transferred out of BSC using Anyswap.
The attack was performed using a similar way as Bunny and Autoshark exploits.
Incident Report
Protocol Information
What the Attacker Needed to Succeed
Understanding the prerequisites for this type of attack helps auditors identify protocols that are most at risk and helps developers build better defenses.
What Auditors Should Check
If you're auditing a protocol with similar architecture to Merlin Labs, these are the critical security checks that could have prevented this incident (May 2021).
- Verify all logic paths related to Other / Math Mistake Exploit / Flashloan Incentive Rewards Exploit are guarded by proper access controls and input validation - see the Arithmetic Overflows Underflows attack class for patterns
- Review privileged functions (owner, admin, governance) for potential abuse vectors - centralization risks should be documented and bounded with timelocks or multi-sigs
Master these auditing techniques with hands-on labs and real exploit scenarios in the Smart Contract Hacking course.
Free TrialRelated Attack Classes
The technique used in this hack maps to these vulnerability classes in our security curriculum:
Sources & References
-
01
Source 1 https://rekt.news/merlin2-rekt/
-
02
Reference https://rekt.news/merlinlabs-rekt/
- 03
Learn to Prevent the Next Merlin Labs
The Merlin Labs hack is one of many attacks that skilled auditors are trained to detect before deployment. Master real exploit patterns and defense techniques with hands-on Web3 security training.