Beyond Finance Honeypot
What happened
Beyond Finance (BYN) is an Ethereum token deployed on 12 April 2021 at 0x94208d00…0090cb, verified under the contract name Uniswap. Every transfer and transferFrom runs through a modifier, burnTokenCheck, that lets the deployer, 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 owner can mint to itself. De.Fi's REKT database lists Beyond Finance 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 the deployer and mints 15,000,000 BYN 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 Uniswap 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 through the Uniswap V2 router sends tokens to the pair, not to the router address in_unirouter, 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 Beyond Finance (proof link: Token Sniffer tweet 1374999601485291522) twitter.com
- transaction Beyond Finance contract creation transaction etherscan.io
- address Beyond Finance verified contract code on Etherscan etherscan.io
- analysis Sourcify match for 0x94208d00bf8f8b7c00e2683c3e25f3e5c30090cb on Ethereum repo.sourcify.dev
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.