Merlin Labs Hack

TOTAL LOST $680K
Low Other / Math Mistake Exploit / Flashloan Incentive Rewards Exploit binance bsc

Summarize with AI

Affected Chain binance 2 chains affected
Recovered - No recovery reported
All-Time Rank #926 By amount stolen
Auditors 3 Prior security audits

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 / Project Merlin Labs
Date of Incident
Affected Chain(s) binance bsc
Attack Technique Other / Math Mistake Exploit / Flashloan Incentive Rewards Exploit
Classification Other / Yield Aggregator / Protocol Logic / Ecosystem
Primary Source View Post-Mortem

Protocol Information

Protocol Type Exploit/Other
Affected Token MERL
Smart Contract Language Solidity
Official Website merlinlab.com/farm
Protocol Twitter/X @MerlinLab_
Team Anonymous
Source Code Unverified

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.

Technical Knowledge Deep understanding of other / math mistake exploit / flashloan incentive rewards exploit and Solidity and EVM internals
Capital Required Seed capital to cover gas and initial position setup
On-Chain Access Ability to interact with binance, bsc smart contracts and deploy a custom exploit contract
Protocol Analysis Identification of the exploitable vulnerability in Merlin Labs's contract logic - root cause: other / yield aggregator / protocol logic / ecosystem
Execution Speed Precise transaction ordering and timing to exploit the vulnerability within a single atomic block
Obfuscation Plan A strategy to launder and move stolen funds - typically through mixers, cross-chain bridges, or decentralized DEX swaps to resist tracing

What Auditors Should Check

Could this have been caught in audit? Likely — with a thorough Other / Math Mistake Exploit / Flashloan Incentive Rewards Exploit audit checklist and test coverage
Audited by Certik, Hacken, DeFi Safety — still lost $680K. Prior audits don't guarantee safety, especially after post-audit code changes.

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 Trial

Security Audit History

Related Attack Classes

The technique used in this hack maps to these vulnerability classes in our security curriculum:

See all Arithmetic Overflows Underflows examples →

Sources & References

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.

Recreate exploit patterns safely Free Trial