MoonHacker Hack

Reported loss $320K
Optimism
Flash Loan Attack

What happened

On December 23, 2024, MoonHacker vault contracts on Optimism were exploited for approximately $320,000 USDC. The affected vaults interacted with Moonwell markets, but the reporting says Moonwell's core lending pools were unaffected.

How it happened

  1. The attacker obtained a USDC flash loan from Aave.
  2. They called the vault's executeOperation function with a malicious contract in place of a legitimate mToken.
  3. Because the function neither validated that input nor restricted the caller, it granted the malicious contract a USDC approval.
  4. The attacker used that approval to drain vault USDC, then repeatedly repaid borrowing and redeemed collateral before repaying the flash loan.

Protocol details

Classification Yield Aggregator / Protocol Logic / Access Control
Protocol Type Exploit/Flash Loan Attack
Implementation language Solidity

Build your security review skills

Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.