MIAU Honeypot

Reported loss Not disclosed
BNB Chain
Honeypot

What happened

MIAU (MIAU) is a BEP-20 token on BNB Chain whose transferFrom, the function a PancakeSwap router uses to take tokens from a seller, passes through a contextHandler modifier that only the owner is exempt from. For everyone else, a transfer reverts if the seller's balance is at or above _maxTrxLimit, and reverts in every case once the owner turns on swapAndLiquifyEnabled. Both switches are owner-only with no bounds, so the owner can block every holder's sale at any time while plain transfer calls, which buyers receive from the pair, keep working.

The contract also contains a renounceOwnership that does not remove the owner and a burnTokens that credits new tokens to the owner. De.Fi's REKT database lists the token as an exit scam/honeypot.

How it happened

  1. The constructor credits the full supply of 100,000,000,000,000 MIAU to the deployer and sets _maxTrxLimit = 50000 * 10**15, which with 8 decimals is 500,000,000,000 MIAU.
  2. Buys work because the pair sends tokens with transfer, which has no restriction.
  3. A sale goes through transferFrom, guarded by contextHandler: for any from != owner, it requires from == owner when swapAndLiquifyEnabled is true, and otherwise requires balances[from] < _maxTrxLimit.
  4. The owner can call setSwapAndLiquifyEnabled(true) or setMaxTrxLimit(0), either of which makes every non-owner transferFrom revert with Order ContextHandler, while the owner's own sales are exempt.
  5. renounceOwnership(address) only writes a separate currentOwner variable, leaving the owner checked by onlyOwner unchanged, and burnTokens adds tokens to the owner's balance instead of removing them.

Protocol details

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

Build your security review skills

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