Uga Uga Honeypot
What happened
Uga Uga (UGA) is a BNB Smart Chain token at 0x385aebaf…07ab64 whose _approve function only honours approvals from one hard-coded address, 0xcF80096E…2f2Be5, 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(0xcF80096EA48db7354c9e83578a6c56E88E2f2Be5)) {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, Uga Uga bscscan.com
- analysis Sourcify match, chain 56, 0x385aebaf4af8a7cdd722db7c9e438d4f0d07ab64 repo.sourcify.dev
- analysis Scam explained: BSC noapproval cryptot3ddybear.gitlab.io
- analysis De.Fi REKT database listing for UGA (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.