Betelgeuse Honeypot
What happened
Betelgeuse (BETELGEUSE) is a BEP20 token on BNB Smart Chain whose _approve function stores a real allowance only when the approving address is the hard-coded address 0x08E88f5E…d4BeC9, the address that deployed the contract in tx 0xb9ff26b3…16a153. For every other holder it stores 0 and emits an Approval of 0. Because transferFrom ends by subtracting the amount from that allowance, any non-zero transferFrom from an ordinary holder reverts, which blocks sales routed through an allowance (such as a DEX router) while plain transfer is unaffected.
De.Fi's REKT database lists the token as an Exit Scam/Honeypot dated 2021-04-09 and describes it as an owner-controlled transfer restriction that stopped users from selling.
How it happened
- The constructor mints the whole supply (
_totalSupply = 50000000000, 3 decimals, so 50,000,000 tokens) tomsg.sender, the deployer. _approvebranches on who is approving:if (owner == address(0x08E88f5E72484Fbf99Ed2ab87c0f1d0894d4BeC9)) { _allowances[owner][spender] = amount; ... } else { _allowances[owner][spender] = 0; emit Approval(owner, spender, 0); }. The deployer's approvals are stored; every other holder's approval, including one made to a router, is silently set to 0 while the event reports 0.transferFromruns_transferand then_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "BEP20: transfer amount exceeds allowance")). For a non-deployersenderthe stored allowance is always 0, sosubreverts for anyamountabove 0 and the whole transfer is undone.- A holder who tries to sell through a router, which pulls tokens with
transferFrom, therefore fails.transferonly calls_transferand never reads allowances, so receiving or moving tokens directly still works. - The deployer is exempt: its approvals are recorded, so it can approve a router and use
transferFrom. The owner can also callmint(uint256 amount)(onlyOwner) to create more tokens for itself.
The code allows this one-way trap; the sources opened here do not show a transaction of the deployer selling or removing liquidity.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.