Unidark Rug Pull
What happened
Unidark (DARK) is a small ERC20 token whose contract had a built-in airdrop and an ETH token sale, both configured by the owner. ETH paid into the sale stays in the token contract, and the owner-only function clearETH() sends the contract's entire ETH balance to the caller with no limit, delay or vesting. On 2020-10-08 the deployer called clearETH() and withdrew 85.1 ETH from the token contract in transaction 0xfa04a396…bda75a.
De.Fi's REKT database lists the project as an exit scam / rug pull, lists the loss as 29,887 USD, and says the team spread fabricated Vitalik Buterin statements on Telegram to build trust, that buyers contacted Binance's technical support, and that the deployer's address was frozen on the exchange.
How it happened
- The constructor mints the whole supply of
2**10 * 10**uint(decimals)(1,024 DARK) to the deployer, who is alsoowner.startAirdrop(...)andstartSale(...)areonlyOwner, so the owner chooses the block window, price and cap of the airdrop and the sale. - In
tokenSale, a buyer sends ETH (uint256 _eth = msg.value;) and receives tokens debited from the contract's own balance (balances[address(this)] = balances[address(this)].sub(_tkns);). The ETH remains in the token contract, and the empty payablefunction() external payable { }inUnidark_ERC20also lets it receive plain ETH transfers. - The contract exposes one function that moves that ETH out:
function clearETH() public onlyOwner() { address payable _owner = msg.sender; _owner.transfer(address(this).balance); }. It pays the whole balance to the owner, and nothing in the code limits when or how much. - On 2020-10-08 the deployer called
clearETH()from 0x2522B89D…79D0D0; Etherscan shows 85.10 ETH moved to that address and the transaction succeeded. - Per De.Fi's REKT database listing, buyers then contacted Binance's technical support and the deployer's address was frozen on the exchange.
Protocol details
Evidence
- transaction Etherscan transaction 0xfa04a396...da75a (clearETH) etherscan.io
- address Unidark (DARK) verified source code on Etherscan etherscan.io
- analysis De.Fi REKT database listing for Unidark (DARK) t.me
- analysis Web Archive web.archive.org
- analysis Sourcify match for 0xafb43414e6344f6310f29e9d7dc95d817ffd89e8 repo.sourcify.dev
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.