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.