Patex Rug Pull
What happened
This PATEX token on BNB Chain borrowed the name of the Patex project; CertiK called it a fake Patex token and said its deployer had created 11 tokens imitating other projects. It was deployed on 14 July 2023 by 0x2c6275ae…d5852f, which is still its owner. Its transfer and transferFrom return true without moving tokens whenever a transfer is refused. Sales into the pair or router pass only while two owner-set limits, _theNumber and _theRemainder, allow them, so the owner can stop every sale with one call, while buys and whitelisted wallets are never checked. The owner can also mint unlimited tokens to itself through rewardHolders, which emits no Transfer event, and the master address holds an unlimited allowance over the pair's PATEX.
On 18 July 2023 CertiK reported a large liquidity removal. De.Fi's REKT database puts it at 499 WBNB, about 121,664.74 USD, removed from the PancakeSwap V2 pool in transaction 0x42a22f6b…14bfb2 and split across four wallets.
How it happened
- The constructor mints the 9,999,999.000 PATEX supply (3 decimals) to the owner, makes the owner
master, whitelists it, and sets_allowances[address(_pair)][master] = ~uint256(0). transferandtransferFromonly call_transferwhen_canTransferreturns true. Otherwise they stillreturn true, so a refused transfer moves nothing and does not revert._canTransferlets whitelisted wallets and transfers from the router or pair (buys) through. A transfer to the router or pair (a sale) passes only ifbought >= sold + amount && _theNumber >= soldETH + amountETH && sender.balance >= _theRemainder; other wallet-to-wallet transfers return false.- The owner can call
setNumber(0)to block any sale worth more than zero BNB, orsetRemainderto require more BNB in the seller's wallet than any holder has. The deployer is still owner. rewardHolders(amount)addsamountto the owner's balance and to_totalSupplywith no event, a hidden mint the owner could sell into the pool.mastercan also pull PATEX out of the pair with its allowance and callsyncPair().- CertiK reported a large liquidity removal on 18 July 2023. No source opened here shows
setNumber,setRemainderorrewardHoldersbeing called.
Protocol details
Evidence
- report @CertiKAlert incident report twitter.com
- report CertiK Alert: large liquidity removal on a fake Patex token (18 July 2023) twitter.com
- transaction PATEX contract creation transaction bscscan.com
- transaction bscscan.com transaction 0x42a2…bfb2 bscscan.com
- address Patex (PATEX) verified contract code on BscScan bscscan.com
- address bscscan.com address 0x2c62…852f bscscan.com
- analysis Sourcify match for 0x231B69254D48dE6e96C395100b3d9BCe8D658E49 on BNB Chain repo.sourcify.dev
- analysis De.Fi REKT database listing for PATEX de.fi
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.