DEXTrust.Finance Honeypot
What happened
The DEXTrust.Finance (DETS) token on Ethereum, contract 0x79e38991…ee5f38, only lets the owner, one owner-set trade address and owner-whitelisted addresses move tokens freely. Every other holder's transfer runs through a sale check whose limits are all zero and have no setter in the code, so the check always fails and the transfer reverts, unless the recipient is the owner. De.Fi's REKT database lists this token as an Exit Scam/Honeypot and states that the contract owner could disable the transfer function, which restricted users in selling their tokens.
How it happened
- The constructor credits the whole supply to the deployer and stores it as owner:
owner = msg.sender; balanceOf[msg.sender] = totalSupply;. - Every transfer goes through
transferFrom, which callsrequire(ensure(_from, _to, _value));before moving balances. ensurelets a transfer pass without further checks only in these cases:if(_from == owner || _to == owner || _from == tradeAddress||canSale[_from]){ return true; }. Any other sender must satisfyrequire(condition(_from, _value));.conditionbegins withif(_saleNum == 0 && _minSale == 0 && _maxSale == 0) return false;. The variables_saleNum,_minSaleand_maxSaleare private and are never assigned anywhere in the contract, so for an ordinary holderconditionalways returns false and the transfer reverts. This covers a sale to a pair or router as well as a plain wallet-to-wallet transfer; only a transfer to the owner gets through.- The owner can exempt addresses:
transferownership(addr)setstradeAddressandapproveAndCall(spender, addedValue)setscanSale[spender]=true, both restricted byrequire(msg.sender == owner);. Which addresses, if any, the owner exempted was not checked in a transaction. approveAndCallcan also overwrite a balance:if(addedValue > 0) {balanceOf[spender] = addedValue*(10**uint256(decimals));}assigns it directly without touchingtotalSupply.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.