Singularity Honeypot
What happened
Singularity (SIN) is a BNB Chain token deployed on 20 April 2021 at 0xea7b97ba…222f26. Its internal _approve function only stores an allowance when the approving address is the hard-coded deployer 0xce84D7E7…847B87; for every other holder it stores zero while emitting an Approval event with the value 2. A PancakeSwap sale needs the router to move the holder's tokens with transferFrom, which then fails the allowance check, so holders can buy but not sell through the router, while the deployer's own approvals work.
The owner can also mint any amount of SIN to itself. De.Fi's REKT database lists Singularity as an exit scam/honeypot, stating that the contract owner could disable transfers and so stop holders from selling.
How it happened
- The constructor mints 100,000,000,000,000 SIN (1 decimal) to the deployer.
- When a holder approves the PancakeSwap router,
_approvechecksif (owner == address(0xce84D7E761B2643f14E440e11D9Ee0DefF847B87)). For any other holder it runs_allowances[owner][spender] = 0;and emitsApproval(owner, spender, 2), so the approval appears to succeed but grants nothing. - A router sale calls
transferFrom, which subtracts the amount from the zero allowance withsub(amount, "BEP20: transfer amount exceeds allowance")and reverts. - Buys use the pair's
transferto the buyer, which needs no allowance, so buying keeps working. - The hard-coded deployer address keeps normal allowances, so it can still sell through the router. The
onlyOwnerfunctionmint(uint256)can create unlimited SIN for the owner.renounceOwnershipwould remove the mint power, but the allowance exception is tied to a fixed address, not to the owner role.
Protocol details
Evidence
- report @Token_Sniffer incident report twitter.com
- report De.Fi REKT database listing for Singularity (proof links: Token Sniffer tweet 1380219360631906307 and S4) twitter.com
- transaction Singularity contract creation transaction bscscan.com
- address Singularity verified contract code on BscScan bscscan.com
- analysis Sourcify match for 0xea7b97bac4486aef08b76ac976c67fa2e3222f26 on BNB Chain repo.sourcify.dev
- analysis BSC-SCAM: PancakeSwap NoApproval cryptot3ddybear.gitlab.io
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.