code-423n4 / 2022-01-trader-joe-findings

2 stars 0 forks source link

Code does not follow the best practice of check-effects-interaction #321

Open marchev opened 11 months ago

marchev commented 11 months ago

Title: Code does not follow the best practice of check-effects-interaction Description: Code should follow the best-practice of check-effects-interaction, where state variables are updated before any external calls are made. Doing so prevents a large class of reentrancy bugs. Severity: Low Example: https://github.com/code-423n4/2023-09-centrifuge/blob/main/bot-report.md#l08-code-does-not-follow-the-best-practice-of-check-effects-interaction

This would be implemented via AST and needs to check if state variables are updated after external calls.