AstroPig Honeypot
What happened
AstroPig (ASPIG) is a BEP-20 token whose transfer and transferFrom both revert with "please wait" when the recipient equals a storage variable called newun. transferFrom fills newun with the recipient of the first call made with a non-zero from, and the owner can later change it with transfernewun. The restriction applies to every sender, including the owner, so it can block sales through any pair whose address ends up in newun.
De.Fi's REKT database lists the token as an Exit Scam/Honeypot on BNB Smart Chain and says the contract owner could disable the transfer function, which restricted users in selling their tokens. No transaction hash, attacker address or loss figure is available for this record.
How it happened
What the code allows:
- The constructor mints the whole supply to the deployer:
balances[owner] = _totalSupply;with_totalSupply = 5000 * 10**5 * 10**3anddecimals = 3, which is 500,000,000 tokens.newunis never assigned in the constructor, so it starts as the zero address. transferFrombegins withif(from != address(0) && newun == address(0)) newun = to;followed byelse require(to != newun, "please wait");. The firsttransferFromcall with a non-zerofromtherefore stores its recipient innewunand skips the check. Which address that was on-chain is not shown by the source.- From then on,
transferFrom(from, to, tokens)withto == newunreverts with "please wait" beforebalances[from]is debited, andtransferdoes the same throughrequire(to != newun, "please wait");. Nothing exempts the owner or any other sender. A sale that moves tokens into the address stored innewun(for example a swap pair) fails; transfers to other addresses still work. - The owner can change the block at any time with
function transfernewun(address _newun) public onlyOwner { newun = _newun; }. Pointing it at an unused address lifts the block for the old recipient. Setting it back to the zero address re-arms the capture, because the nexttransferFromwith a non-zerofromwould store that call's recipient innewunagain. clearCNDAO()isonlyOwnerand sends the contract's own BNB balance to the owner:_owner.transfer(address(this).balance);. The contract accepts BNB through its payable fallback,function() external payable {}. The source has no renounce function; ownership moves only throughtransferOwnershipfollowed byacceptOwnershipby the new address.
De.Fi's REKT database classifies the token as an Exit Scam/Honeypot and says the owner could disable transfers so holders could not sell. The source alone does not show which address newun held, whether transfernewun was called, or any failed sale, and no transaction is cited.
Protocol details
Evidence
- report De.Fi REKT database listing, proof link (Token Sniffer tweet; could not be opened) twitter.com
- report Sourcify match source for 0x1a6557a12ac7237b2688d50e1e47d9e747d8c3f6 (AstroPig.sol) repo.sourcify.dev
- address BscScan verified source: AstroPig 0x1a6557a12ac7237b2688d50e1e47d9e747d8c3f6 bscscan.com
- analysis Scam Explained: BSC stealthy LP block cryptot3ddybear.gitlab.io
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.