Redbean Token Honeypot
What happened
Redbean Token is a reflection-style token whose _transfer function contains the line require(tx.origin == to || tx.origin == owner());. A transfer succeeds only if the transaction's originating wallet is the recipient or the owner. A holder selling through a router sends tokens to the pool, which is not the holder's wallet, so the call reverts and the tokens stay unsold; wallet-to-wallet transfers to other people revert the same way.
De.Fi's REKT database lists Redbean Token (RDBT) as an exit scam/honeypot on BNB Smart Chain dated 2021-05-23 and states that the owner could disable the transfer function, restricting users from selling.
How it happened
- The constructor gives the whole supply (
_tTotal = 100000 * 10**6 * 10**9, 9 decimals) to the deployer, creates the pair withcreatePair(address(this), _uniswapV2Router.WETH())and excludes the owner and the contract from fees. - Every transfer path, including
transferFrom, ends in the private_transfer, which containsrequire(tx.origin == to || tx.origin == owner());. The check does not look atfromor at who the pair is. - Buy: the pool pays the buyer, and the buyer's wallet started the transaction, so
tx.origin == toand the transfer passes. - Sell: the router calls
transferFrom(holder, pool, amount). Heretois the pool andtx.originis the holder, who is notowner(), so the require fails and the whole transaction reverts. Moving tokens to any other wallet fails for the same reason. Theowner()account passes in any case, sincetx.origin == owner(). - The exemption follows
owner()at call time.renounceOwnershipandlockset_ownerto the zero address, which no transaction origin equals, so the exemption would end for everyone;transferOwnershipcan hand it to another account. - What happened: De.Fi's REKT database lists the token as a honeypot. No transaction showing a blocked sell, victims or a liquidity removal was opened for this record.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.