PANKY TOKEN Honeypot
What happened
PANKY TOKEN (PANKY) is a BNB Smart Chain token whose _transfer function reverts for ordinary holders while a private TIME flag is true. The flag defaults to true and only the owner can change it with setTIME. De.Fi's REKT database lists the token as an exit scam/honeypot and states that the owner could disable the transfer function, which restricted users in selling their tokens.
The code allows that: a holder moving tokens to anyone other than the owner is rejected, so a sale into a liquidity pair fails.
How it happened
- The constructor mints the whole supply to the deployer:
_mint(msg.sender, 1000000000000000e18);. The deployer is also theOwnableowner. - The private flag defaults to on:
bool private TIME = true;. Only the owner can change it:function setTIME (bool _bool) public onlyOwner { TIME = _bool; }. - Every transfer, including
transferFromused by routers, passes through_transfer, which contains this check:if(sender != owner() && recipient != owner() && sender != pancake && TIME == true){ revert("FOR VALUE PROTECTION, YOU CAN ONLY SELL 1 Sale PER 30 MIN"); }. The revert text mentions a 30-minute limit, but the timestamp comparison in the source is commented out, so the revert is unconditional whileTIMEistrue. - A holder who sells sends tokens to a pair, so
senderis the holder,recipientis not the owner andsenderis notpancake. The call reverts. Transfers where the sender is the owner, where the recipient is the owner, or where the sender equalspancakeare not blocked.pancakeis overwritten with the recipient of any transfer made by the owner (if(sender == owner()){ pancake = recipient; }) and can also be set withaddPancake. - The owner has further levers in the same function:
fire(uint256 TKP)setsMAX, which caps the amount sent to any address marked withPOOL(require(amount <= MAX, ...)whenSWAP[recipient]andsecurityare set), andGTYA(address,bool)marks an address as abot, which makesrequire(amount <=0, "bots......")revert for that sender. - Whether and when the owner used these functions is not shown by the source. De.Fi's REKT database lists the token as a honeypot dated 2021-05-18.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.