NFT Farm Honeypot
What happened
NFT Farm (NFTF) is a BNB Chain token whose transfer check rejects every transfer by an ordinary holder, including a sale into a PancakeSwap pool. Both transfer and transferFrom call ensure, which only lets a transfer through if it comes from the owner, goes to the owner, comes from the owner-chosen tradeAddress, or comes from an address the owner has flagged in canSale. Every other transfer must pass condition, which returns false while _saleNum, _minSale and _maxSale are all zero, and the contract has no function that sets them.
The owner can also give any address any balance through a function disguised as approveAndCall. De.Fi's REKT database lists the token as an exit scam/honeypot.
How it happened
- The constructor credits the full supply to the deployer, stored in a private
ownervariable. transferforwards totransferFrom, and both runrequire(ensure(_from, _to, _value)).ensurereturnstrueimmediately onlyif(_from == owner || _to == owner || _from == tradeAddress||canSale[_from]); otherwise it callscondition.conditionstarts withif(_saleNum == 0 && _minSale == 0 && _maxSale == 0) return false;, and no function in the contract ever writes these three variables, so every other transfer reverts.- The owner can set
tradeAddressthroughtransferownership(address addr), which does not change the owner. IftradeAddressis the PancakeSwap pair, tokens can leave the pair to buyers while holders cannot send tokens back into it. approveAndCall(spender, addedValue)is owner-only, overwritesbalanceOf[spender]with any amount without changingtotalSupply, and flags the address incanSaleso it can sell freely.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.