Detect hidden balance update vulnerabilities that let malicious smart contracts secretly alter ERC-20 token balances without authorization or events.
Overview
Hidden Balance Update vulnerabilities allow malicious contracts to modify token balances without proper authorization or transparency, enabling theft and manipulation.
Balance manipulation attacks are particularly dangerous because they can be difficult to detect - transactions appear normal while balances are secretly altered.
Types of Hidden Balance Updates
Direct Balance Manipulation
Modifying the balance mapping directly without proper mint/burn/transfer operations.
// DANGEROUS: Direct balance manipulationfunction adjustBalance(address account, uint256 amount) internal { _balances[account] = amount; // No events, no checks}
Risk: Balances can be changed arbitrarily without any record.