WenMoon Honeypot
What happened
WenMoon (WenMoon) is a 9-decimal token on BNB Chain whose transfer and transferFrom both revert when the recipient equals a stored address called newun. newun starts empty and is filled by the first transferFrom call, which stores that call's recipient. If the first transferFrom is the liquidity deposit through a router, the liquidity pair becomes newun and every later sale into the pair reverts with please wait, while purchases out of the pair are not restricted.
The owner can also repoint newun with transfernewun. De.Fi's REKT database lists the token as an Exit Scam/Honeypot, noting that the contract owner could disable the transfer function, which restricted users in selling their tokens.
How it happened
- The constructor credits the whole supply to the deployer:
balances[owner] = _totalSupply;with_totalSupply = 1000000000000000000000000raw units at 9 decimals.newunis never set in the constructor, so it starts as the zero address. - The first
transferFromfrom a non-zero sender takes this branch:if(from != address(0) && newun == address(0)) newun = to;. That transfer succeeds and its recipient is stored asnewun. A router-based liquidity deposit callstransferFromfrom the owner to the pair, so the code allows the pair to becomenewun. - Every later call is checked against
newun.transferFromrunselse require(to != newun, "please wait");andtransferrunsrequire(to != newun, "please wait");. A sale through a router callstransferFrom(holder, pair, amount), so the recipient equalsnewunand the call reverts. Buys aretransfercalls from the pair to the buyer, whose recipient is notnewun, so they go through. - The check has no exception for the owner or any whitelist, so it applies to every sender. The owner alone can change it with
function transfernewun(address _newun) public onlyOwner. Pointingnewunat an unused address lifts the block; setting it back to zero re-arms the capture, and the nexttransferFrompasses and stores its recipient. - What happened: De.Fi's REKT database lists the token as an Exit Scam/Honeypot. A blog post dated 2021-04-11 documents the same
newunpattern in other tokens (SafeRocket and similar), where the pair is captured during the first liquidity add; it does not mention WenMoon, and no transaction for this token was opened.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.