HUT Rug Pull
What happened
HUT is a BNB Chain token whose entire capped supply of 3,333,333 HUT is minted to the deployer address in the constructor, and whose controls sit with a governance address and a set of hxkers that the governor can extend without limit. Those addresses can switch on a whitelist-only trading mode, blacklist any sender, and withdraw any token held by the contract, including the liquidity tokens the contract itself receives. Non-whitelisted holders pay an 11% fee on pair trades, lose 49% on wallet-to-wallet transfers, and can sell at most 30% of their balance per 24 hours, while the deployer address, which the constructor whitelists, is exempt.
On 2022-08-21 CertiK Alert posted that it saw a rug pull on HUT after the price dropped over 90%, saying 10,150 HUT from the initial distribution were sold for 509K USDT in an unverified USDT-HUT pool. De.Fi's listing gives the same 509,000 USD figure and names three addresses involved: the token deployer 0x6a5d9cae…efa162, and 0xb75664b6…3794cc and 0x20e79a18…370767.
How it happened
- The constructor sets the governor and mints the whole capped supply to the deployer:
govn = msg.sender;and_hutlxlf(all, maxSupply);withall = 0x6A5d9CAE9630a509291cAB7eC6B07973E8eFA162andmaxSupply = 3333333 * 1e18. It also whitelists the deployer, once asalland once asmsg.sender(witeeaddress[all] = true; witeeaddress[msg.sender] = true;;allis the deployer address), and makes the deployer and 0x99a51aAA...hxkersthroughadHIUTker; 0x99a51aAA... is an operator but is not whitelisted. - Pair trades by anyone else are taxed and limited in
_transfer. A non-whitelisted seller to the pair must satisfyrequire(oamount <= ouseramount * 3 / 10);and a rolling 24-hour totalrequire(sellout[sender] <= ouseramount * 3 / 10);(30% of balance), then the sender is debited the full amount and the recipient receivesamount.mul(89).div(100); the other 11% goes 2% to the contract (burned while the burn address holds under 3,319,202 HUT), 3% tobackropadress, 4% to the contract and 2% tolpadress. Plain transfers between wallets keep onlyamount.mul(51).div(100), the other 49% going to the contract and burned. - All of this is skipped when either side is whitelisted:
if((witeeaddress[recipient]||witeeaddress[sender]) && isfeewhit) { }. The deployer address, being whitelisted, can sell to the pair without the 30% cap or any fee, andgovnor anyhxkercan add more whitelisted addresses withsetwiteeaddress2orsetWeaddress2. - The same operators can stop trading for everyone else:
setIscanswap(true)makes the pair branch requirewiteeaddress[recipient]on buys andwiteeaddress[sender]on sells (require(witeeaddress[sender], " sender not witee swap")), andsetblkddress2blacklists any address, whichisfeeblkenforces withrequire(blkddress[sender] == false, "ERC20:the blk address")on every transfer the address sends. The governor can also replace the pair (setpancakePair) and router (setpancakeswapV2Router). - A path to liquidity exists for the operators: the contract's auto-liquidity routine calls
addLiquidity(..., address(this), ...), so the liquidity tokens it mints stay in the token contract, andhuyhxlklets anyhxkermove any token held by the contract to themselves:require(hxkers[msg.sender], "hxker"); IERC20(ut).transfer(msg.sender, amount);.hutlxlf(address account, uint amount)also lets anhxkermint, but only up tomaxSupply, so only tokens burned earlier could be re-minted. - What happened, per CertiK Alert (2022-08-21): the token price dropped over 90% and 10,150 HUT from the initial distribution were sold for 509K USDT in an unverified USDT-HUT pool; De.Fi's listing reports the same 509,000 USD. No transaction was opened for this record, so it is not established which of the controls above, if any, was used, or whether the sale went through the contract's
pancakePair.
Protocol details
Evidence
- report @CertiKAlert incident report twitter.com
- report CertiK Alert community alert on $HUT rugpull x.com
- address HUT verified source on BscScan (local copy of the explorer-verified code) bscscan.com
- address bscscan.com address 0x20e7…0767 bscscan.com
- address bscscan.com address 0x6a5d…a162 bscscan.com
- address bscscan.com address 0xb756…94cc bscscan.com
- analysis HUT on Sourcify (chain 56) repo.sourcify.dev
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.