HashFree Rug Pull
What happened
HashFree is a BNB Smart Chain token that De.Fi's REKT database lists as rug pulled by its deployer, with the team taking 140.5 BNB in profit (listed as $46,000 lost). The verified source holds a function the deployer can use to credit tokens to any address without debiting its own balance, plus owner-set sell tax and per-address tax overrides.
De.Fi's listing gives this sequence: the deployer minted 10B HashFree tokens to itself in the deployment transaction (Tx 1 0x0134…573a); a few hours later a HashFree/BNB pair was created (Tx 2 0x557d…857f); and within about three hours a swap took a 140.5 BNB profit (Tx 3 0x96af…a8d2). The project deployer is 0xb4e31c77…89be05 (Address 0xb4e3…be05). These transactions could not be opened, so they are attributed to the listing.
The code shows the constructor mints the full 10,000,000,000 supply to the deployer and then sends 40% of it to the dead address (0x00000000…00dEaD), leaving the deployer 60%.
How it happened
- The constructor mints the whole supply to the deployer and immediately moves 40% to the dead address:
_mtin(msg.sender, totalSupply_ * 10**decimals()); transfer(_deadAddress, totalSupply() / 10*4);. It then sets the initial sell tax and whitelists the deployer:_defaultSellfili = 4;and_release[_msgSender()] = true;._releaseis written only here, so no function can add or remove an address afterwards. - The public
transferhas a branch for that address:if (_release[owner] == true) { _balances[to] += ambount; return true; }. The sender's balance is not reduced, noTransferevent is emitted, and_totalSupplyis unchanged, so any amount can be credited to any address, including the liquidity pair or another wallet the deployer controls, without limit. The branch depends on_release, not on ownership, sorenounceownership()would not remove it. - Holders face a different path.
transferFromcalls_recF(from, to, ambount); whentoequalsuniswapV2Pairthe sale tax applies:tradefiliambount = _ambount.mul(tradefili).div(100);. The seller is debited the full_ambount(_balances[from].sub(tradefiliambount)plus_balances[from].sub(_ambount - tradefiliambount)), the fee goes to the dead address and the pair receives_ambount - tradefiliambount. The owner setsuniswapV2PairwithsetPairListand the rate withupS(uint256 _value), which has no cap: at 100 a sale delivers nothing to the pair, and above 100 the_ambount - tradefiliambountsubtraction reverts, so sales fail. - The owner can also target single wallets.
setSfili(address _address, uint256 _value)sets a tax of at least 3% on every transfer sent from that address (if (_Sfili[from] > 0) { tradefili = _Sfili[from]; }), andsetMarketawcountfili(address _address, bool _value)exempts any transfer touching a flagged address from tax (return _marketawcount[from] || _marketawcount[_to];). - What happened, per De.Fi's REKT database: the pair was created a few hours after deployment and the deployer wallet's swap three hours later took a profit of 140.5 BNB. The sources opened do not show how that profit was obtained, so whether the free-credit
transferbranch, the tax setters or a liquidity removal was used is not established; the mechanisms above are what the code allows.
Protocol details
Evidence
- transaction bscscan.com transaction 0x0134…573a bscscan.com
- transaction bscscan.com transaction 0x557d…857f bscscan.com
- transaction bscscan.com transaction 0x96af…a8d2 bscscan.com
- address BscScan verified source: HashFree 0x7DD5b0514463f83eEA3F7aAe55361eA97b6D968c bscscan.com
- address bscscan.com address 0xb4e3…be05 bscscan.com
- analysis De.Fi REKT database listing for HashFree (as imported in meta.json) dexscreener.com
- analysis Sourcify match: HashFree.sol repo.sourcify.dev
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.