From 34815b074cbff7594d300040cc7f6508891c8735 Mon Sep 17 00:00:00 2001 From: Malte Kliemann Date: Sun, 28 Jan 2024 12:09:45 +0100 Subject: [PATCH 1/3] Improve `SellExecuted` documentation --- zrml/neo-swaps/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zrml/neo-swaps/src/lib.rs b/zrml/neo-swaps/src/lib.rs index ed0a3f30a..36594de38 100644 --- a/zrml/neo-swaps/src/lib.rs +++ b/zrml/neo-swaps/src/lib.rs @@ -164,7 +164,8 @@ mod pallet { external_fee_amount: BalanceOf, }, /// Informant sold a position. `amount_out` is the amount of collateral received by `who`, - /// including swap and external fees. + /// with swap and external fees not yet deducted. The actual amount received is + /// `amount_out - swap_fee_amount - external_fee_amount`. SellExecuted { who: T::AccountId, market_id: MarketIdOf, From 9993a82565eb0f07a1f8a7e676e353d785f99d27 Mon Sep 17 00:00:00 2001 From: Malte Kliemann Date: Sun, 28 Jan 2024 12:11:32 +0100 Subject: [PATCH 2/3] Clean up math in comments and doc strings --- zrml/neo-swaps/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zrml/neo-swaps/src/lib.rs b/zrml/neo-swaps/src/lib.rs index 36594de38..b0f305f92 100644 --- a/zrml/neo-swaps/src/lib.rs +++ b/zrml/neo-swaps/src/lib.rs @@ -126,8 +126,8 @@ mod pallet { type WeightInfo: WeightInfoZeitgeist; - /// The maximum allowed liquidity tree depth per pool. Each pool can support `2^(depth + 1) - /// - 1` liquidity providers. **Must** be less than 16. + /// The maximum allowed liquidity tree depth per pool. Each pool can support + /// `2^(depth + 1) - 1` liquidity providers. **Must** be less than 16. #[pallet::constant] type MaxLiquidityTreeDepth: Get; From 421f6f883f1a8e223f5a21689c7800d2cc3be977 Mon Sep 17 00:00:00 2001 From: Malte Kliemann Date: Sun, 28 Jan 2024 14:00:28 +0100 Subject: [PATCH 3/3] Fix formatting --- zrml/neo-swaps/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zrml/neo-swaps/src/lib.rs b/zrml/neo-swaps/src/lib.rs index b0f305f92..6b17e91a1 100644 --- a/zrml/neo-swaps/src/lib.rs +++ b/zrml/neo-swaps/src/lib.rs @@ -126,7 +126,7 @@ mod pallet { type WeightInfo: WeightInfoZeitgeist; - /// The maximum allowed liquidity tree depth per pool. Each pool can support + /// The maximum allowed liquidity tree depth per pool. Each pool can support /// `2^(depth + 1) - 1` liquidity providers. **Must** be less than 16. #[pallet::constant] type MaxLiquidityTreeDepth: Get;