King Of The North Coin Honeypot
What happened
King Of The North Coin (KOTN) has a rewritten private _approve that stores a real allowance only when the owner argument is the hardcoded address 0x5399d609…8D9006 (the deployer address) and stores 0 for every other address. A DEX router sells by calling transferFrom, which subtracts the amount from that zero allowance and reverts, so ordinary holders cannot sell through a router even though their approve call succeeds. The owner also holds uncapped fee setters and setMaxTxPercent, which can set the per-transfer limit to zero.
De.Fi's REKT database lists the token as an Exit Scam/Honeypot with no loss figure and says the owner could restrict selling.
How it happened
- The constructor credits the full supply to the deployer and creates the token's liquidity pair through the hardcoded router at 0x10ED43C7…56024E.
_tTotal = 1000000000000000 * 10**9with_decimals = 9, so 1,000,000,000,000,000 tokens; the deployer is 0x5399d609…8D9006. _approveis changed to:if (owner == address(0x5399d609E723607948dFF3A9032F191aaC8D9006)) { _allowances[owner][spender] = amount;for that address, and_allowances[owner][spender] = 0; emit Approval(owner, spender, 0);for everyone else.approvecalls it, so a holder's approval of the router stores nothing.- A sell through a router calls
transferFrom(holder, pool, amount). After_transferthe function runs_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")). The allowance is 0 and_transferrequiresamount > 0, sosubreverts and the sell is undone. Plaintransferdoes not touch allowances, so wallet-to-wallet moves and tokens leaving the pool to a buyer are not blocked by this rule. - The restriction is tied to the hardcoded address, not to the
Ownableowner:renounceOwnershipexists but does not change_approve. The owner can also callsetMaxTxPercent(0), which sets_maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2)to 0, sorequire(amount <= _maxTxAmount, ...)fails for every transfer where neither side is the owner, andsetTaxFeePercent/setLiquidityFeePercentaccept any value (a combined fee above 100 makes transfers revert throughSafeMathsub). - The contract's own liquidity routine hits the same rule:
swapTokensForEthcalls_approve(address(this), address(uniswapV2Router), tokenAmount), which stores 0, so the router's pull from the contract reverts._transfercallsswapAndLiquifywhen the contract's token balance reachesnumTokensSellToAddToLiquidity(250000000000 * 10**9),swapAndLiquifyEnabledis true andfrom != uniswapV2Pair, so once fees accumulate to that level, transfers not sent from the pool revert as well. - What happened: De.Fi's REKT database lists the token as an Exit Scam/Honeypot dated 2021-07-02. No transaction showing a reverted sell, a
setMaxTxPercentor fee-setter call, or any liquidity removal was opened, so the code shows what the owner can do, not what was done.
Protocol details
Evidence
- report @Token_Sniffer incident report twitter.com
- address BscScan verified source for King Of The North Coin 0xe28d8f5587c10a7a61aaccc435316a47a8b44fd2 bscscan.com
- analysis BSC-SCAM: PancakeSwap NoApproval Mechanism cryptot3ddybear.gitlab.io
- analysis Sourcify match for 0xe28d8f5587c10a7a61aaccc435316a47a8b44fd2 (chain 56) repo.sourcify.dev
- analysis De.Fi REKT database listing for KOTN (Exit Scam/Honeypot, 2021-07-02) de.fi
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.