DINAR PROTOCOL Honeypot
What happened
DINAR PROTOCOL (DINAR) is a BNB Chain token whose transfer and transferFrom refuse any transfer to the address stored in newun, with the revert message "please wait". newun starts empty, and the first transferFrom call from a non-zero address sets it to that call's recipient. If that first call is the router moving tokens into a liquidity pair, the pair becomes the blocked address and every later router sell, which is a transferFrom to the pair, reverts.
The owner can reassign newun with transfernewun. De.Fi's REKT database lists DINAR as an exit scam/honeypot dated 2021-03-27 and describes the owner as able to disable the transfer function; it lists no loss figure. The contract was deployed in transaction 0x03bce7dd…9c13b3 on that day.
How it happened
- The constructor mints the whole supply (1,700,000 tokens with 18 decimals) to the deployer, who becomes
owner, and never setsnewun, so it starts as the zero address. transfercontainsrequire(to != newun, "please wait");, so a direct transfer to the address held innewunreverts for every sender, including the owner.transferFrombegins withif(from != address(0) && newun == address(0)) newun = to; else require(to != newun, "please wait");. The firsttransferFromwith a non-zerofromtherefore succeeds and stores its recipient innewun. No privileged-sender check applies; the first caller can be anyone.- When the first
transferFromis the router pulling tokens from the owner into a new pair, which is how liquidity is added through a router,newunbecomes the pair address. The analysis at the linked blog post describes this pattern, with the samenewunlines, for other BSC tokens. - After that, a swap back to BNB makes the router call
transferFrom(holder, pair, amount). Hereto == newun, so theelsebranch reverts with "please wait". The revert undoes the balance changes, so the holder keeps the tokens but cannot sell. A transfer to an address other thannewunis not blocked by these lines. - The owner can change the state with
transfernewun(address _newun), which isonlyOwner. Settingnewunto the zero address re-arms the first-transferFromcapture, while pointing it at an unused address lifts the block on the pair. The source has norenounceOwnership;transferOwnershipfollowed byacceptOwnershipmoves ownership. clearCNDAO()isonlyOwnerand sends the contract's own native-coin balance to the caller; it does not touch holders' token balances.- This is what the code allows. No transaction showing which address
newunheld, or any call totransfernewun, was opened.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.