BirdSwap Honeypot
What happened
BirdSwap (BIRD) is an Ethereum token deployed on 9 April 2021 at 0x23636350…a11976. Every transfer and transferFrom runs through a modifier, burnTokenCheck, that lets the owner, a designated _safeOwner address and whitelisted wallets move tokens freely, but makes an ordinary holder's transfer revert with the misleading message "ERC20: transfer amount exceeds balance" unless the amount is below an owner-set _sellAmount threshold, which starts at zero. A holder who does sell under the threshold to _safeOwner is blacklisted after that sale.
Owner-only functions disguised with allowance names edit the whitelist and blacklist, and the source claims liquidity is locked for six months, but the "lock" is only three constants with no logic. De.Fi's REKT database lists BirdSwap as an exit scam/honeypot, stating that the contract owner could disable transfers and so stop holders from selling.
How it happened
- The constructor sets
_ownerand_safeOwnerto theownerargument and mints the initial supply to it. - The first time
_ownersends tokens,if (_owner == _safeOwner && sender == _owner){_safeOwner = recipient;_;}hands the_safeOwnerrole to that recipient. If that first transfer is the liquidity deposit, the DEX pair becomes_safeOwner, and transfers from it (buys) always pass. - For any other sender, whitelisted addresses pass. A non-whitelisted holder passes only if
amount < _sellAmount; otherwise the modifier runsrequire((sender == _safeOwner)||(recipient == _unirouter), "ERC20: transfer amount exceeds balance"). A sale sends tokens to the pair, not to the hard-coded_unirouteraddress, so it reverts while_sellAmountis zero. - The owner can raise
_sellAmountby sending tokens to itself (if (sender == _owner && sender == recipient){_sellAmount = amount;}). A holder who then sells under that amount to_safeOwnersucceeds once and is added to_blackAddress, after which the samerequireblocks them. - Owner-only
increaseAllowance(address[])whitelists wallets,addApprove(address[])blacklists them,decreaseAllowance(address)replaces_safeOwner, andmultiTransfersends tokens to chosen wallets and whitelists them. The public_mint(address, uint256)lets_owneradd any amount to its own balance while emitting aTransferto a different address. No function changes_ownerafter deployment.
Protocol details
Evidence
- report De.Fi REKT database listing for BirdSwap (proof link: Token Sniffer tweet 1374999601485291522) twitter.com
- transaction BirdSwap contract creation transaction etherscan.io
- address BirdSwap verified contract code on Etherscan etherscan.io
- analysis Sourcify exact match for 0x2363635047bbc654195fdb49bbded9e2cca11976 on Ethereum repo.sourcify.dev
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.