Safe Jail Honeypot
What happened
Safe Jail (JAIL) is a BNB Chain token deployed on 5 April 2021 (UTC) at 0xc51c7950…2d1d72. Its internal _approve function stores the requested allowance only when the token owner is the hard-coded deployer address 0x96DA64B8…a7E66D; for every other holder it writes an allowance of zero. A PancakeSwap sale needs the router to move the holder's tokens with transferFrom, which subtracts the amount from that zero allowance and reverts, so ordinary holders cannot sell through the router while buys from the pair still work.
Unlike other copies of this template, the mint function is disabled by setting the amount to zero. De.Fi's REKT database lists JAIL as an exit scam/honeypot, stating that holders were restricted from selling their tokens.
How it happened
- The constructor mints the full supply of 500,000,000,000 JAIL (
500000000000000with 3 decimals) to the deployer, who also becomes theOwnableowner. - When any holder calls
approveorincreaseAllowance,_approvechecksowner == address(0x96DA64B8B3068445636087B1d8C7B051AEa7E66D); for everyone else it sets the allowance to0and emitsApproval(owner, spender, 0). A comment above the check reads "What did you expect? It's a SafeJail after all!". - A router sale calls
transferFrom(holder, pair, amount). The function moves the tokens, then computes_allowances[sender][_msgSender()].sub(amount, ...)on a zero allowance, which reverts the whole transaction. - Buys use the pair's plain
transferto the buyer, which has no allowance step, so purchases go through and the hard-coded deployer address can still approve the router and sell. - The owner-only
mintcalls_mint, which setsamount = 0before updating balances, so it cannot create new tokens.
Protocol details
Evidence
- report @Token_Sniffer incident report twitter.com
- report De.Fi REKT database listing for JAIL (proof link: Token Sniffer X post 1380219360631906307) twitter.com
- transaction Safe Jail contract creation transaction bscscan.com
- address Safe Jail verified contract code on BscScan bscscan.com
- analysis Sourcify match for 0xc51c7950cece543fec715625d6abcf31712d1d72 on BNB Chain repo.sourcify.dev
- analysis BSC-SCAM: PancakeSwap NoApproval (Blockchain Security Stories, cryptot3ddybear, 2021-04-08) cryptot3ddybear.gitlab.io
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.