MSG-02 | Lack of Price Slippage Protection When Adding or Removing Liquidity #3175
Labels
Minor
Reported as a minor vulnerability
Peggy2 Audit - Sifnode Issue
Issue that came out of the Peggy2 audits that requires remediation by Sifnode
Sifnode Team
Affected Files: clp/keeper/msg_server.go L241,403
Description
In
x/clp/keeper/msg_server.go
, the price slippage protection is applied in the functionSwap()
by introducing the parameterMinReceivingAmount
:However, the protection is not applied in the functions
RemoveLiquidity()
andAddLiquidity()
. When a significant price fluctuation happens, the message sender might not be able to receive the expected pool units when adding liquidity to a pool or expected token amounts when removing liquidity from a pool.Recommendation
Recommend adding price slippage protections for adding liquidity to or removing liquidity from pools.
The text was updated successfully, but these errors were encountered: