code-423n4 / 2024-06-renzo-mitigation-findings

0 stars 0 forks source link

H-08 MitigationConfirmed #44

Open c4-bot-10 opened 4 weeks ago

c4-bot-10 commented 4 weeks ago

Lines of code

Vulnerability details

Original Issue Summary

In the original issue, the balance of the withdrawQueue is incorrectly calculated due to the usage of i instead of j. This introduces a miscalculation of the TVL, which in results impacts the users and can lead, for example, to less funds received/more funds received.

Mitigation

This mitigation proposes the usage of j instead of i:

-                        collateralTokens[i],
+                        collateralTokens[j],

Comments

This mitigation succesfully mitigates the original issue. Due to the usage of j instead of i, the balance of withdrawQueue will be correctly calculated, thus mitigating the imbalance created by the usage of i in the original issue.

Suggestion

n/a

Conclusion

LGTM

c4-judge commented 4 weeks ago

alcueca marked the issue as satisfactory