Photosynthesis Honeypot

Reported loss Not disclosed
BNB Chain
Honeypot

What happened

Photosynthesis (PSY) is a BNB Smart Chain token whose _approve function wipes every holder's allowance. Only one hard-coded address, which matches the deployer address, is allowed to keep an allowance. Because transferFrom subtracts the amount from the caller's allowance, any ordinary holder's transferFrom for a non-zero amount reverts, and a sale that pulls tokens through transferFrom fails.

De.Fi's REKT database lists the token as an exit scam/honeypot and says the contract owner could disable the transfer function, which restricted users in selling their tokens.

How it happened

  1. The constructor mints the whole supply of 1298000000000 raw units (4 decimals) to the deployer: _balances[msg.sender] = _totalSupply;.
  2. Every allowance write goes through _approve, which branches on a literal address: if (owner == address(0x394FB89C650Ce6eE5D5A02EB8a194C27eFD5f919)) { _allowances[owner][spender] = amount; ... } else { _allowances[owner][spender] = 0; emit Approval(owner, spender, 0); }. For every other holder the stored allowance is always 0, whatever approve, increaseAllowance or decreaseAllowance is called with.
  3. transferFrom moves the tokens and then runs _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "BEP20: transfer amount exceeds allowance"));. With an allowance of 0, the sub reverts for any amount above zero, so the whole transferFrom call reverts for an ordinary holder.
  4. Plain transfer calls _transfer directly and does not touch allowances, so holders can still send tokens wallet to wallet. A sale that has the router pull tokens with transferFrom is the case that fails. The hard-coded address is not restricted, so its approvals and transferFrom calls work.
  5. The address is a literal in the bytecode, so renounceOwnership or transferOwnership does not remove the exemption or the block. The owner can also call mint(uint256), which credits new tokens to the owner and raises _totalSupply.

Protocol details

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

Build your security review skills

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