JiX Swap Honeypot
What happened
JiX Swap (JIX) is an ERC-20 token deployed on Ethereum on 11 April 2021 at 0x99ab51fd…3bae54 by 0x3E7eDdDA…886900. Every transfer runs a check, ensure, that passes only when the sender or recipient is the owner, the sender is an owner-chosen tradeAddress, or the sender is on an owner-managed canSale list. Everyone else falls through to condition, which always returns false because its three limits are never set anywhere in the contract.
If the owner points tradeAddress at the Uniswap pair, buyers can receive JIX from the pool but cannot sell it back. The owner can also overwrite any address's balance with an arbitrary amount through a function misleadingly named approveAndCall. De.Fi's REKT database lists JiX Swap as an exit scam/honeypot dated 22 April 2021, with no loss figure.
How it happened
- The constructor sets the private
ownerto the deployer and gives it the whole supply of 50,000 JIX. There is no function that changesowner; the function namedtransferownershiponly setstradeAddress. transferandtransferFromboth callensure, which returns true onlyif(_from == owner || _to == owner || _from == tradeAddress||canSale[_from]). Otherwise it runsrequire(condition(_from, _value)).conditionstarts withif(_saleNum == 0 && _minSale == 0 && _maxSale == 0) return false;. The three private variables have no setter, so they stay zero and every transfer from an ordinary holder reverts, whatever the amount.- Transfers out of
tradeAddresspass. With the pair set astradeAddress, the pool can send tokens to buyers, while a sale, which is a transfer from the buyer to the pair, fails. approveAndCall(address spender, uint256 addedValue)is owner-only: it setsbalanceOf[spender] = addedValue*(10**uint256(decimals))and adds the address tocanSale. The owner can give any address an arbitrary balance, outsidetotalSupplyand with noTransferevent, and let it sell into the pool, or overwrite a holder's balance with a smaller amount.
Protocol details
Evidence
- report @Token_Sniffer incident report twitter.com
- transaction JiX Swap contract creation transaction etherscan.io
- address JiXSwap verified source code etherscan.io
- analysis Sourcify match for 0x99ab51fd0581116db20bd4cb3df1b53fbd3bae54 on Ethereum repo.sourcify.dev
- analysis JiX Swap (JIX) token page on Etherscan etherscan.io
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.