COPE Honeypot
What happened
COPE is an ERC-20 token deployed on Ethereum on 29 March 2021 at 0xfa19cee6…13a1c5 by 0xC2CE6a83…38732F. Every transfer passes through a modifier, burnTokenCheck, that lets the owner, a second privileged address _safeOwner and owner-whitelisted wallets move tokens freely. For any other holder, a sale to the pool fails with the misleading error "ERC20: transfer amount exceeds balance" unless it is smaller than an owner-set threshold, and even then the seller is blacklisted after that one sale.
The whitelist, blacklist and _safeOwner controls hide behind standard-looking names: increaseAllowance, addApprove and decreaseAllowance. De.Fi's REKT database lists COPE as an exit scam/honeypot dated 29 March 2021, with no loss figure.
How it happened
- The constructor sets
_ownerand_safeOwnerto theownerargument. Because_mintrequiresmsg.sender == _owner, deployment only succeeds if that argument is the deployer._mintcredits_balances[_owner]but emitsTransfer(address(0), account, amount), so the ten constructor mints look like transfers to other addresses while every token is credited to the owner. - In
burnTokenCheck,if (_owner == _safeOwner && sender == _owner){_safeOwner = recipient;_;}makes the recipient of the owner's first outgoing transfer the_safeOwner. If that transfer is the liquidity deposit, the pool becomes_safeOwner, so the pool's transfers to buyers always pass. - A holder who is not the owner,
_safeOwneror whitelisted can transfer only ifamount < _sellAmount, and a transfer to_safeOwnerthen sets_blackAddress[sender] = true. Any larger transfer, and any transfer by a blacklisted address, must satisfyrequire((sender == _safeOwner)||(recipient == _unirouter), "ERC20: transfer amount exceeds balance"), which a sale into the pool does not. _sellAmountstarts at zero, so every sale fails until the owner sets it with a transfer to itself (if (sender == _owner && sender == recipient){_sellAmount = amount;}).- Owner-only functions change who is exempt:
increaseAllowance(address[])whitelists,addApprove(address[])blacklists,decreaseAllowance(address)replaces_safeOwner, andmultiTransfersends tokens and whitelists the first recipients._mintis public but owner-only, has no cap and credits the owner. The contract has no function that changes_owner.
Protocol details
Evidence
- report @Token_Sniffer incident report twitter.com
- transaction COPE contract creation transaction etherscan.io
- address COPE (Cope) verified source code etherscan.io
- analysis Sourcify match for 0xfa19cee60d6e6a9fd18bd2e316fd66192713a1c5 on Ethereum repo.sourcify.dev
- analysis COPE 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.