SSSwap

First Flight #41
Beginner FriendlyRust
100 EXP
View results
Submission Details
Impact: high
Likelihood: high
Invalid

Rounding Errors in LP Token Calculation in the `liquidity_operations::liquidity_calculation` function

Description: The LP token calculation uses the geometric mean (square root of product) which can lead to rounding errors and potential value extraction. The current implementation doesn't account for these rounding errors properly.

Impact: Users might receive slightly fewer LP tokens than they should, or the pool might accumulate dust amounts that can't be withdrawn.

Recommended Mitigation: Implement a more precise LP token calculation method that accounts for rounding errors, or add a small buffer to ensure users receive at least the calculated amount.

Updates

Lead Judging Commences

0xtimefliez Lead Judge 14 days ago
Submission Judgement Published
Invalidated
Reason: Lack of quality

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.