StringFinance.io Honeypot
What happened
StringFinance.io (SGF) is a BEP-20 token on BNB Smart Chain with an owner-controlled list called PanCakeSwapReciever. Every transfer, including the transferFrom calls a router makes on a sell, goes through calculateFeesBeforeSend, which reverts with "Error: Can not sell this token" when the recipient is on that list. Only the owner can add or remove addresses, and the setter has no cap and is not covered by the renounceWhitelist switch.
De.Fi's REKT database lists the token as an Exit Scam/Honeypot in which the owner could restrict holders from selling. The code does not show which address, if any, was listed or when.
How it happened
- The constructor mints 8500000e18 SGF to the deployer with
_transferTO(msg.sender, 8500000e18);. - The owner can mark any non-zero address as a blocked recipient with
setPanCakeSwapReciever(address _recipient, bool _feeless), which only checksrequire(_recipient != address(0), ...)and then runsPanCakeSwapReciever[_recipient] = _feeless;. UnlikesetFeelessSenderandsetFeelessReciever, it is not gated bycanWhitelist, sorenounceWhitelist()does not disable it. _transfer, used by bothtransferandtransferFrom, callscalculateFeesBeforeSend(sender, recipient, amount), which runsif(PanCakeSwapReciever[recipient]){ revert("Error: Can not sell this token"); }. The sender's balance is debited earlier in_transfer, but the revert rolls that back, so a blocked transfer fails and the holder's balance is unchanged.- A DEX sell sends tokens to the pair, so if the pair address is on the list the sell reverts. Buys, where the pair is the sender and the buyer is the recipient, are not affected unless the buyer is listed. The code does not show whether the pair was ever listed.
- The owner can also remove an address with
setPanCakeSwapReciever(_recipient, false).renounceOwnership()exists, so the power can be given up. What happened on-chain is not established here; the claim that holders could not sell comes from De.Fi's listing.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.