Yoda Token Honeypot
What happened
De.Fi's REKT database lists Yoda Token (YODATOKEN) on BNB Smart Chain as an Exit Scam/Honeypot and says the contract owner could disable the transfer function. The verified source has no switch that disables transfer. The trap is in _approve, which stores an allowance of zero for every holder except one hard-coded address, so any sale that needs a router to pull tokens through transferFrom reverts for ordinary holders.
That hard-coded address, 0xBbE84f65…eed195, is also the deployer and initial owner.
How it happened
- The constructor sends the entire supply to the deployer:
_balances[msg.sender] = _totalSupply;with_totalSupply = 8723563500000000000and_decimals = 7, which is 872,356,350,000 tokens. approveand the allowance update insidetransferFromboth go through_approve, which only honours the hard-coded address:if (owner == address(0xBbE84f65D89A1d083470f771869F4e67f0eed195)) {...} else { _allowances[owner][spender] = 0;. A holder who approves a router ends up with an allowance of zero, and theApprovalevent is emitted with 0.- A sale through a router pulls tokens with
transferFrom(holder, ...), which runs_transferand then_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "BEP20: transfer amount exceeds allowance")). The holder's stored allowance is always 0, sosubreverts for any amount above zero and the balance change is rolled back with it. transfercalls_transferwith no allowance check, so nothing in this code blocks wallet-to-wallet sends or a pool paying tokens out to a buyer.- The hard-coded address keeps working allowances, so it can approve a router and sell. The owner can also call
mint(uint256 amount), which isonlyOwnerand uncapped, andrenounceOwnershipwould not change the hard-coded exception in_approve.
What the code allows is separate from what happened: the code shows the mechanism, and De.Fi's REKT database is the source for the honeypot classification.
Protocol details
Evidence
- report @Token_Sniffer incident report twitter.com
- address BscScan verified source for 0xb8719f80b44ecb4fc730a398e5c679d269b63026 bscscan.com
- analysis Sourcify repository copy of the same contract repo.sourcify.dev
- analysis Scam explained: BSC NoApproval cryptot3ddybear.gitlab.io
- analysis De.Fi REKT database listing for YODATOKEN (as imported in meta.json) de.fi
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.