DEFIX Honeypot

Reported loss Not disclosed
BNB Chain
Honeypot

What happened

DEFIX (DFX) is a BNB Smart Chain token whose transferFrom records the first recipient it sees in a variable called newun and from then on rejects every transfer to that address with "please wait". If that first recipient is the liquidity pair, which is what happens when liquidity is added through a router that pulls tokens with transferFrom, nobody can sell into the pair afterward. The owner alone can change newun.

De.Fi's REKT database lists DFX as an exit scam/honeypot dated 2021-05-05 and says the owner could restrict selling.

How it happened

  1. The constructor sets symbol = "DFX", name = "DEFIX", decimals = 9 and _totalSupply = 100000000000000000 (1e8 tokens), all credited to the deployer, who is also owner.
  2. The newun address starts empty. The first transferFrom call runs if(from != address(0) && newun == address(0)) newun = to;, so the recipient of that call is stored as newun, whoever it is. A router adding liquidity pulls tokens into the pair with transferFrom, so that call would set newun to the pair.
  3. After that, transferFrom takes the else branch: else require(to != newun, "please wait");, and transfer has require(to != newun, "please wait");. Any transfer whose recipient is newun reverts. A sell is a transfer of tokens to the pair, so with newun equal to the pair every sell reverts, for holders and for the owner alike (the owner has no exemption).
  4. Buys are unaffected, because tokens move out of the pair rather than into it, so holders can acquire the token but not sell it back.
  5. transfernewun(address _newun) is onlyOwner. Setting newun to an address nobody uses lifts the block; setting it to address(0) re-arms the capture so the next transferFrom recipient becomes the blocked address. The contract also has clearCNDAO(), which sends the contract's BNB balance to the owner.
  6. The code shows what is possible. No transaction was opened to show who the first transferFrom recipient was or whether the owner changed newun. The same pattern was described for BSC tokens in April 2021 in a third-party write-up on a "stealthy LP block".

Protocol details

Classification Exchange (DEX)
Protocol Type Exit Scam/Honeypot
Affected asset / contract DFX

Build your security review skills

Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.