SpaceDEFI Honeypot
What happened
SpaceDEFI (SPACEDEFI) is a BNB Smart Chain token whose transferFrom only works for holders on an allow list controlled by a hard-coded privileged address. Ordinary holders are not on that list, so a router-driven sell, which is a transferFrom from the holder to the pool, reverts, while plain transfer calls carry no such check. The same address can also overwrite any holder's balance through mint.
De.Fi's REKT database lists the token as an Exit Scam/Honeypot dated 2021-03-26, with the note that the owner could disable the transfer function and restrict users from selling.
How it happened
- The constructor sets
allow[msg.sender] = truefor the deployer only; every other address starts withallowequal to false. transferFromcontains the linerequire(allow[_from] == true);, so a transfer pulled from a holder who is not on the list reverts. A DEX router sells by callingtransferFrom(holder, pool, amount), so such a sell fails.transferhas no equivalent check (it only requires a non-zero recipient and enough balance), so moving tokens between wallets and receiving tokens from a pool are not stopped by this line.addAllow(address holder, bool allowApprove)isonlyOwner, and the modifier isrequire(msg.sender == address(1080614020421183795110940285280029773222128095634)), the hard-coded address 0xbd486897…439192. That address can add or remove any holder from the list at any time. Theownerstorage variable plays no part in this check, sotransferOwnershipchanges nothing about who holds these powers.mint(address miner, uint256 _value)is alsoonlyOwnerand runsbalances[miner] = _value;, which assigns the balance directly (it can raise or lower it) without touchingtotalSupply.
The code allows all of the above; the contract's transactions were not opened, so which holders were blocked and what the privileged address actually called is not established here.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.