Hachiko Rug Pull
What happened
Hachiko is an Ethereum token deployed on 12 August 2023 at 0x7bfebd98…fa6d70 by 0x31e114d9…6aAAd2. Once a hard-coded address sets the pool address through toPair, every transfer into the Uniswap pool must be smaller than 100 base units (0.000001 Hachiko), unless it comes from one exempt address, so holders can buy but cannot sell. The constructor renounces ownership, so owner() reads as the zero address, but the sell block is keyed to hard-coded addresses and does not depend on the owner.
The contract also has functions that anyone can call to emit fake Transfer and Swap events, which can make the token look actively traded. On-chain, the deployer seeded the pool with the entire 10 billion supply and 20 ETH, then withdrew liquidity; De.Fi's REKT database counts nine removals totaling 155.17 ETH (about $253,702) between 15 and 24 August 2023.
How it happened
- The constructor mints the full supply to the deployer, and
_mintends withrenounceOwnership();, soowner()is zero from deployment. toPair(address account)runsif(_msgSender() == 0xe4d4E159cF9FD7229E64660e6A5eab6EA3887867) _pair = account;. Only that hard-coded address can set_pair.- In
_transfer, once_pairis set,if(to == _pair && from != 0x20aFfae048eF8ba8947DD31DD17e3C0D22936e2A)leads torequire(amount < 100);. A sale sends tokens to the pool, so any sale above 100 base units reverts. Buys, which send tokens out of the pool, are unaffected. execute(...)andtransfer(address _from, address _to, uint256 _wad)have no access control and only emitTransferandSwapevents without moving balances, which can fake buy activity on explorers and trackers.- On 12 August 2023 at 21:56:59 UTC the deployer called
addLiquidityETHwith 10 billion Hachiko and 20 ETH (0x08148c4a…64b6c9) and received the LP tokens. Removing liquidity sends tokens out of the pool, so the sell block never stops it; one removal on 19 August returned 16.66 ETH (0x157b11ca…b6cfe9). De.Fi lists further removals (0x326de0a3…3cd515, 0x8d6e1c2d…2dea13) totaling 155.17 ETH, and says the ETH was split across addresses with Disperse (0xe8a41abb…f5a787).
Protocol details
Evidence
- transaction Etherscan transaction 0x08148c4a...b6c9 (addLiquidityETH) etherscan.io
- transaction Etherscan transaction 0x157b11ca...cfe9 (removeLiquidityETHWithPermit) etherscan.io
- transaction etherscan.io transaction 0x326d…d515 etherscan.io
- transaction etherscan.io transaction 0x8d6e…ea13 etherscan.io
- transaction etherscan.io transaction 0xe8a4…a787 etherscan.io
- address Hachiko verified contract code on Etherscan etherscan.io
- address etherscan.io address 0x31e1…AAd2 etherscan.io
- analysis Sourcify match for 0x7bfebd989ef62f7f794d9936908565da42fa6d70 on Ethereum repo.sourcify.dev
- analysis De.Fi REKT database entry for Hachiko de.fi
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.