Skip to content
Request an audit

‹ All findings

Checks effects interactions pattern should always be used

Low/InfoGlacier·Three Sigma · Liquid staking · 12th July, 20233S-GLACIER-N05

Description

The checks-effects-interactions pattern should be used whenever possible, even if apparently it has no consequences. There are some instances specified in the relevant links where it isn't followed.

Recommendation

For example in withdraw() of glAVAX

solidity
... // Transfer the user with the AVAX
payable(user).transfer(toWithdraw);
_updateWithdrawTotal(toWithdraw);
...

Should be instead

solidity
... _updateWithdrawTotal(toWithdraw);
// Transfer the user with the AVAX
payable(user).transfer(toWithdraw);
...

Status

Currently being reviewed by the team.