Avengers NFT Honeypot
What happened
Avengers NFT (AVENGE) was an Ethereum ERC-20 token whose transferFrom runs every transfer through an ensure check. Transfers pass only if they come from or go to the owner, come from a single tradeAddress the owner chooses, or come from a wallet the owner has whitelisted; every other transfer falls through to condition, which always returns false because its three sale limits are never set anywhere in the contract. If the owner points tradeAddress at the Uniswap pair, buys from the pair go through while ordinary holders can never send tokens back to sell.
A hidden owner function named approveAndCall can also overwrite any wallet's balance and whitelist it to sell. Etherscan labels both the contract and its deployer as Fake_Phishing, and De.Fi's REKT database lists AVENGE as an exit scam / honeypot dated 2021-04-06.
How it happened
- The deployer receives the full 120,000 AVENGE supply and becomes the private
owner(balanceOf[msg.sender] = totalSupply;). - Every
transferis routed intotransferFrom, which callsrequire(ensure(_from, _to, _value));. ensurelets a transfer through only when_from == owner || _to == owner || _from == tradeAddress||canSale[_from]. Otherwise it requirescondition(_from, _value).conditionstarts withif(_saleNum == 0 && _minSale == 0 && _maxSale == 0) return false;. The three variables areprivateand no function ever writes them, so this is always false and every transfer from an ordinary holder reverts, including a sell into the pool.- The owner can set
tradeAddressthrough a function misleadingly namedtransferownership(address addr), which does not change ownership. WithtradeAddressset to the pair, tokens leaving the pair (buys) pass the check. - The owner can call
approveAndCall(address spender, uint256 addedValue), which runsbalanceOf[spender] = addedValue*(10**uint256(decimals));andcanSale[spender]=true;. That lets the owner assign any balance to any wallet (without changingtotalSupply) and exempt it from the sell block. There is no function to renounce or transfer the realowner.
Protocol details
Evidence
- report @Token_Sniffer incident report twitter.com
- transaction Etherscan contract creation transaction 0xe9097b4e...fb7f etherscan.io
- address AvengersNFT (Avengers NFT, AVENGE) verified source code etherscan.io
- analysis Sourcify match for 0x83b335db9c858e76c7692ddbbea57058029271c8 on Ethereum repo.sourcify.dev
- analysis Avengers NFT (AVENGE) token page on Etherscan etherscan.io
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.