The provided PR in E5 attempts to limit the number of swaps to one per block to prevent bypassing arbitrage within a single block.
Analysis
The changes made in the PR like this one or this are not present in the final codebase given as part of the audit.
Although the codebase contains modifications on top of the PR, the PR achieves the task of implementing what it set out to.
It must additionally be said that in this particular case even though the final codebase is not exactly the same as the PR, it still contains the correct logic too albeit with different modifier & variable names. So the effect of the mismatch is negligible.
Lines of code
https://github.com/othernet-global/salty-io/blob/main/src/pools/Pools.sol#L65
Vulnerability details
Summary
The provided PR in E5 attempts to limit the number of swaps to one per block to prevent bypassing arbitrage within a single block.
Analysis
The changes made in the PR like this one or this are not present in the final codebase given as part of the audit.
Although the codebase contains modifications on top of the PR, the PR achieves the task of implementing what it set out to. It must additionally be said that in this particular case even though the final codebase is not exactly the same as the PR, it still contains the correct logic too albeit with different modifier & variable names. So the effect of the mismatch is negligible.
Conclusion
LGTM
Assessed type
Other