-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
We should modify the LPer to incorporate user-provided price information when providing liquidity to PCL pools. This can be done by separating the one provide_double_sided_liquidity
message into two. One that provides liquidity at the pool ratio and one that provides liquidity at any ratio supplied by the user.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
// Provides liquidity at the pool ratio and optionally validates that the ratio is within the expected range. Typically used for XYK
ProvideLiquidityAtPoolRatio {
expected_pool_ratio_range: Option<DecimalRange>,
},
// Provides liquidity at user supplied ratio. Does not validate pool ratio. Typically used for custom pool types, like PCL
ProvideLiquidityAtUserRatio {
price_ratio: Decimal, // User-specified ratio
},
// ... other execute messages ...
}
Additionally, in the documentation, we should mention that the ProvideLiquidityAtUserRatio
message should be used for PCL pools and the ProvideLiquidityAtPoolRatio
for XYK pools.
keyleu
Metadata
Metadata
Assignees
Labels
No labels