Lizard finance Honeypot
What happened
Lizard Finance (LZ) on BNB Smart Chain replaces the normal ERC-20 transfer path with an ensure check that only lets the owner, the owner as recipient, one tradeAddress, or addresses flagged in canSale send tokens. Any other sender must pass condition, which returns false while _saleNum, _minSale and _maxSale are all zero, and no function in the contract can change those variables. In the code as written, a holder who is not whitelisted by the owner therefore cannot transfer or sell.
De.Fi's REKT database lists LZ as an Exit Scam/Honeypot and describes it this way: the contract owner could disable the transfer function, which restricted users in selling their tokens. The proof link could not be retrieved, so no specific sale attempt or loss figure is verified here.
How it happened
What the code allows (no transaction was opened, so the owner's actual calls are not verified):
- The constructor sets
owner = msg.senderand gives the whole supply to it:balanceOf[msg.sender] = totalSupply;. - Every transfer runs
require(ensure(_from, _to, _value));.ensurereturns true only forif(_from == owner || _to == owner || _from == tradeAddress||canSale[_from]); for every other sender it runsrequire(condition(_from, _value));. conditionstarts withif(_saleNum == 0 && _minSale == 0 && _maxSale == 0) return false;. Those three variables areprivate, default to zero and are never assigned anywhere in the contract, so for a non-whitelisted sender therequirereverts every time.- Only the owner can open the gate:
transferownership(address addr)setstradeAddress = addr(despite its name it does not changeowner), andapproveAndCall(address spender, uint256 addedValue)setscanSale[spender]=true. A pool address that is neithertradeAddressnor incanSalecannot send tokens to buyers, and a holder not incanSalecannot send tokens to a pool, because the pool is notownereither. approveAndCallalso executesbalanceOf[spender] = addedValue*(10**uint256(decimals));whenaddedValue > 0. That line overwrites the spender's balance without changingtotalSupply.
De.Fi's REKT database lists LZ as an Exit Scam/Honeypot dated 2021-09-29, noting that the owner could disable the transfer function and restrict users from selling.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.