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.Blacklist Mechanism
Boolean mapping to block specific addresses.Hidden Fee Toggle
Boolean that activates excessive fees.Sell Restriction
Boolean that only restricts selling, not buying.Safe Patterns
Immutable Trading Status
Transparent Blacklist with Governance
Detection Tags
| Tag | Severity | Description |
|---|---|---|
trading_toggle | High | Admin can enable/disable trading |
blacklist_function | Medium | Address blacklisting capability |
hidden_fee_toggle | High | Fees can be activated post-deployment |
sell_restriction | Critical | Selling can be blocked (honeypot) |
whitelist_only | Medium | Only whitelisted addresses can trade |
API Response Example
Red Flags
-
tradingEnabledor similar toggleable boolean - Blacklist/whitelist mappings with admin control
- Different logic for buy vs sell transactions
- Fee variables that can be changed post-deployment
-
onlyOwnerfunctions that affect transfer logic - Boolean checks that exempt owner from restrictions
