Skip to main content

How Does a Read-Only Reentrancy Attack Differ from These Two Types?

A read-only reentrancy attack is a more subtle exploit where an attacker re-enters a contract not to change its state directly (like draining funds), but to manipulate the logic by making the contract read a stale or inconsistent state. For example, an attacker could call a function that, mid-execution, reads a price from an oracle.

The attacker's callback could then manipulate the oracle price before the original function resumes, causing it to execute based on incorrect data. It doesn't steal funds directly but causes the contract to behave in an unintended, often exploitable, way.

How Does the Checks-Effects-Interactions Pattern Prevent Reentrancy Attacks?
How Does the Allowance() Function in an ERC-20 Contract Work?
What Is the Role of a Fallback Function in Facilitating a Reentrancy Attack?
How Does a Reentrancy Attack Relate to the DAO Hack?