MoonFly Honeypot

Reported loss Not disclosed
BNB Chain
Honeypot

What happened

MoonFly (MoonFly) is a BEP20 token on BNB Smart Chain at 0x6a1be7cb…79b116. Its transfer and transferFrom functions both revert when the recipient equals the stored address newun, and the first transferFrom made while newun is empty stores that call's recipient in it. A security write-up of this code pattern describes newun capturing the liquidity-pool address when liquidity is first added, after which swaps that send tokens back to the pool fail with "please wait" while buys are unaffected.

The owner can also overwrite newun through transfernewun. The source header advertises reflection, burn and automatic LP, none of which appear in the code. De.Fi's REKT database lists the token as an Exit Scam/Honeypot and states that the owner could disable transfers, restricting users from selling; it gives no loss figure.

How it happened

  1. The constructor assigns the whole supply to the deployer: balances[owner] = _totalSupply;.
  2. The first transferFrom call made while newun is unset records its recipient: if(from != address(0) && newun == address(0)) newun = to;. The code does not check who the caller or recipient is, so whichever address receives tokens in that first transferFrom becomes newun. The write-up describes this as the step that captures the liquidity pool when liquidity is added.
  3. After that, both transfer paths refuse that recipient: require(to != newun, "please wait"); appears in transfer, and the else branch of transferFrom applies the same check. A DEX sale moves the holder's tokens to the pool with transferFrom, so if the pool is the stored newun the sale reverts, while a buy (pool sending to the buyer) passes the check.
  4. The owner can change the blocked address at any time with function transfernewun(address _newun) public onlyOwner. Setting it to address(0) re-arms the capture, and the next transferFrom recipient is stored; pointing it at an address nobody uses lifts the block.
  5. What happened: De.Fi's REKT database lists MoonFly as a honeypot dated 2021-05-18. No transaction showing the owner calling transfernewun, and no liquidity-removal transaction, was opened for this record.

Protocol details

Classification Token
Protocol Type Exit Scam/Honeypot
Affected asset / contract MoonFly

Build your security review skills

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