Yam DAO Hack

TOTAL LOST $750K
Low Other

Summarize with AI

Affected Chain 2020 Incident surface
Recovered - No recovery reported
All-Time Rank #901 By amount stolen
Protocol Type Reserve Currency Target category

Incident Overview

The bug is in the rebase function of smart contract YAM.sol in the YAM project:

https://github.com/yam-finance/yam-protocol/blob/767e3a4a6918b6fb6100ad6bb356164408f5d82f/contracts/token/YAM.sol#L340

The rebase function was built to keep the token at a stable price. However, the line in the code mistakenly calculates the totalSupply wrong, which would reserve too many minted tokens. The correct code/calculation equation for the line of code should be:

totalSupply = initSupply.mul(yamsScalingFactor).div(BASE);

The rebase bug led to the minting of decillions of YAM to the governance vault. As a result, a larger supply diluted the intended price. YAM token has lost more than 90% of its market capitalization. The bug resulted in a loss of funds worth $750,000.

Incident Report

Protocol / Project Yam DAO
Date of Incident
Attack Technique Other
Classification Token

Protocol Information

Protocol Type Reserve Currency
Affected Token YAM
Official Website yam.finance/#/
Protocol Twitter/X @YamFinance

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 and Solidity and EVM internals
Capital Required Seed capital to cover gas and initial position setup
On-Chain Access Ability to interact with smart contracts and deploy a custom exploit contract
Protocol Analysis Identification of the exploitable vulnerability in Yam DAO's contract logic - root cause: token
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 audit checklist and test coverage

If you're auditing a protocol with similar architecture to Yam DAO, these are the critical security checks that could have prevented this incident (August 2020).

  • Verify all logic paths related to Other are guarded by proper access controls and input validation
  • 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

Sources & References

Learn to Prevent the Next Yam DAO

The Yam DAO 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