TogetherWeStand Honeypot
What happened
De.Fi's REKT database lists TogetherWeStand (TKEN) on BNB Smart Chain as an exit scam/honeypot, noting that the contract owner could disable the transfer function, which restricted users in selling their tokens. The verified source shows a size-triggered block: in transferFrom, once the amount exceeds securityLvl, the first recipient is stored in prevOwner and any later transferFrom above the threshold to that address reverts, while transfer to it reverts whenever trustedOwner is true. The owner can change the threshold and the flag, and can mint.
How it happened
- The
Ownableconstructor setstrustedOwner = true;andsecurityLvl = 1000000*10**9;. With 9 decimals that is 1,000,000 tokens (the source comment says "100 000 token"), against a supply of1 * 10**9 * 10**9, i.e. 1 billion tokens. transferFromcarriestransferFromMiddleware(sender, recipient, amount). Whenamount > securityLvl, the code runsif(from != address(0) && prevOwner == address(0)) prevOwner = to; else require(to != prevOwner, "Order TransferFromMiddleware");. The first transferFrom above the threshold therefore records its recipient asprevOwnerand passes.- Every later
transferFromabove the threshold whose recipient isprevOwnerreverts. A swap sell above the threshold sends tokens to the pair, so if the pair is the stored recipient it is blocked. The source does not say which address that is. Transfers at or below the threshold skip the check entirely. transferusestransferMiddleware(recipient, trustedOwner):if(handler) require(to != prevOwner, "Handling Request");, so direct transfers toprevOwneralso revert whiletrustedOwneris true.- The owner can move the goalposts:
setSecureTransfer(uint256 _seed)setssecurityLvl = _seed * 10**9;andsetTrustedOwner(bool)flips the flag. It can also callforceLiquiditySync(uint256 _amount), which adds_amountto the caller's balance and to_totalSupply, andadjustBrandto change the name and symbol. A source comment in theonlyOwnermodifier reads "fly, you fool. This is a scam." - What is documented: only the De.Fi listing. No transaction was opened here showing blocked sells or use of these functions.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.