A6 Token Rug Pull
What happened
A6 is a BEP20 token on BNB Smart Chain, paired with USDT on PancakeSwap. Its entire fixed supply of 6,868 tokens was minted in the constructor to the deployer address, which the code also exempts from fees. The owner role can raise the buy and sell fee without any cap, switch trading off for every non-whitelisted address, and blacklist a holder so that holder's transfers revert.
CertiK Skynet flagged an exit scam on the contract with 91.38% slippage and roughly $56K taken, and De.Fi's REKT database lists 60,852 USD lost, with the token price falling by more than 90%. Scammer address (as listed by De.Fi): 0x4ecb196c…f383ad.
How it happened
- The constructor mints the whole supply,
_balances[ReceiveAddress] = total;, to0x4ecb196c6BF588F20330eB6FbE1D8e15e5f383aD, which is also the deployer. The same address is whitelisted:_feeWhiteList[ReceiveAddress] = true;and_feeWhiteList[msg.sender] = true;. - In
_transfer, the pair-trade checks sit insideif (!_feeWhiteList[from] && !_feeWhiteList[to]), includingrequire(0 < startTradeBlock, "!Trading");and the fee. A whitelisted sender therefore trades with the pair without a fee and even while trading is closed, while an ordinary holder is subject to both. - For ordinary holders the owner controls the terms.
setFee(uint256 buyFee, uint256 sellFee)has no upper bound,closeTrade()setsstartTradeBlock = 0so every non-whitelisted pair trade reverts with!Trading, andsetBlackList(address addr, bool enable)makesrequire(!_blackList[from], "blackList");revert for the listed holder. The fee is taken asfeeAmount = tAmount * fee / 10000;, so a sell fee of 10000 makesfeeAmountequal to the whole sale amount: the sale goes through, the token contract receives everything and the seller receives 0. A sell fee above 10000 makestAmount - feeAmountunderflow and the sale reverts. claimToken(address token, uint256 amount, address to)lets the owner move any token held by the contract, including the fee tokens and USDT it accumulates, andsetFundAddressredirects the fee proceeds to a new address.- What happened, per outside sources: CertiK Skynet reported an exit scam on A6 with 91.38% slippage and approximately $56K taken, and De.Fi's REKT database lists the deployer address as the scammer and the loss as 60,852 USD from selling tokens and draining liquidity. The source code does not show which of the functions above, if any, were called; the transactions were not opened for this draft.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.