SpaceGoat Honeypot
What happened
SpaceGoat's contract stores one address in newun and refuses every transfer that sends tokens to it, with the message "please wait". The first transferFrom call stores its recipient there automatically; a liquidity addition through a router is such a call, so the pool address can end up stored. A holder's sell then reverts before their balance is debited, so the tokens stay in the wallet but cannot be sold.
De.Fi's REKT database lists SpaceGoat as an exit scam/honeypot on BNB Smart Chain dated 2021-05-23 and states that the owner could disable the transfer function, restricting users from selling.
How it happened
- The constructor mints the whole supply to the deployer:
_totalSupply = 1000000000000000;andbalances[owner] = _totalSupply;, withdecimals = 0. - The contract has a storage variable
address public newun;that starts as the zero address. IntransferFrom, the first call with a non-zerofromstores its recipient:if(from != address(0) && newun == address(0)) newun = to;. A router liquidity addition moves tokens to the pool withtransferFrom, so that call can store the pool address. The code alone does not show which addressnewunholds on-chain. - After that, both transfer paths reject any recipient equal to
newun:else require(to != newun, "please wait");intransferFromandrequire(to != newun, "please wait");intransfer. A router sell callstransferFrom(holder, pool, amount), soto == newunand the call reverts beforebalances[from] = balances[from].sub(tokens);runs. The holder keeps the tokens but cannot sell them. Buys pay out from the pool to the buyer, whose address is notnewun, so they pass. - The deployer, as
owner, can change the block:function transfernewun(address _newun) public onlyOwner { newun = _newun; }. Pointing it at an unused address lifts the block; setting it to the zero address lets the nexttransferFromcapture a new recipient. TheOwnedcontract has no renounce function, onlytransferOwnershipandacceptOwnership. - What happened: De.Fi's REKT database lists the token as a honeypot. No transaction showing the block applied to holders, a
transfernewuncall, or a liquidity removal was opened for this record.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.