Skip to main content

Overview

Malicious Bool Checks are deceptive boolean conditions that can be manipulated to control contract behavior, often used to enable trading restrictions, block transfers, or execute rug pulls.

Types of Malicious Bool Checks

Trading Toggle

Admin-controlled boolean that can freeze all trading.
Risk: Owner can freeze trading after users buy in.

Blacklist Mechanism

Boolean mapping to block specific addresses.
Risk: Users can be blocked from selling their tokens.

Hidden Fee Toggle

Boolean that activates excessive fees.
Risk: Fees can be enabled post-launch to drain user funds.

Sell Restriction

Boolean that only restricts selling, not buying.
Risk: Users can buy but cannot sell (honeypot).

Safe Patterns

Immutable Trading Status

Transparent Blacklist with Governance

Detection Tags

API Response Example

Red Flags

  • tradingEnabled or similar toggleable boolean
  • Blacklist/whitelist mappings with admin control
  • Different logic for buy vs sell transactions
  • Fee variables that can be changed post-deployment
  • onlyOwner functions that affect transfer logic
  • Boolean checks that exempt owner from restrictions