TacoSwap Honeypot
What happened
TacoSwap is a BNB Chain token deployed on 31 May 2021 at 0xceae85db…5775b5 by 0x1E34aa7d…098aC9, which is still its owner. Its transferFrom stores the recipient of the first transferFrom call in a public variable, newun, and from then on both transfer and transferFrom revert with "please wait" when sending to that address. When liquidity is added through the PancakeSwap router, that first recipient is the pair, so holders can buy but every sale reverts.
The owner can reassign newun at any time with transfernewun. Only pointing it at an unused address lifts the block: clearing it re-arms the capture, so the next transferFrom, typically the next sale, stores the pair again. De.Fi's REKT database lists this TacoSwap token as a honeypot; no loss figure is recorded.
How it happened
- The constructor credits the deployer, who is
owner, with the whole supply of 100 billion TacoSwap (0 decimals). newunstarts empty. The firsttransferFromrunsif(from != address(0) && newun == address(0)) newun = to;. When the owner adds liquidity through the router, the router callstransferFrom(owner, pair, amount), so the pair is stored.- Every later
transferFromrunsrequire(to != newun, "please wait");. A PancakeSwap sale moves tokens from the seller to the pair withtransferFrom, so it reverts with a message that suggests a temporary delay. transferhas the same check, so holders also cannot send tokens straight to the pair. Buys, where the pair sends tokens to the buyer, are unaffected.transfernewun(address)isonlyOwnerand overwritesnewun. Pointing it at an unused address lifts the block, and pointing it at another address moves the block there. Setting it to the zero address does not lift the block for long: the nexttransferFromtakes the capture branch again and stores its recipient, which after a sale is the pair.
Protocol details
Evidence
- report @Token_Sniffer incident report twitter.com
- transaction TacoSwap contract creation transaction bscscan.com
- address TacoSwapToken verified contract code on BscScan bscscan.com
- analysis Scam explained: BSC stealthy LP block (cryptot3ddybear blog, April 2021) cryptot3ddybear.gitlab.io
- analysis Sourcify match for 0xceae85db6753d3bf4ac19c4a4f03b1ffb35775b5 on BNB Chain repo.sourcify.dev
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.