BSCx500 Honeypot
What happened
BSCx500 is a BEP20 token on BNB Smart Chain with a hidden recipient block. A public address variable, newun, is filled by the first transferFrom call and from then on both transfer and transferFrom revert with "please wait" whenever the recipient is newun. If newun holds the liquidity pool address, as the linked write-up describes for tokens of the same design, holders can buy but cannot sell back.
The owner can also overwrite newun through transfernewun. De.Fi's REKT database lists the token as an Exit Scam/Honeypot dated 2021-04-09 and describes it as an owner-controlled transfer restriction that stopped users from selling.
How it happened
- The constructor mints
_totalSupply = 1000000000000000000000000000000000raw units (18 decimals, 10^15 tokens) to the owner, the deployer. transferbegins withrequire(to != newun, "please wait");, so no direct transfer can go to the address stored innewun.transferFrombegins withif(from != address(0) && newun == address(0)) newun = to; else require(to != newun, "please wait");. Whilenewunis still empty, the firsttransferFromstores its recipient asnewunand goes through; every latertransferFromto that address reverts. A liquidity add through a router is atransferFromto the pool, which is how the linked write-up says the pool address ends up innewunfor tokens of this design; this record's code alone does not show which addressnewunholds, and it can be read with the public getternewun().- If
newunis the pool, a sale through a router (atransferFromfrom the holder to the pool) hitsrequire(to != newun, "please wait")and reverts, while buys, where the pool is the sender, are not checked. - The owner can call
transfernewun(address _newun)(onlyOwner) to setnewunto any address. Pointing it at an unused address lifts the block for the pool; setting it to zero re-arms the capture, because the nexttransferFromfrom a non-zero address writes its recipient intonewun.
The code allows this trap; the sources opened here do not show who held the liquidity or any liquidity removal.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.