Lucky Coin Honeypot
What happened
Lucky Coin ($LUCKY) is a BNB Chain reflection token deployed on 24 May 2021 at 0x2e8921b7…7316c1, built on the common SafeMoon-style template with 4% reflection and 4% liquidity fees. One added line in _transfer, require(tx.origin == to || tx.origin == owner());, only lets a transfer go through when the wallet that started the transaction is the one receiving the tokens, or is the owner. A PancakeSwap buy passes because the buyer receives the tokens, but a sell sends tokens to the pair, so it reverts for every holder except the owner.
The owner can also change both fees with no upper limit and can use the template's lock function to look renounced for a while and then reclaim ownership. De.Fi's REKT database lists Lucky Coin as an exit scam and honeypot, describing it as a contract where the owner could stop holders from selling.
How it happened
- The constructor gives the deployer the full supply of 1 trillion $LUCKY and creates the PancakeSwap pair:
_rOwned[_msgSender()] = _rTotal;andcreatePair(address(this), _uniswapV2Router.WETH())on router 0x10ED43C7…56024E. - Every
transferandtransferFromruns_transfer, which checksrequire(tx.origin == to || tx.origin == owner());. - On a buy, the pair sends tokens to the buyer, who also signed the transaction, so
tx.origin == toholds. - On a sell, the router calls
transferFrom(holder, pair, amount). The recipient is the pair, not the holder, so the check fails and the sell reverts with no error message. Wallet-to-wallet transfers fail the same way; only the owner's transactions are exempt. - The owner keeps further levers:
setTaxFeePercentandsetliquidityFeePercentaccept any value, andlock(uint256 time)sets_owner = address(0)while saving_previousOwner, sounlock()can restore the owner after the lock time.
Protocol details
Evidence
- report Token Sniffer exploit category "Reported by user(s)" (De.Fi proof link) tokensniffer.com
- transaction Lucky Coin contract creation transaction bscscan.com
- address Lucky Coin ($LUCKY) verified contract code on BscScan bscscan.com
- analysis Sourcify match for 0x2e8921b7426780aece501cd78396623c107316c1 on BNB Chain repo.sourcify.dev
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.