Repeatedly reading usersAddress.length or calling IERC20(asset()).balanceOf(address(this)) multiple times is marginally wasteful.
Likelihood:
Reason 1 // Describe WHEN this will occur (avoid using "if" statements)
Reason 2
Impact:
Higher gas costs (not security-critical) — scales poorly at high user counts.
No exploit — suggestion only.
Cache uint256 len = usersAddress.length; in loops.
• Cache uint256 vaultBal = IERC20(asset()).balanceOf(address(this)); once per function where used multiple times.
Gas optimizations are invalid according to the CodeHawks documentation.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.