SafeHubble Honeypot
What happened
SafeHubble (SAFEHUBBLE) is a BNB Smart Chain token whose transfer and transferFrom both run through a burnTokenCheck modifier that lets only the owner, a stored _safeOwner, and whitelisted addresses move tokens freely. For every other holder, a transfer succeeds only if the recipient is a hard-coded _unirouter address or the owner, so a sale to a liquidity pair reverts with a misleading "transfer amount exceeds balance" message. The owner can also whitelist or blacklist addresses and change _safeOwner.
De.Fi's REKT database lists the token as an exit scam/honeypot, stating that the contract owner could disable the transfer function, which restricted users in selling their tokens.
How it happened
- The constructor sets
_owner = owner; _safeOwner = owner;and mints the whole supply to the owner. - Every
transferandtransferFromgoes through_approveCheck(...), which carries theburnTokenCheck(sender,recipient,amount)modifier. - If the sender is
_ownerwhile_owner == _safeOwner, the transfer passes and_safeOwner = recipientis set. Afterwards, transfers pass when the sender is_owneror_safeOwner, or when the recipient is_owner. - Senders in
_whiteAddresspass. For any other sender, the code only lets the transfer through ifamount < _sellAmount(initially 0, so never) orrequire((sender == _safeOwner)||(recipient == _unirouter), "ERC20: transfer amount exceeds balance")holds. The revert text mentions balance although the balance is not what is checked. - A sale moves tokens to the pair, so it succeeds only if that recipient is the hard-coded
_unirouter(0x05fF2B0D…608C7F) or_owner; otherwise it reverts for a non-whitelisted holder. - The owner can change who is exempt:
increaseAllowancewhitelists and un-blacklists addresses,addApproveblacklists them,decreaseAllowancereplaces_safeOwner, andmultiTransferwhitelists the firstapprovecountrecipients. A self-transfer by the owner sets_sellAmount, after which a non-listed sender may move amounts below that value to any recipient, and one whose recipient is_safeOwneris blacklisted. - No function in the file changes
_owner, and_mintis callable by_ownerat any time (it adds to_balances[_owner], whateveraccountis passed).
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.