Raptor2 Rug Pull

Reported loss $84K
Rugpull

What happened

Raptor2 is a BNB Chain token deployed on 16 February 2022 at 0xC51B24E6…7755Ba. Its transfer function gives a whitelist, which starts with the owner and the token contract, a full bypass of every trading rule, while everyone else can only trade with the PancakeSwap pair, only while the owner keeps _isTradingOpen on, and can sell only if their address and the calling contract are not on a blacklist. Any whitelisted address can add wallets to that blacklist or the whitelist, and the owner can close trading for non-whitelisted holders at any time, so the deployer's side can sell while holders can be stopped.

According to De.Fi's REKT database, the deployer added the initial liquidity in transaction 0x78e7b5eb…2af9d4, later removed the liquidity and sold tokens in 0xfbceeb8c…c585f7, and sent the proceeds to 0xdaa5e569…f4d34a in 0xef06c291…86bd5d. PeckShield reported on 21 February 2022 that 0xdaa5e569…f4d34a dumped Raptor2 and deposited 855 BNB into Tornado Cash.

How it happened

  1. The constructor creates the PancakeSwap pair, gives the whole supply of 1,000,000,000,000 tokens (9 decimals) to the deployer, and whitelists the owner and the token contract.
  2. In _internalTransfer, any transfer where neither side is whitelisted must pass require(_isTradingOpen), and because _isSwapEnabled is set to true with no setter, it must also have the pair as sender or recipient, which blocks plain wallet-to-wallet transfers.
  3. When a non-whitelisted holder sells (recipient is the pair), the transfer reverts if the holder or _msgSender() (the router on a router sale) is in _isAddressBlacklisted.
  4. modifyBlacklist and modifyWhitelist are onlyWhitelist, not onlyOwner, so any whitelisted wallet can blacklist sellers or whitelist new wallets, and renounceOwnership would not remove those powers.
  5. openTrading(bool value) is onlyOwner and can switch trading off again, freezing every non-whitelisted holder while whitelisted wallets keep trading.
  6. De.Fi's listing says the deployer then removed the liquidity and sold, and PeckShield traced 855 BNB from 0xdaa5e569…f4d34a into Tornado Cash.

Protocol details

Classification Token
Protocol Type Exit Scam/Rugpull
Affected asset / contract Raptor2

Build your security review skills

Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.