Why Is a Contract’s State Considered Inconsistent after an Unchecked Failed External Call?

If a contract performs a state change (Effect) before an external call (Interaction) and then the external call fails, the state remains consistent. However, if the external call happens before the state change, and the call fails, the contract might still proceed to execute subsequent logic, leading to an inconsistent state.

For example, a contract might record a withdrawal as successful without the funds actually being sent.

Can an Attacker Cause Both an Overflow and an Underflow in a Single Transaction?
How Does the UTXO Model Differ Fundamentally from the Account/Balance Model Used by Ethereum?
What Happens If a Transaction Runs out of Gas?
Why Is Updating State before an External Call the Critical Part of the CEI Pattern?
What Are the Risks of Using a ‘Mark Price’ versus a ‘Last Price’ for Liquidation Triggers?
What Are the Most Common Smart Contract Vulnerabilities?
How Is a Firm’s Internal Credit Scoring Model Used Alongside External Ratings?
How Does a Non-Reverting External Call Return Value Affect Contract Security?

Glossar