Description: The AMM doesn't provide slippage protection for liquidity providers, potentially exposing them to front-running attacks. While the swap functions include slippage protection parameters ( min_out and max_in ), the liquidity provision function doesn't have similar protection. When a user provides liquidity by specifying only amount_a , the contract calculates amount_b based on the current pool ratio. However, if the pool ratio changes between transaction submission and execution (due to front-running), the user might provide more amount_b than expected.
Impact:
Liquidity providers are vulnerable to front-running attacks
Users may provide more tokens than intended if pool ratios change
Economic loss for liquidity providers
Proof of Concept:
Recommended Mitigation: Add a maximum token B parameter to the liquidity provision function:
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.