What Specific State Changes (Effects) Should Be Prioritized before an External Call?

The most critical state change to prioritize is updating the balance or entitlement of the caller. For example, in a withdrawal function, the user's balance must be set to zero or reduced before the Ether is transferred.

Other important state changes include updating counters, changing ownership status, or marking a condition as met. Essentially, any variable that the external call's success or failure depends on, or any variable that could be exploited if left unchanged, must be updated before the interaction occurs.

What Is the Preventative Measure Called Checks-Effects-Interactions?
What Is a ‘Front-Running’ Attack in the Context of an Oracle Price Update?
How Does a Storage Variable Update Relate to the “Effects” Stage of the CEI Pattern?
Why Must State Updates Occur before External Calls?
What Is the Difference between ‘Call’ and ‘Delegatecall’?
Why Does a Transparent Proxy Need to Check the Caller’s Address?
How Can a Developer Restrict the Logic within a Fallback Function?
How Is the Call Function in Solidity Related to Reentrancy?

Glossar