Web3Memes Rug Pull
What happened
Web3Memes (W3M) is a PancakeSwap-pair token with a trading gate and a blacklist. The owner can switch trading on and off with openTrading, and any whitelisted address can add addresses to a blacklist that blocks their sells. Whitelisted addresses (the deployer from the start) are exempt from these checks.
De.Fi's REKT database lists the incident as an exit scam / rug pull of 27,699 USD: it says the deployer added liquidity in BscScan transaction 0xea56cfd5…f00b58 and later removed it in transaction 0x5dce841c…8e6de0. On 2022-02-23 PeckShield's alert said Web3Memes had been rugged and that the address 0x5adbffa7…a3494f had deposited 625 BNB to Tornado Cash.
How it happened
What the code allows:
- The constructor gives the full supply to the deployer and whitelists the deployer and the token contract:
_tokenBalances[_msgSender()] = _tokenTotalSupply; _isAddressWhitelisted[owner()] = true;. - Transfers between two non-whitelisted addresses need
_isTradingOpen, which only the owner can change:function openTrading(bool value) public onlyOwner.require(_isTradingOpen);runs for every non-whitelisted transfer, so closing trading blocks both buys and sells for everyone outside the whitelist. With_isSwapEnabledset to true in the constructor (the contract has no function to change it),require(sender == uniswapV2Pair || recipient == uniswapV2Pair);also stops ordinary wallet-to-wallet transfers for non-whitelisted holders. - On sells (
recipient == uniswapV2Pair) the contract checksrequire(!_isAddressBlacklisted[sender], "Blacklisted"); require(!_isAddressBlacklisted[_msgSender()], "Blacklisted");. The first line blocks a blacklisted holder. In a router sell the second line checks the router address, because the router ismsg.senderoftransferFrom, so blacklisting the router would block every router-based sell. Buys, where the pair is the sender, are not blacklist-checked. modifyBlacklistandmodifyWhitelistare guarded byonlyWhitelist, notonlyOwner, so any whitelisted address can blacklist or whitelist wallets without limit. The code evidence does not show that any address was blacklisted or that trading was closed.
What De.Fi's REKT database and PeckShield report:
- De.Fi lists the deployer as adding liquidity and then removing it in a second transaction. PeckShield's alert of 2022-02-23 says Web3Memes was rugged and that an address it names deposited 625 BNB to Tornado Cash.
Protocol details
Evidence
- report De.Fi REKT database listing for Web3Memes (W3M) twitter.com
- transaction bscscan.com transaction 0x5dce…6de0 bscscan.com
- transaction bscscan.com transaction 0xea56…0b58 bscscan.com
- address Web3Memes verified source code on BscScan bscscan.com
- analysis Sourcify match for 0xBAd6ea539B1b9f150D6D0b95eF4f45aF70Bf0bCD repo.sourcify.dev
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.