How Does a Storage Variable Update Relate to the “Effects” Stage of the CEI Pattern?
The "Effects" stage of the Checks-Effects-Interactions pattern specifically refers to updating the contract's state variables, which are stored in the contract's storage. In the context of a withdrawal, the critical effect is setting the user's balance to zero or deducting the withdrawal amount.
By performing this storage update before the external call, the contract ensures that a re-entry attempt will see the updated, lower balance, thus failing the check.