YZY DAO Rug Pull

Reported loss $106K
Ethereum
Rugpull

What happened

YZY DAO was a yield-farming token on Ethereum whose transfers pay a tax, 2% at launch, into a vault contract. The token owner can change that tax with setTaxFee, which has no upper limit: at 100% a recipient gets nothing, and above 100% every taxed transfer reverts. The owner can also point the tax at a different vault with setVault.

On 9 February 2021 the deployer transferred ownership of the vault contract to 0xf01a9074…585302. According to De.Fi's listing, the vault treated that address as its _daoTreasury, it received tokens from the fees and sold them, and it removed liquidity several times. Two of those removals, on 4 April and 23 April 2021, returned about 6.77 ETH and 1.42 ETH.

De.Fi puts the loss at $106,315.

How it happened

  1. Every transfer or transferFrom not sent by the vault or the three launch wallets pays amount.mul(uint256(_taxFee)).div(10000) to _vault and calls IYZYVault(_vault).addTaxFee(taxAmount). The fee check uses _msgSender(), so buys through the pair and sells through the router are both taxed.
  2. The owner can set the tax to any uint16 value with function setTaxFee(uint16 fee) external onlyOwner { _taxFee = fee; ... }. At 10000 the recipient receives nothing; above 10000 amount.sub(taxAmount) reverts, freezing every taxed transfer.
  3. The owner can redirect the tax to any contract with setVault, whose only check is require(vault != address(0), ...).
  4. On 9 February 2021 the deployer called transferOwnership on the vault contract, making 0xf01a9074…585302 its owner. According to De.Fi's listing, the vault treated this address as _daoTreasury, it received fee tokens, and it sold them.
  5. The same address removed YZY/ETH liquidity through the Uniswap router, including 252.09 YZY and 6.77 ETH on 4 April 2021 and 106.25 YZY and 1.42 ETH on 23 April 2021.

Protocol details

Classification Other
Protocol Type Exit Scam/Rugpull
Affected asset / contract YZY
Protocol links Website @yzyDAO

Build your security review skills

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