Vether Hack
What happened
Vether (VETH), a "strictly scarce" ERC-20 token on Ethereum, was exploited around July 1, 2020. The attacker spent about 0.9 ETH to take 919,299 VETH held by the Vether contract itself, which SlowMist valued at about $900,000, and then sold large amounts, crashing the price. The bug came from two features working together: changeExcluded let anyone mark any address as fee-excluded for a fee, and transferFrom skipped its allowance check whenever the caller was excluded.
The Vether team said the flaw came from a UX change it had made to transferFrom and called it their fault. It said it would redeploy the token as Vether4 and compensate affected Uniswap liquidity providers.
How it happened
- The attacker deployed a helper contract and called
changeExcludedwith it, paying the 128 VETH exclusion fee. The function wasexternalwith no access control, so any address could be excluded. - Once
mapAddress_Excluded[msg.sender]was true,transferFromskipped therequire(value <= _allowances[from][msg.sender])check and the allowance deduction, and went straight to_transfer(from, to, value). - The helper called
transferFromwith the Vether contract's own address asfrom, moving its 919,299 VETH to the attacker without any approval. - The attacker dumped the VETH on Uniswap. The team then replaced the token with Vether4 and pledged compensation to affected liquidity providers.
Protocol details
Evidence
- report Chiachih Wu on X: reply explaining the VETH exploit (2020-07-01 03:09 UTC, via fxtwitter mirror) x.com
- code vetherasset/vether-contracts: contracts/Vether3.sol github.com
- analysis DeFiLlama defillama.com
- analysis SlowMist Hacked - SlowMist Zone (entry 'VETH', 2020-07-01) hacked.slowmist.io
- analysis BlockThreat - Week 27, 2020 blockthreat.com
- analysis ChainNews via btcfans: analysis of Bancor and VETH 'overstepping' contract bugs (July 9, 2020) btcfans.com
Understand the attack patterns
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.