Pug Token Honeypot
What happened
Pug Token (PUG) on Ethereum, contract 0x0d5be6ed…0400c5, blocks transfers to a stored address named newun. The first transferFrom call while newun is empty stores its recipient there, and from then on every transfer or transferFrom to that address reverts with "please wait". If that address is a trading pool, holders cannot sell into it.
The owner can reassign newun at any time with transfernewun. De.Fi's REKT database lists the token as an Exit Scam/Honeypot dated 2021-04-19; its text speaks of disabling the transfer function, which the code does through this recipient block.
How it happened
- The constructor sets the symbol to PUG and mints
_totalSupply = 1000000000000000000000000000000(10^30 units, 10^12 tokens at 18 decimals) to the deployer, which is also theowner. transferFrombegins withif(from != address(0) && newun == address(0)) newun = to; else require(to != newun, "please wait");. The first call made whilenewunis the zero address records the recipient asnewunand goes through; after that everytransferFromwhosetoequalsnewunreverts.transferhas the same check,require(to != newun, "please wait");, so a direct transfer tonewunalso reverts.- The blog post cited in the listing describes this pattern in other tokens:
newunis set to the liquidity pool address when liquidity is first added, after which swaps back to the pool fail. If that happened here, sells would fail while buys, which are transfers from the pool, would still pass. The code alone does not show which addressnewunholds. transfernewun(address _newun) public onlyOwnerlets the owner overwritenewun. Setting it toaddress(0)makes the nexttransferFromstore a new recipient; pointing it at an unused address lifts the block.clearCNDAOisonlyOwnerand sends the contract's own ETH balance to the owner. The token's fallbackfunction() external payable {}accepts ETH, so ETH sent to the token address can be withdrawn by the owner.- What happened: the supplied sources do not show sale attempts, losses or liquidity removal for this token. De.Fi's REKT database lists it as an Exit Scam/Honeypot on 2021-04-19.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.