Vegetables Finance Rug Pull
What happened
Vegetables Finance (VEGE) is an ERC-20 token whose _transfer reverts for every sender except the owner, unless the recipient has been added to an exceptions list or the owner has switched on a global allow flag. A separate governance address can add itself as a minter and mint any amount through mint, which bypasses the transfer gate entirely. Etherscan shows the deployer address 0x74C96b9D…B108D9 added itself as a minter, minted 1 billion VEGE to itself, and about 40 seconds later swapped 1 billion VEGE for 52.5 ETH through Uniswap V2 Router 2, all on 2020-10-05.
De.Fi's REKT database lists the token as an exit scam / rug pull with 2,652 USD lost and also lists the initial-liquidity transaction at 0x35f450fc…fb3e83.
How it happened
- At deployment the constructor
ERC20(tx.origin)sets_ownerandgovernance = tx.originto the deploying address, andallowstarts asfalse. _transferruns the normal balance update only ifif(sender == _owner || allow ). Otherwise it checksif(exceptions[recipient])and runsrevert();in the finalelse. A holder who is not the owner can therefore only send tokens to addresses on theexceptionslist whileallowisfalse; only the owner can setallowtotruethroughsetAllow().governancecan calladdMinter(_minter), and any minter can callmint(address account, uint256 amount), which calls_mintdirectly with no supply cap and without passing through_transfer. Etherscan shows the deployer calledaddMinter(0x74C96b9DbaDC775dab6805Cd601B1e966cB108D9)on its own address at 12:37:14 UTC on 2020-10-05 (tx 0x2f6fcef6…fedad0).- At 18:20:17 UTC the same address called
mintand received 1 billionVEGE(tx 0xd1e7efa2…8d2e87). - At 18:20:56 UTC that address called
swapExactTokensForETHon Uniswap V2 Router 2, sending 1 billionVEGEand receiving 52.5 ETH (tx 0x98fed3dd…3bb1b0). Etherscan does not show the internal calls here; per the code, the router'stransferFrompulls the tokens from the owner address, and_transfertakes its first branch because thatsenderequals_owner(if_ownerwas never reset withburnOwner()).
Protocol details
Evidence
- transaction Etherscan transaction 0xd1e7efa2...58d2e87 (mint) etherscan.io
- transaction Etherscan transaction 0x2f6fcef6...dffedad0 (addMinter) etherscan.io
- transaction Etherscan transaction 0x98fed3dd...bb1b0 (swapExactTokensForETH) etherscan.io
- transaction etherscan.io transaction 0x35f4…3e83 etherscan.io
- address VegetablesFinance verified source on Etherscan (0x3d92941F6eBB2E131c2aF6F7725494aEd8763c5B) etherscan.io
- analysis Sourcify match for 0x3d92941F6eBB2E131c2aF6F7725494aEd8763c5B repo.sourcify.dev
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.