MYSTERYToken Rug Pull
What happened
MYSTERYToken was a yield-farming token on BNB Smart Chain, with a MasterChef farm that paid out MYSTERY rewards. De.Fi's REKT database lists it as an exit scam / rug pull dated 2021-08-26 and gives no loss figure. The verified source puts no cap on supply: any address holding the minter role can call mint for any amount, and the farm owner can set the reward rate to any value.
The farm also lets the owner raise a pool's deposit fee to 100%.
How it happened
- At deployment the token mints its initial supply to the deployer,
_mint(msg.sender, _initialSupply);with_initialSupply = 338001*10**18, andMinterRole's constructor makes the deployer a minter (_addMinter(msg.sender);). minthas no cap:function mint(address _to, uint256 _amount) public onlyMinter { _mint(_to, _amount); ... }. A minter can add further minters withaddMinter, so the supply that holders and the liquidity pool are priced against is not fixed. A minter can give up the role withrenounceMinter(), but nothing in the code forces it.- The farm is how new tokens enter circulation.
updatePoolmintsMYSTERY.mint(devaddr, MYSTERYReward.div(10));andMYSTERY.mint(address(this), MYSTERYReward);, where the reward ismultiplier.mul(MYSTERYPerBlock).mul(pool.allocPoint).div(totalAllocPoint). This only works if the farm has been given the minter role, which the supplied source does not show. - The reward rate is owner-controlled and unbounded:
function updateEmissionRate(uint256 _MYSTERYPerBlock) public onlyOwner { massUpdatePools(); MYSTERYPerBlock = _MYSTERYPerBlock; }. A very high rate would make the nextupdatePoolmint a correspondingly large amount, one tenth of it todevaddr, which could then be sold into the market. - Deposit fees are capped only at 100%:
require(_depositFeeBP <= 10000, "set: invalid deposit fee basis points");. Indepositthe fee goes tofeeAddress(pool.lpToken.safeTransfer(feeAddress, depositFee);) and the depositor is crediteduser.amount.add(_amount).sub(depositFee), which is zero for the new deposit at 10000. Stakers who deposited before a fee change keep their recorded balance and can still callwithdraworemergencyWithdrawfor it. - What happened: De.Fi's REKT database lists MYSTERY as an exit scam / rug pull dated 2021-08-26 with no funds-lost value. No transaction was opened showing a mint, an emission change or a fee change, so the steps above describe what the code allowed, not a confirmed sequence.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.