TOCTOU Vulnerability

Vulnerability

TOCTOU, or Time-of-Check to Time-of-Use vulnerability, describes a race condition where a system checks a condition at one point in time, but the state changes before the system uses the result of that check. In smart contracts, this vulnerability allows an attacker to manipulate the state between the check and the action, leading to unintended consequences. This is particularly dangerous in decentralized finance protocols where high-value transactions are executed based on real-time data.