YES Token Honeypot
What happened
YES Token (YES) is a BNB Smart Chain token at 0x7a5ce1f2…0a3b9e whose _approve function only honours approvals from one hard-coded address, 0x192Cf151…fB5774, which is also the deployer and current owner. For every other holder the allowance is stored as 0, so a DEX router cannot pull their tokens with transferFrom and a sell reverts, while buying and plain wallet-to-wallet transfers still work. De.Fi's REKT database lists the token as an Exit Scam/Honeypot and says the owner could disable the transfer function, which restricted users in selling their tokens.
How it happened
- The constructor mints the whole supply to the deployer:
_balances[msg.sender] = _totalSupply;. approvecalls_approve(_msgSender(), spender, amount), and_approvebranches on the hard-coded address:if (owner == address(0x192Cf151860787746A5675779f28c42300fB5774)) {the amount is stored;} else {the code runs_allowances[owner][spender] = 0;and emitsApproval(owner, spender, 0). A holder'sapprovecall therefore succeeds without reverting but records nothing.- A DEX sell needs the router to call
transferFrom(holder, pair, amount). That function runs_transferand then_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "BEP20: transfer amount exceeds allowance")). The stored allowance is 0, sosubreverts for any amount above 0 and the whole call, including the transfer, is undone. - Buys are unaffected: the pair sends tokens with a plain
transfer, which only runs_transfer. The hard-coded address passes step 2, so its own approvals work. - The exemption is tied to the address, not to
owner(), sorenounceOwnershiportransferOwnershipwould not remove it. Separately,mint(uint256 amount)isonlyOwnerand credits the owner, so the owner can also create new supply.
Protocol details
Evidence
- report @Token_Sniffer incident report twitter.com
- address BscScan verified source, YES Token bscscan.com
- analysis Sourcify match, chain 56, 0x7a5ce1f2754f83e294eb501274f08e9d730a3b9e repo.sourcify.dev
- analysis Scam explained: BSC noapproval cryptot3ddybear.gitlab.io
- analysis De.Fi REKT database listing for YES (imported listing fields in meta.json) de.fi
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.