SafeRedux Honeypot
What happened
De.Fi's REKT database lists SafeRedux as an Exit Scam/Honeypot on Binance, noting that the contract owner could disable the transfer function, which restricted users in selling their tokens. In the verified source, every transfer and transferFrom passes through a burnTokenCheck modifier that, by default, only lets a holder send tokens to the hard-coded _unirouter address or to _owner; any other recipient reverts with "ERC20: transfer amount exceeds balance". The owner alone controls the whitelist, blacklist and _sellAmount values that loosen or tighten this rule, and _owner is fixed in the constructor with no function to change it.
The code shows what the owner can do; it does not show which addresses were whitelisted or blacklisted.
How it happened
- The constructor sets
_owner = owner;and_safeOwner = owner;and mints the initial supply to the owner with_mint(_owner, initialSupply*(10**18));. No function reassigns_ownerafterwards, and_mintstays callable by_owner(require(msg.sender == _owner, ...)), adding further tokens to the owner's balance. transferandtransferFromboth call_approveCheck, which is wrapped by theburnTokenCheckmodifier.- For an ordinary holder (not
_owner, not_safeOwner, not whitelisted, not blacklisted) the modifier ends inrequire((sender == _safeOwner)||(recipient == _unirouter), "ERC20: transfer amount exceeds balance");while_sellAmountis still its initial0, becauseamount < _sellAmountcan never be true. Such a holder can only send tokens to_unirouter(0x05fF2B0D…608C7F) or, through an earlier branch (recipient == _owner), to the owner. Any other recipient makes the call revert and the holder's balance is unchanged. - Senders that pass:
_owner,_safeOwner(the first branch re-points it to the recipient of the owner's first transfer:if (_owner == _safeOwner && sender == _owner){_safeOwner = recipient;_;}), addresses the owner whitelisted withincreaseAllowance(address[] receivers)or through the firstapprovecountreceivers ofmultiTransfer, and anyone sending anamountbelow_sellAmountonce the owner has set it by transferring to itself. - The owner can also call
addApprove(address[] receivers), which sets_blackAddressand clears_whiteAddress; a blacklisted sender is again limited torecipient == _unirouter(or_owner). In the below-_sellAmountbranch, a transfer to_safeOwnerboth goes through and blacklists the sender. - The contract does not show whether the pair address is
_safeOwneror_unirouter, so whether a given DEX sale reverts depends on the recipient of the token transfer. De.Fi's REKT database lists the token as a honeypot where selling was restricted; no transaction was opened that shows the owner calling these functions.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.