Up DeFi Honeypot
What happened
De.Fi's REKT database lists Up DeFi (UPDF), contract 0x11fef700…d0dc20 on Ethereum, as an exit scam/honeypot and notes that the contract owner could disable the transfer function, which restricted users in selling their tokens. In the verified source, transferFrom calls ensure, which lets only the owner, the owner-set tradeAddress and addresses marked in canSale skip a condition check. That check returns false whenever its three limit variables are all zero, and the file contains no function that can change them, so every other holder's transfer reverts.
How it happened
What the code allows:
- The deployer becomes the owner and receives the whole supply:
owner = msg.sender; balanceOf[msg.sender] = totalSupply;.owneris private and no function reassigns it. - Every transfer goes through
transferFrom, which callsrequire(ensure(_from, _to, _value));before balances move. ensureexempts only a few senders:if(_from == owner || _to == owner || _from == tradeAddress||canSale[_from]){ return true; }. Everyone else reachesrequire(condition(_from, _value));.conditionstarts withif(_saleNum == 0 && _minSale == 0 && _maxSale == 0) return false;. These three variables areprivateand the only lines that mention them are insideconditionand their declarations, so nothing in the contract can raise them above zero. A holder who is not exempt therefore always fails therequire, including a sale where the holder is the_fromaddress.- The owner decides who is exempt:
transferownership(address addr)storestradeAddress = addr;(despite its name it does not changeowner), andapproveAndCall(address spender, uint256 addedValue)setscanSale[spender]=true;. approveAndCallalso overwrites a balance without touchingtotalSupply:if(addedValue > 0) {balanceOf[spender] = addedValue*(10**uint256(decimals));}.
De.Fi's REKT database lists the token as an exit scam/honeypot where the owner could disable transfers. No transaction showing the owner calling these functions was opened.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.