NFTLogy Honeypot
What happened
NFTLogy (NTLG) is a BEP20 token whose BeforeTransfer modifier stores the recipient of the first transferFrom in nxOwner and then reverts any later transfer to that address unless the sender is _owner. If the stored address is a trading pair, ordinary holders cannot sell into it, while the owner address is exempt. The function named transferOwnership only overwrites nxOwner, so the owner can move or clear the blocked address.
De.Fi's REKT database lists the token as an Exit Scam/Honeypot and says the contract owner could restrict users from selling. An opened Token Sniffer post from 2021-05-05 describes this kind of LP-address block in other tokens and predates this deployment.
How it happened
- The constructor mints
1 * 10**12 * 10**9raw units to the deployer, who becomes_ownerand_leaveowner. transfercalls_transfer(..., false)andtransferFromcalls_transfer(..., true). Both run the modifierBeforeTransfer(from, to, fromTransfer).- The modifier runs
if(from != address(0) && nxOwner == address(0) && fromTransfer) nxOwner = to; else require((to != nxOwner || from == _owner), "Order TransferFromMiddleware");. The firsttransferFromwhilenxOwneris empty stores its recipient innxOwner. The source does not show which address that was. - After that, any
transferortransferFromwhose recipient isnxOwnerreverts unlessfrom == _owner. IfnxOwneris a pair, a sell is a routertransferFrom(holder, pair, amount)and reverts for every holder other than_owner, and the holder's balance is not debited. Buys, where the pair is the sender, are not blocked by this check. transferOwnership(address newOwner) public onlyOwnerdoes not change the owner; it runsnxOwner = newOwner;. Pointing it at an unused address lifts the block, and setting it to the zero address re-arms the capture for the nexttransferFrom.renounceOwnershipsets_owner = address(0), butonlyOwneralso accepts_leaveowner, which the function leaves unchanged, soonlyOwnercalls such astransferOwnershipremain available to that address.- What happened on-chain (which address
nxOwnerheld, sell attempts, liquidity removal, losses) was not established by the opened sources. De.Fi's REKT database lists the token as a honeypot.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.