code-423n4 / 2024-03-saltyio-mitigation-findings

0 stars 0 forks source link

M-28 MitigationConfirmed #89

Open c4-bot-10 opened 4 months ago

c4-bot-10 commented 4 months ago

Lines of code

Vulnerability details

Comments

In the original implementation, the first liquidity provider could suffer a loss on their deposited tokens by a front-run attack becuase slippage protection is ineffective for the first addLiquidity() transaction.

Mitigation

commit 0bb763c in Pools#addLiquidity(), minAddedAmountA and minAddedAmountB are introduced to ensure that the amounts of deposited tokens must not be less than these values. The original issue was resolved.

Conclusion

Confirmed

c4-judge commented 4 months ago

Picodes marked the issue as satisfactory

c4-judge commented 4 months ago

Picodes marked the issue as confirmed for report