From 434e606d865d9818b4d317f43b59ea4b073df1bf Mon Sep 17 00:00:00 2001 From: muharem Date: Fri, 9 Feb 2024 14:10:25 +0800 Subject: [PATCH 1/2] doc guide --- substrate/frame/asset-conversion/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/substrate/frame/asset-conversion/src/lib.rs b/substrate/frame/asset-conversion/src/lib.rs index f0695678fbddf..e4a043eda2cc3 100644 --- a/substrate/frame/asset-conversion/src/lib.rs +++ b/substrate/frame/asset-conversion/src/lib.rs @@ -413,6 +413,11 @@ pub mod pallet { /// Params `amount1_min`/`amount2_min` represent that. /// `mint_to` will be sent the liquidity tokens that represent this share of the pool. /// + /// NOTE: when encountering an incorrect exchange rate and non-withdrawable liquidity + /// amounts, batch an atomic call with [`Pallet::add_liquidity`] and + /// [`Pallet::swap_exact_tokens_for_tokens`] or [`Pallet::swap_tokens_for_exact_tokens`] + /// calls to render the liquidity withdrawable and rectify the exchange rate. + /// /// Once liquidity is added, someone may successfully call /// [`Pallet::swap_exact_tokens_for_tokens`] successfully. #[pallet::call_index(1)] From ede80121c0e2786dcad3d2edf4b49d35643be219 Mon Sep 17 00:00:00 2001 From: muharem Date: Fri, 9 Feb 2024 14:23:09 +0800 Subject: [PATCH 2/2] doc --- substrate/frame/asset-conversion/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/substrate/frame/asset-conversion/src/lib.rs b/substrate/frame/asset-conversion/src/lib.rs index e4a043eda2cc3..07063ba518291 100644 --- a/substrate/frame/asset-conversion/src/lib.rs +++ b/substrate/frame/asset-conversion/src/lib.rs @@ -413,8 +413,8 @@ pub mod pallet { /// Params `amount1_min`/`amount2_min` represent that. /// `mint_to` will be sent the liquidity tokens that represent this share of the pool. /// - /// NOTE: when encountering an incorrect exchange rate and non-withdrawable liquidity - /// amounts, batch an atomic call with [`Pallet::add_liquidity`] and + /// NOTE: when encountering an incorrect exchange rate and non-withdrawable pool liquidity, + /// batch an atomic call with [`Pallet::add_liquidity`] and /// [`Pallet::swap_exact_tokens_for_tokens`] or [`Pallet::swap_tokens_for_exact_tokens`] /// calls to render the liquidity withdrawable and rectify the exchange rate. ///