DARK DEFI Honeypot
What happened
DARK DEFI (DARK) is an Ethereum token deployed on 14 February 2021 at 0x2d98c5e9…a9850a by 0xfa5a97ce…a67b4a. Its transfer code only lets tokens move from the owner, from one owner-chosen tradeAddress, or from wallets the owner has whitelisted; every other holder's transfer and sale fails, because the sale-limit values it checks are all zero and the contract has no function to set them. The owner-only approveAndCall does not approve anything: it overwrites a chosen wallet's balance with any amount, without changing totalSupply, and whitelists that wallet to sell.
On 20 February 2021 the deployer called approveAndCall for 0x93ec7f43…bad66f in transaction 0x7d6ccdba…625b8e, and on 21 February it called it again with a much larger amount in transaction 0x32243fbb…f6fe47; about a minute later that wallet swapped 1,000 billion DARK for about 33.01 ETH on Uniswap. De.Fi's REKT database lists the loss as $26,543 and also names the initial liquidity transaction 0xc4bc0b94…4c29ea, an LP lock transaction 0x69a6c3d9…3f5693, further dumps 0x63987426…96139f and 0xddb8bc28…fa3d9c, and example transactions 0xef5c9b6d…51e76f and 0xc63eeb6f…bbfaa2.
How it happened
- The constructor mints the whole supply to the deployer and stores it as the private
owner; the contract has no function to change or renounceowner. transferFrom(whichtransferalso uses) callsensure, which passes only if_from == owner || _to == owner || _from == tradeAddress || canSale[_from]; otherwise it requirescondition(_from, _value).conditionstarts withif(_saleNum == 0 && _minSale == 0 && _maxSale == 0) return false;. The three values are private, default to zero and are never set anywhere, so every ordinary holder's transfer or sale reverts. Holders can only send tokens to the owner.transferownership(address addr)does not transfer ownership; it setstradeAddress, the one extra address (such as the pair) allowed to send tokens freely, which is what lets buys go through.approveAndCall(spender, addedValue)is owner-only and runsbalanceOf[spender] = addedValue*(10**uint256(decimals))andcanSale[spender]=true, so the owner can give any wallet an arbitrary balance thattotalSupplydoes not show, and let that wallet sell.- The deployer called
approveAndCallfor 0x93ec7f43…bad66f on 20 February 2021 (0x7d6ccdba…625b8e) and 21 February 2021 (0x32243fbb…f6fe47), and that wallet then sold 1,000 billion DARK into the Uniswap pool for about 33.01 ETH (0x3e7fb02a…03d9a6).
Protocol details
Evidence
- report Report darkdefi.org
- transaction DARK DEFI contract creation transaction etherscan.io
- transaction Etherscan: approveAndCall transaction 0x7d6ccdba...8e etherscan.io
- transaction Etherscan: approveAndCall transaction 0x32243fbb...47 etherscan.io
- transaction Etherscan: DARK to ETH swap transaction 0x3e7fb02a...a6 etherscan.io
- transaction etherscan.io transaction 0x6398…139f etherscan.io
- transaction etherscan.io transaction 0x69a6…5693 etherscan.io
- transaction etherscan.io transaction 0xc4bc…29ea etherscan.io
- transaction etherscan.io transaction 0xc63e…faa2 etherscan.io
- transaction etherscan.io transaction 0xddb8…3d9c etherscan.io
- transaction etherscan.io transaction 0xef5c…e76f etherscan.io
- address DARK DEFI (DARK) verified contract code on Etherscan etherscan.io
- address etherscan.io address 0x93ec…d66f etherscan.io
- address etherscan.io address 0xfa5a…7b4a etherscan.io
- analysis Web Archive web.archive.org
- analysis Sourcify match for 0x2d98c5e92da2204bc2e9142373ed209a7ca9850a on Ethereum repo.sourcify.dev
- analysis De.Fi REKT database listing for DARK DEFI de.fi
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.