FairRocket Honeypot
What happened
FairRocket (0x576b7ed3…3b96e8) routes every transfer and transferFrom through a burnTokenCheck modifier. With the default _sellAmount of 0, a sender who is not the owner, the _safeOwner or a whitelisted address can only send tokens to the hard-coded _unirouter address or to the owner, and any other transfer reverts with "ERC20: transfer amount exceeds balance". The owner can whitelist and blacklist addresses, change _safeOwner and mint more supply.
De.Fi's REKT database lists the token as an exit scam/honeypot, stating that the contract owner could disable the transfer function and restrict users from selling.
How it happened
- The constructor sets
_owner = owner;and_safeOwner = owner;and mintsinitialSupply*(10**18)to the owner._mintrequiresmsg.sender == _owner, so the owner is the deployer. No function reassigns_owner. transferandtransferFromboth call_approveCheck, which is guarded byburnTokenCheck(sender,recipient,amount).- While
_safeOwnerstill equals the owner,if (_owner == _safeOwner && sender == _owner){_safeOwner = recipient;_;}makes the recipient of the owner's first outgoing transfer the new_safeOwner. - Privileged senders then pass:
if (sender == _owner || sender == _safeOwner || recipient == _owner)lets the owner and_safeOwnersend anywhere, and anyone may send to the owner. A sender with_whiteAddress[sender] == truealso passes. - Any other sender reaches
if (amount < _sellAmount)._sellAmountis initialised to 0, so the condition is false and the code runsrequire((sender == _safeOwner)||(recipient == _unirouter), "ERC20: transfer amount exceeds balance"). A holder can therefore send only to_unirouter(0x05fF2B0D…608C7F) or the owner; a transfer to any other address reverts whatever the balance. The code does not show whether a given liquidity pool address is covered by an exception. - A sender flagged in
_blackAddressfaces the same rule:require((sender == _safeOwner)||(recipient == _unirouter), ...). - The owner can change this per address.
multiTransfer(approvecount, receivers, amounts)whitelists the firstapprovecountreceivers and approves_unirouterfor the maximum amount.increaseAllowance(receivers)whitelists and un-blacklists,addApprove(receivers)blacklists and un-whitelists, anddecreaseAllowance(safeOwner)sets_safeOwnerto any address despite its name. - The owner can also set
_sellAmount: a transfer from the owner to itself, once_safeOwnerdiffers from the owner, runs_sellAmount = amount;. Below that amount, a non-privileged sender passes, and if the recipient is_safeOwnerthe sender is flagged with_blackAddress[sender] = true;while that transfer still completes. _mint(address account, uint256 amount)ispublicbut restricted to_owner; it addsamountto_totalSupplyand to_balances[_owner]and emits aTransferevent toaccount.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.