VanillaUnicorn Honeypot

Reported loss Not disclosed
BNB Chain
Honeypot

What happened

VanillaUnicorn is a token on BNB Smart Chain whose transferFrom only works when the token holder's address is on an allow list: require(allow[_from] == true);. Router-based sells call transferFrom with the holder as _from, so they revert for any holder who has not been allowed. Only the constructor's caller starts on the list, and the list can be changed only through addAllow, which the onlyOwner modifier restricts to one hard-coded address that differs from the deployer.

De.Fi's REKT database lists the token as an Exit Scam/Honeypot in which the owner could restrict holders from selling. The same hard-coded address can also call mint, which overwrites any address's balance.

How it happened

  1. The constructor sets balances[msg.sender] = totalSupply; and allow[msg.sender] = true;, so only the deployer starts on the allow list.
  2. transferFrom(_from, _to, _value) contains require(allow[_from] == true);. When a holder sells through a router, the router calls transferFrom with the holder as _from, so the call reverts unless the holder is on the list.
  3. Buys and plain transfers are not affected by that line. transfer has no allow-list check: it only requires _to != address(0) and a sufficient balance, and a buy moves tokens out of the pair to the buyer through transfer.
  4. modifier onlyOwner() {require(msg.sender == address(1080614020421183795110940285280029773222128095634));_;} hard-codes the controlling address as 0xbd486897…439192, not the deployer 0x16506D21…fF5D37. Only that address can call addAllow(address holder, bool allowApprove) to add or remove holders, transferOwnership, or mint. The owner storage variable set in the constructor is not what onlyOwner checks, and the code has no renounce function. Who controls the hard-coded address is not established.
  5. mint(address miner, uint256 _value) runs balances[miner] = _value;. It sets a balance to any value without changing totalSupply, so it can raise or zero any address's balance, including a pair's.
  6. What actually happened is not established by the code. The listing says the token was a honeypot; no transaction showing a failed sell, an addAllow or mint call, or a liquidity withdrawal was opened.

Protocol details

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

Build your security review skills

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