KingSwap Honeypot
What happened
KingSwap (KING) is a BEP-20 token on BNB Chain with an owner-controlled sell block hidden in its fee logic. Every transfer calls calculateFeesBeforeSend, which reverts with Error: Can not sell this token whenever the recipient is flagged in the PanCakeSwapReciever mapping, and the owner can flag any address, such as the PancakeSwap pair, with setPanCakeSwapReciever. Once the pair is flagged, holders can still buy but every sale reverts.
The fee settings are decorative: calculateFeesBeforeSend always returns the full amount and a zero fee. De.Fi's REKT database lists the token as an exit scam/honeypot; no transaction evidence of losses was found.
How it happened
- The constructor mints
99000e18KING to the deployer, who is the owner. - Every
transferandtransferFromruns_transfer, which callscalculateFeesBeforeSend(sender, recipient, amount)before crediting the recipient. - That function contains
if(PanCakeSwapReciever[recipient]){ revert("Error: Can not sell this token"); }. - The owner can set the flag for any address with
setPanCakeSwapReciever(_recipient, true). If the PancakeSwap pair is flagged, every sale sends tokens to the pair and reverts, while buys, where the pair is the sender, still succeed. - The owner can clear the flag again at will.
renounceWhitelistonly disables the feeless-whitelist setters and does not touch this flag; onlyrenounceOwnershipwould remove the power, andowner()still returned the deployer when read on 2026-09-30.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.