Knight Honeypot
What happened
Knight ($Knight) is a BNB Smart Chain token (0xc78df97c…140719, deployed 2021-06-19 by 0x0912E13B…94Ce7F in transaction 0x3280292c…240b19) with 8 decimals and a supply of 1000000000000000000 base units credited to the deployer. Its transferFrom stores the recipient of the first call it ever receives in a variable called newun, and from then on both transfer and transferFrom revert with please wait for any recipient equal to newun. If that first recipient is a liquidity pool, which the code does not itself establish, sales into the pool fail while transfers out of it to buyers do not.
Only the owner can repoint newun. De.Fi's REKT database lists the token as an exit scam / honeypot dated 2021-06-19, saying the owner could disable the transfer function and that this restricted users in selling; its proof links include a CryptoT3ddyBear write-up of the same code pattern in other tokens. No loss figure, attacker address or exploit transaction is established.
How it happened
- The constructor makes the deployer
owner, setssymbol = "$Knight",name = "Knight",decimals = 8and credits the whole supply to the owner:balances[owner] = _totalSupply;. transferrejects any recipient equal tonewun:require(to != newun, "please wait");. Beforenewunis set it holds address(0), so this only rejects transfers to the zero address.transferFromcaptures the recipient on its first use:if(from != address(0) && newun == address(0)) newun = to;. Every later call takes the other branch,else require(to != newun, "please wait");. No sender, including the owner, is exempt.- A token sale through a router pulls tokens with
transferFrom, so ifnewunis the pool address (for example because the firsttransferFromwas the liquidity being added), the sale reverts withplease wait. A purchase moves tokens out of the pool to the buyer, whose address is notnewun, so the check does not block it. The check only looks at the recipient, so it does not by itself restrict transfers out ofnewun. - The owner controls the block through
function transfernewun(address _newun) public onlyOwner { newun = _newun; }. Pointingnewunat an unused address lifts the block for the pool; setting it to address(0) re-arms capture, so the nexttransferFromwith a non-zerofromstores its recipient again. clearCNDAO()isonlyOwnerand sends the contract's BNB balance to the caller, andKnightTOKENhas a payable fallback (function() external payable {). Ownership can be handed over withtransferOwnershipandacceptOwnership; there is no function to renounce it.- What happened is only what the listing states: De.Fi's REKT database records the token as an exit scam / honeypot dated 2021-06-19. The linked CryptoT3ddyBear post shows the same
newunlines in other tokens, and its author says buyers could swap in but got aplease waiterror when swapping back. The Token Sniffer proof link could not be opened and no transaction was examined, so the code shows how sales could be blocked, not when or by whomtransfernewunwas used.
Protocol details
Evidence
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.