Pepe Coin Rug Pull
What happened
This "Pepe" (PEPE) token on BNB Chain imitated the Pepe memecoin. Its verified contract does not contain its own transfer logic: transfer and transferFrom hand execution to a separate contract through delegatecall, and a whitelisted address can swap that contract at any time, so the code that decides whether a holder can sell is not part of the verified source and can be changed after people buy. The owner can also mint any amount of new tokens and keeps a blacklist that the delegated code can enforce.
CertiK reported a large liquidity removal on this imitation Pepe Coin, said the deployer removed about 65,000 USD from the liquidity pool, and noted that the deployer had created several imitation tokens before. De.Fi's REKT database dates the removal to 19 April 2023, puts the loss at about 95,000 USD, and says the deployer also sold tokens, dropping the price about 90%.
How it happened
- The constructor gives the deployer the 1 billion token supply and whitelists it:
_balances[_msgSender()] = _totalSupply;and_whitelist[_msgSender()] = true;. setProxyAddr(address _addr)only checks_whitelist[msg.sender] == trueand then setsproxyAddr. The owner can add more whitelisted addresses withaddWhitelist.transferandtransferFromrunproxyAddr.delegatecall(...). Delegated code runs with the token's own storage, so it can read and write every balance, the blacklist and the allowances. Whether a holder's sale succeeds depends entirely on that unverified contract, which can be replaced between a buy and a sell. The local_transferfunction is never called by either.mint(address account, uint256 amount)isonlyOwnerwith no cap, andaddBlacklistlets the owner mark any address. The contract hastransferOwnershipbut no renounce function. The token'stotalSupply()today reads about 1.27 trillion PEPE, over 1,000 times the 1 billion created at deployment.- CertiK reported that the deployer removed about 65,000 USD of liquidity from the pool; De.Fi's REKT database lists three removal transactions on 19 April 2023 with a total loss of about 95,000 USD.
Protocol details
Evidence
- report @CertiKAlert incident report twitter.com
- report CertiK Alert: large liquidity removal on an imitation Pepe Coin twitter.com
- transaction bscscan.com transaction 0x26ee…3dfc bscscan.com
- transaction bscscan.com transaction 0x51d4…aacf bscscan.com
- transaction bscscan.com transaction 0xb812…7de5 bscscan.com
- address ERC20Token (Pepe, PEPE) verified source code bscscan.com
- analysis Sourcify match for 0x79879c0a8B949458DFA60cA7A8df24f59e42bb1B on BNB Chain repo.sourcify.dev
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.