WeSpace Honeypot
What happened
WeSpace is a BEP20 token on BNB Smart Chain whose transfer and transferFrom functions share a hidden address variable, newun. The first transferFrom call made while newun is empty stores that call's recipient in newun, and every later transfer or transferFrom to that address reverts with "please wait". The owner can also overwrite newun at any time with transfernewun.
De.Fi's REKT database lists WeSpace as an Exit Scam/Honeypot in which the contract owner could disable transfers and so restrict holders from selling.
How it happened
- The constructor mints the whole supply (
_totalSupply = 100000000000000000, 9 decimals) to the deployer, who becomesowner. - In
transferFrom, the lineif(from != address(0) && newun == address(0)) newun = to; else require(to != newun, "please wait");runs. Whilenewunis still the zero address, the firsttransferFromstores its recipient innewun. Routers pull tokens withtransferFrom, so a first liquidity-adding call would record whatever address received the tokens. The code does not show which address that was. - Once
newunis set, every latertransferFromwhose recipient equalsnewunhitsrequire(to != newun, "please wait")and reverts.transferhas the same check on its first line,require(to != newun, "please wait");. - If
newunis the trading pair, a holder's sell, which moves tokens to the pair, reverts. Buying is not covered by this check. Sending tokens to any other address still works. - The
ownercan calltransfernewun(address _newun)(markedonlyOwner) to pointnewunat any address. Pointing it at an unused address lifts the block, and setting it back toaddress(0)lets the nexttransferFromre-capture a recipient. The contract has no function that removes or caps the check, and the code shows no ownership renounce function. - The same contract has
clearCNDAO(), which sends the contract's own BNB balance to the owner. The token itself is not drained by it.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.