Jester DeFi Rug Pull
What happened
Jester DeFi's token contract gives its operator several switches over holders: a one-way trading switch, a transfer-size cap that can be set to almost nothing, and a per-address blacklist that stops listed holders from sending tokens. De.Fi's REKT database lists Jester DeFi (JEST) as an Exit Scam/Rugpull dated 2021-08-30 on BNB Chain, with no loss figure. The farm contract at 0x9B7Cf9EC…5DbB9E was deployed on 2021-06-29 by 0x9d7C7375…E1d879, the same address shown in De.Fi's proof link.
The code shows what the operator can do; no transaction was opened that shows any of these functions being called.
How it happened
JesterTokenstarts withbool private isTradeEnabled = false;. InantiWhale, a transfer where neither the sender nor the recipient is excluded runsrequire(isTradeEnabled,"JESTER::transfer: You cannot make transactions yet");. Only the deployer, the zero address, the token and the burn address are excluded at construction, so ordinary holders cannot transfer until the operator callsenableTransaction(). That function only sets the flag to true.- The same modifier then runs
require(amount <= maxTransferAmount(), ...), withmaxTransferAmount()equal tototalSupply().mul(maxTransferAmountRate).div(10000).updateMaxTransferAmountRateonly checks_maxTransferAmountRate <= 10000, with no minimum, so the operator can set a rate such as 1 (0.01% of supply) and make larger transfers by non-excluded addresses revert, or set 0, which makesmaxTransferAmount() > 0false and skips the whole check. _transferstarts withrequire(_blackList[sender] == false,"JESTER::transfer: You're blacklisted");, andtransferFromcalls_transfer(sender, recipient, amount)with the holder whose tokens are moved assender. The operator can calladdToBlackList(_account, true)to stop that holder from sending, including selling through a router; receiving is not blocked. A blacklisted pair address would block transfers out of the pair, which are the buy side of a swap.- The farm lets its owner postpone rewards:
updateStartBlockHarvest(uint256)andupdateHarvestTime(uint256)areonlyOwnerwith no bounds, andpayOrLockupPendingJesteronly pays whenblock.number >= startBlockHarvest && block.number <= lastBlockHarvest; otherwise rewards are added touser.rewardLockedUp.withdrawandemergencyWithdrawstill return staked LP tokens viapool.lpToken.safeTransfer(address(msg.sender), _amount);. - What happened: De.Fi's REKT database lists the project as an Exit Scam/Rugpull on 2021-08-30. The BscScan proof page could not be read, so which of these functions were used, and any amount lost, are not established here.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.