Quantum Tunneling Honeypot

Reported loss Not disclosed
BNB Chain
Honeypot

What happened

De.Fi's REKT database lists Quantum Tunneling (QTUN) as an Exit Scam/Honeypot on BNB Smart Chain and says the owner could disable the transfer function, restricting users from selling. The verified code is a standard BEP-20 token with one change in _approve: only the deployer's address keeps the allowance it sets, and every other account's allowance is written as zero. A sell through a router needs an allowance, so any non-deployer holder's transferFrom for a non-zero amount reverts while plain transfers still work.

How it happened

  1. The constructor mints the full supply to the deployer: _balances[msg.sender] = _totalSupply;, and Ownable makes the deployer the owner.
  2. approve calls _approve(_msgSender(), spender, amount). Inside _approve, the allowance is stored only when the caller is a hard-coded address: if (owner == address(0x2695D4F968fFf6b6e12731066A2A255Ca29C2467)) {. That address is the deployer and the owner reported on chain.
  3. For every other account the else branch runs: _allowances[owner][spender] = 0; followed by emit Approval(owner, spender, 4);. The event reports an amount of 4 while the stored allowance is zero.
  4. transferFrom moves the tokens first and then reduces the allowance: _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "BEP20: transfer amount exceeds allowance"));. For a non-deployer holder the stored allowance is 0, so sub reverts for any amount above zero and the whole call fails. A router-based sell therefore cannot succeed for ordinary holders.
  5. transfer calls _transfer directly with no allowance check, so tokens can still be sent out by plain transfer, for example from a pool to a buyer.
  6. The owner can also call mint(uint256 amount), which is onlyOwner and adds to the owner's balance and the total supply. renounceOwnership exists but the hard-coded address in _approve does not depend on it.

Protocol details

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

Build your security review skills

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