From 45a64a5165d88feeff336bca7424e41efac09368 Mon Sep 17 00:00:00 2001 From: Supanat Potiwarakorn Date: Tue, 10 Sep 2024 17:44:07 +0700 Subject: [PATCH 01/13] implement calc functions --- packages/transmuter_math/src/errors.rs | 11 +- packages/transmuter_math/src/lib.rs | 1 + .../src/rebalancing_incentive.rs | 199 ++++++++++++++++++ 3 files changed, 210 insertions(+), 1 deletion(-) create mode 100644 packages/transmuter_math/src/rebalancing_incentive.rs diff --git a/packages/transmuter_math/src/errors.rs b/packages/transmuter_math/src/errors.rs index 33e79dd..22c358a 100644 --- a/packages/transmuter_math/src/errors.rs +++ b/packages/transmuter_math/src/errors.rs @@ -1,4 +1,7 @@ -use cosmwasm_std::{CheckedFromRatioError, DivideByZeroError, OverflowError}; +use cosmwasm_std::{ + CheckedFromRatioError, Decimal256RangeExceeded, DecimalRangeExceeded, DivideByZeroError, + OverflowError, +}; #[derive(thiserror::Error, Debug, PartialEq)] pub enum TransmuterMathError { @@ -12,6 +15,12 @@ pub enum TransmuterMathError { #[error("Missing data points to calculate moving average")] MissingDataPoints, + #[error("{0}")] + DecimalRangeExceeded(#[from] DecimalRangeExceeded), + + #[error("{0}")] + Decimal256RangeExceeded(#[from] Decimal256RangeExceeded), + #[error("{0}")] OverflowError(#[from] OverflowError), diff --git a/packages/transmuter_math/src/lib.rs b/packages/transmuter_math/src/lib.rs index 685d3d0..f405790 100644 --- a/packages/transmuter_math/src/lib.rs +++ b/packages/transmuter_math/src/lib.rs @@ -1,6 +1,7 @@ mod division; mod errors; mod helpers; +mod rebalancing_incentive; pub use cosmwasm_std::{Decimal, Timestamp, Uint64}; pub use division::Division; diff --git a/packages/transmuter_math/src/rebalancing_incentive.rs b/packages/transmuter_math/src/rebalancing_incentive.rs new file mode 100644 index 0000000..76672be --- /dev/null +++ b/packages/transmuter_math/src/rebalancing_incentive.rs @@ -0,0 +1,199 @@ +use cosmwasm_std::{Decimal, Decimal256, SignedDecimal256, Uint128}; + +use crate::TransmuterMathError; + +/// Calculating impact factor component +/// +/// Considering change of balance of asset $i$, fee/incentive impact factor component $\gamma_i$ is +/// +/// $$ +/// \gamma_i =\left[C(b)\right]_{b_i}^{b'_i} +/// $$ +/// +/// $$ +/// \gamma_i = C(b'_i) - C(b_i) +/// $$ +/// +/// where cumulative component $C(b)$ is +/// +/// $$ +/// C(b) = +/// \begin{cases} +/// \left(\frac{b - \phi_l}{\phi_l}\right)^2 & \text{if } 0 \leq b \lt \phi_l \\ +/// 0 & \text{if } \phi_l \leq b \leq \phi_u \\ +/// \left(\frac{b - \phi_u}{\delta - \phi_u}\right)^2 & \text{if } \phi_u \lt b \leq \delta +/// \end{cases} +/// $$ +pub fn calculate_cumulative_impact_factor_component( + normalized_balance: Decimal, + ideal_balance_lower_bound: Decimal, + ideal_balance_upper_bound: Decimal, + upper_limit: Decimal, +) -> Result { + // There might a case where $\delta$ dynamically moved to lower than $\phi_u$ (due to change limiter) uses + // $min(\delta, \phi_u)$ instead of $\phi_u$ + // and $min(\delta, \phi_u, \phi_l)$ instead of $\phi_l$. + let ideal_balance_upper_bound = ideal_balance_upper_bound.min(upper_limit); + let ideal_balance_lower_bound = ideal_balance_lower_bound.min(ideal_balance_upper_bound); + + // Calculate the cumulative impact factor component + let cumulative = if normalized_balance < ideal_balance_lower_bound { + ideal_balance_lower_bound // phi_l + .checked_sub(normalized_balance)? // - b + .checked_div(ideal_balance_lower_bound)? // / phi_l + .pow(2) // ^2 + } else if normalized_balance > ideal_balance_upper_bound { + normalized_balance // b + .checked_sub(ideal_balance_upper_bound)? // - phi_u + .checked_div(upper_limit.checked_sub(ideal_balance_upper_bound)?)? // / delta - phi_u + .pow(2) // ^2 + } else { + // within ideal balance + Decimal::zero() + }; + + Ok(cumulative) +} + +pub struct ImpactFactorParamGroup { + prev_normalized_balance: Decimal, + update_normalized_balance: Decimal, + ideal_balance_lower_bound: Decimal, + ideal_balance_upper_bound: Decimal, + upper_limit: Decimal, +} + +impl ImpactFactorParamGroup { + fn has_no_change_in_balance(&self) -> bool { + self.prev_normalized_balance == self.update_normalized_balance + } + + fn calculate_impact_factor_component(&self) -> Result { + // C(b) + let c_b = SignedDecimal256::from(calculate_cumulative_impact_factor_component( + self.prev_normalized_balance, + self.ideal_balance_lower_bound, + self.ideal_balance_upper_bound, + self.upper_limit, + )?); + + // C(b') + let c_b_prime = SignedDecimal256::from(calculate_cumulative_impact_factor_component( + self.update_normalized_balance, + self.ideal_balance_lower_bound, + self.ideal_balance_upper_bound, + self.upper_limit, + )?); + + // \gamma_i = C(b') - C(b) + c_b_prime + .checked_sub(c_b) + .map_err(TransmuterMathError::OverflowError) + } +} + +pub enum Reaction { + Incentivize, + CollectFee, +} + +/// combine all the impact factor components +/// +/// $$ +/// f = \frac{\Vert\vec{\gamma}\Vert}{\sqrt{n}} +/// $$ +/// +/// That gives a normalized magnitude of the vector of $n$ dimension into $[0,1]$. +/// The reason why it needs to include all dimensions is because the case that swapping with alloyed asset, which will effect overall composition rather than just 2 assets. +pub fn calculate_impact_factor( + impact_factor_param_groups: &[ImpactFactorParamGroup], +) -> Result<(Reaction, Decimal256), TransmuterMathError> { + let mut cumulative_impact_factor_sqaure = Decimal256::zero(); + let mut impact_factor_component_sum = SignedDecimal256::zero(); + + let n = Decimal256::from_atomics(impact_factor_param_groups.len() as u64, 0)?; + + for impact_factor_params in impact_factor_param_groups { + // optimiztion: if there is no change in balance, the result will be 0 anyway, accumulating 0 has no effect + if impact_factor_params.has_no_change_in_balance() { + continue; + } + + let impact_factor_component = impact_factor_params.calculate_impact_factor_component()?; + let impact_factor_component_square = + Decimal256::try_from(impact_factor_component.checked_pow(2)?)?; + + impact_factor_component_sum = + impact_factor_component_sum.checked_add(impact_factor_component)?; + cumulative_impact_factor_sqaure = + cumulative_impact_factor_sqaure.checked_add(impact_factor_component_square)?; + } + + let reaction = if impact_factor_component_sum.is_negative() { + Reaction::Incentivize + } else { + Reaction::CollectFee + }; + + let impact_factor = cumulative_impact_factor_sqaure.checked_div(n)?.sqrt(); + + Ok((reaction, impact_factor)) +} + +/// Calculate the rebalancing fee +/// +/// The fee is calculated as λ * f * amount_in, where: +/// - λ is the fee scaler, λ ∈ (0,1] +/// - f is the impact factor, f ∈ [0,1] +/// - amount_in is the amount being swapped in, normalized by standard normalization factor +pub fn calculate_rebalancing_fee( + lambda: Decimal, + impact_factor: Decimal, + amount_in: Uint128, +) -> Result { + let amount_in_dec = Decimal::from_atomics(amount_in, 0)?; + + lambda + .checked_mul(impact_factor)? + .checked_mul(amount_in_dec) + .map_err(TransmuterMathError::OverflowError) +} + +/// Alias for calculate_rebalancing_fee, as it's used to calculate the impact used in incentive calculation +pub fn calculate_rebalancing_impact( + lambda: Decimal, + impact_factor: Decimal, + amount_in: Uint128, +) -> Result { + calculate_rebalancing_fee(lambda, impact_factor, amount_in) +} + +/// Calculates the rebalancing incentive for a given swap. +/// +/// The incentive should be distributed considering the impact factor $f$, amount $a_{in}$ and incentive pool $p$, so the naive model could be just $min(\lambda f a_{in},p)$. +/// But $\lambda$ be updated and largely impact incentive comparing to when fee has been collected. +/// +/// So this function does not try to match the fee collected with the same amount in and impact factor, but scales the incentive by only looking at the amount in and impact factor comparing to overall incentive pool. +/// +/// $$ +/// \text{Incentive} = p \cdot \frac{\lambda fa_{in}}{p + \lambda fa_{in}} +/// $$ +/// +/// ## Arguments +/// - `impact`: the impact of the swap, calculated as $\lambda f a_{in}$ +/// - `incentive_pool`: the remaining incentive pool $p$ +/// +/// ## Returns +/// - The rebalancing incentive +pub fn calculate_rebalancing_incentive( + impact: Decimal, + incentive_pool: Uint128, +) -> Result { + let incentive_pool_dec = Decimal::from_atomics(incentive_pool, 0)?; + let extended_incentive_pool = incentive_pool_dec.checked_add(impact)?; + let impact_over_extended_incentive_pool = impact.checked_div(extended_incentive_pool)?; + + impact_over_extended_incentive_pool + .checked_mul(incentive_pool_dec) + .map_err(TransmuterMathError::OverflowError) +} From 00b997e53655bab26579ee8ea0b9e1ed0736f2bb Mon Sep 17 00:00:00 2001 From: Supanat Potiwarakorn Date: Wed, 11 Sep 2024 14:54:10 +0700 Subject: [PATCH 02/13] add test for calculate rebalancing fee --- Cargo.lock | 3342 +++++++++-------- packages/transmuter_math/Cargo.toml | 1 + packages/transmuter_math/src/errors.rs | 3 + .../src/rebalancing_incentive.rs | 79 +- 4 files changed, 1751 insertions(+), 1674 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d7db25e..809c121 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3,3124 +3,3136 @@ version = 3 [[package]] -name = "addr2line" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "gimli", + "gimli", ] +name = "addr2line" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.21.0" [[package]] +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" name = "adler" -version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +version = "1.0.2" [[package]] -name = "ahash" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom", - "once_cell", - "version_check", + "getrandom", + "once_cell", + "version_check", ] - -[[package]] name = "ahash" -version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.7.6" + +[[package]] checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", + "cfg-if", + "once_cell", + "version_check", + "zerocopy", ] +name = "ahash" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.8.11" [[package]] -name = "aho-corasick" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" dependencies = [ - "memchr", + "memchr", ] +name = "aho-corasick" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.0.5" [[package]] +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" name = "allocator-api2" -version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +version = "0.2.18" [[package]] +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" name = "anyhow" -version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +version = "1.0.75" [[package]] -name = "ark-bls12-381" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" dependencies = [ - "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", ] +name = "ark-bls12-381" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.4.0" [[package]] -name = "ark-ec" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" dependencies = [ - "ark-ff", - "ark-poly", - "ark-serialize", - "ark-std", - "derivative", - "hashbrown 0.13.2", - "itertools 0.10.5", - "num-traits", - "rayon", - "zeroize", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools 0.10.5", + "num-traits", + "rayon", + "zeroize", ] +name = "ark-ec" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.4.2" [[package]] -name = "ark-ff" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" dependencies = [ - "ark-ff-asm", - "ark-ff-macros", - "ark-serialize", - "ark-std", - "derivative", - "digest 0.10.7", - "itertools 0.10.5", - "num-bigint", - "num-traits", - "paste", - "rayon", - "rustc_version", - "zeroize", + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rayon", + "rustc_version", + "zeroize", ] +name = "ark-ff" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.4.2" [[package]] -name = "ark-ff-asm" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" dependencies = [ - "quote", - "syn 1.0.109", + "quote", + "syn 1.0.109", ] +name = "ark-ff-asm" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.4.2" [[package]] -name = "ark-ff-macros" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ - "num-bigint", - "num-traits", - "proc-macro2", - "quote", - "syn 1.0.109", + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", ] +name = "ark-ff-macros" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.4.2" [[package]] -name = "ark-poly" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", - "derivative", - "hashbrown 0.13.2", + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", ] +name = "ark-poly" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.4.2" [[package]] -name = "ark-serialize" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" dependencies = [ - "ark-serialize-derive", - "ark-std", - "digest 0.10.7", - "num-bigint", + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint", ] +name = "ark-serialize" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.4.2" [[package]] -name = "ark-serialize-derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "proc-macro2", + "quote", + "syn 1.0.109", ] +name = "ark-serialize-derive" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.4.2" [[package]] -name = "ark-std" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ - "num-traits", - "rand", - "rayon", + "num-traits", + "rand", + "rayon", ] +name = "ark-std" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.4.0" [[package]] -name = "async-trait" -version = "0.1.73" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", + "proc-macro2", + "quote", + "syn 2.0.82", ] +name = "async-trait" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.1.73" [[package]] +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" name = "autocfg" -version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +version = "1.1.0" [[package]] -name = "backtrace" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", ] +name = "backtrace" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.3.69" [[package]] +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" name = "base16ct" -version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" +version = "0.2.0" [[package]] +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" name = "base64" -version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +version = "0.21.5" [[package]] +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" name = "base64" -version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +version = "0.22.1" [[package]] +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" name = "base64ct" -version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +version = "1.6.0" [[package]] +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" name = "bech32" -version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" +version = "0.9.1" [[package]] +checksum = "d965446196e3b7decd44aa7ee49e31d630118f90ef12f97900f262eb915c951d" name = "bech32" -version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d965446196e3b7decd44aa7ee49e31d630118f90ef12f97900f262eb915c951d" +version = "0.11.0" [[package]] -name = "bindgen" -version = "0.70.1" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" dependencies = [ - "bitflags 2.4.1", - "cexpr", - "clang-sys", - "itertools 0.13.0", - "log", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.82", + "bitflags 2.4.1", + "cexpr", + "clang-sys", + "itertools 0.13.0", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.82", ] +name = "bindgen" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.70.1" [[package]] -name = "bip32" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e141fb0f8be1c7b45887af94c88b182472b57c96b56773250ae00cd6a14a164" dependencies = [ - "bs58", - "hmac", - "k256", - "rand_core 0.6.4", - "ripemd", - "sha2 0.10.7", - "subtle", - "zeroize", + "bs58", + "hmac", + "k256", + "rand_core 0.6.4", + "ripemd", + "sha2 0.10.7", + "subtle", + "zeroize", ] +name = "bip32" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.5.1" [[package]] +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" name = "bitflags" -version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +version = "1.3.2" [[package]] +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" name = "bitflags" -version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +version = "2.4.1" [[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "generic-array", + "generic-array", ] - -[[package]] name = "block-buffer" -version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.9.0" + +[[package]] checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array", + "generic-array", ] +name = "block-buffer" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.10.4" [[package]] +checksum = "56953345e39537a3e18bdaeba4cb0c58a78c1f61f361dc0fa7c5c7340ae87c5f" name = "bnum" -version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56953345e39537a3e18bdaeba4cb0c58a78c1f61f361dc0fa7c5c7340ae87c5f" +version = "0.10.0" [[package]] +checksum = "3e31ea183f6ee62ac8b8a8cf7feddd766317adfb13ff469de57ce033efd6a790" name = "bnum" -version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e31ea183f6ee62ac8b8a8cf7feddd766317adfb13ff469de57ce033efd6a790" +version = "0.11.0" [[package]] -name = "bs58" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" dependencies = [ - "sha2 0.10.7", + "sha2 0.10.7", ] +name = "bs58" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.5.0" [[package]] +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" name = "bumpalo" -version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +version = "3.13.0" [[package]] +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" name = "byteorder" -version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +version = "1.4.3" [[package]] -name = "bytes" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" dependencies = [ - "serde", + "serde", ] +name = "bytes" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.4.0" [[package]] -name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ - "libc", + "libc", ] +name = "cc" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.0.83" [[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" dependencies = [ - "nom", + "nom", ] +name = "cexpr" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.6.0" [[package]] +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" name = "cfg-if" -version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +version = "1.0.0" [[package]] -name = "chrono" -version = "0.4.28" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95ed24df0632f708f5f6d8082675bef2596f7084dee3dd55f632290bf35bfe0f" dependencies = [ - "num-traits", + "num-traits", ] +name = "chrono" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.4.28" [[package]] -name = "clang-sys" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" dependencies = [ - "glob", - "libc", - "libloading", + "glob", + "libc", + "libloading", ] +name = "clang-sys" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.6.1" [[package]] +checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" name = "const-oid" -version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" +version = "0.9.5" [[package]] +checksum = "6051f239ecec86fde3410901ab7860d458d160371533842974fc61f96d15879b" name = "const_panic" -version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6051f239ecec86fde3410901ab7860d458d160371533842974fc61f96d15879b" +version = "0.2.8" [[package]] -name = "convert_case" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" dependencies = [ - "unicode-segmentation", + "unicode-segmentation", ] +name = "convert_case" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.6.0" [[package]] -name = "core-foundation" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" dependencies = [ - "core-foundation-sys", - "libc", + "core-foundation-sys", + "libc", ] +name = "core-foundation" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.9.3" [[package]] +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" name = "core-foundation-sys" -version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +version = "0.8.4" [[package]] -name = "cosmos-sdk-proto" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8ce7f4797cdf5cd18be6555ff3f0a8d37023c2d60f3b2708895d601b85c1c46" dependencies = [ - "prost 0.13.3", - "tendermint-proto", + "prost 0.13.3", + "tendermint-proto", ] +name = "cosmos-sdk-proto" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.25.0" [[package]] -name = "cosmrs" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09f90935b72d9fa65a2a784e09f25778637b7e88e9d6f87c717081470f7fa726" dependencies = [ - "bip32", - "cosmos-sdk-proto", - "ecdsa", - "eyre", - "k256", - "rand_core 0.6.4", - "serde", - "serde_json", - "signature", - "subtle-encoding", - "tendermint", - "tendermint-rpc", - "thiserror", + "bip32", + "cosmos-sdk-proto", + "ecdsa", + "eyre", + "k256", + "rand_core 0.6.4", + "serde", + "serde_json", + "signature", + "subtle-encoding", + "tendermint", + "tendermint-rpc", + "thiserror", ] +name = "cosmrs" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.20.0" [[package]] +checksum = "5f6ceb8624260d0d3a67c4e1a1d43fc7e9406720afbcb124521501dd138f90aa" name = "cosmwasm-core" -version = "2.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6ceb8624260d0d3a67c4e1a1d43fc7e9406720afbcb124521501dd138f90aa" +version = "2.1.4" [[package]] -name = "cosmwasm-crypto" -version = "1.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58535cbcd599b3c193e3967c8292fe1dbbb5de7c2a2d87380661091dd4744044" dependencies = [ - "digest 0.10.7", - "ed25519-zebra 3.1.0", - "k256", - "rand_core 0.6.4", - "thiserror", + "digest 0.10.7", + "ed25519-zebra 3.1.0", + "k256", + "rand_core 0.6.4", + "thiserror", ] - -[[package]] name = "cosmwasm-crypto" -version = "2.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.5.8" + +[[package]] checksum = "4125381e5fd7fefe9f614640049648088015eca2b60d861465329a5d87dfa538" dependencies = [ - "ark-bls12-381", - "ark-ec", - "ark-ff", - "ark-serialize", - "cosmwasm-core", - "digest 0.10.7", - "ecdsa", - "ed25519-zebra 4.0.3", - "k256", - "num-traits", - "p256", - "rand_core 0.6.4", - "rayon", - "sha2 0.10.7", - "thiserror", + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-serialize", + "cosmwasm-core", + "digest 0.10.7", + "ecdsa", + "ed25519-zebra 4.0.3", + "k256", + "num-traits", + "p256", + "rand_core 0.6.4", + "rayon", + "sha2 0.10.7", + "thiserror", ] +name = "cosmwasm-crypto" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "2.1.4" [[package]] -name = "cosmwasm-derive" -version = "1.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8e07de16c800ac82fd188d055ecdb923ead0cf33960d3350089260bb982c09f" dependencies = [ - "syn 1.0.109", + "syn 1.0.109", ] - -[[package]] name = "cosmwasm-derive" -version = "2.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.5.8" + +[[package]] checksum = "1b5658b1dc64e10b56ae7a449f678f96932a96f6cfad1769d608d1d1d656480a" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", + "proc-macro2", + "quote", + "syn 2.0.82", ] +name = "cosmwasm-derive" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "2.1.4" [[package]] -name = "cosmwasm-schema" -version = "2.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f86b4d949b6041519c58993a73f4bbfba8083ba14f7001eae704865a09065845" dependencies = [ - "cosmwasm-schema-derive", - "schemars", - "serde", - "serde_json", - "thiserror", + "cosmwasm-schema-derive", + "schemars", + "serde", + "serde_json", + "thiserror", ] +name = "cosmwasm-schema" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "2.1.4" [[package]] -name = "cosmwasm-schema-derive" -version = "2.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8ef1b5835a65fcca3ab8b9a02b4f4dacc78e233a5c2f20b270efb9db0666d12" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", + "proc-macro2", + "quote", + "syn 2.0.82", ] +name = "cosmwasm-schema-derive" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "2.1.4" [[package]] -name = "cosmwasm-std" -version = "1.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c21fde95ccd20044a23c0ac6fd8c941f3e8c158169dc94b5aa6491a2d9551a8d" dependencies = [ - "base64 0.21.5", - "bech32 0.9.1", - "bnum 0.10.0", - "cosmwasm-crypto 1.5.8", - "cosmwasm-derive 1.5.8", - "derivative", - "forward_ref", - "hex", - "schemars", - "serde", - "serde-json-wasm 0.5.2", - "sha2 0.10.7", - "static_assertions", - "thiserror", + "base64 0.21.5", + "bech32 0.9.1", + "bnum 0.10.0", + "cosmwasm-crypto 1.5.8", + "cosmwasm-derive 1.5.8", + "derivative", + "forward_ref", + "hex", + "schemars", + "serde", + "serde-json-wasm 0.5.2", + "sha2 0.10.7", + "static_assertions", + "thiserror", ] - -[[package]] name = "cosmwasm-std" -version = "2.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.5.8" + +[[package]] checksum = "70eb7ab0c1e99dd6207496963ba2a457c4128ac9ad9c72a83f8d9808542b849b" dependencies = [ - "base64 0.22.1", - "bech32 0.11.0", - "bnum 0.11.0", - "cosmwasm-core", - "cosmwasm-crypto 2.1.4", - "cosmwasm-derive 2.1.4", - "derive_more", - "hex", - "rand_core 0.6.4", - "schemars", - "serde", - "serde-json-wasm 1.0.1", - "sha2 0.10.7", - "static_assertions", - "thiserror", + "base64 0.22.1", + "bech32 0.11.0", + "bnum 0.11.0", + "cosmwasm-core", + "cosmwasm-crypto 2.1.4", + "cosmwasm-derive 2.1.4", + "derive_more", + "hex", + "rand_core 0.6.4", + "schemars", + "serde", + "serde-json-wasm 1.0.1", + "sha2 0.10.7", + "static_assertions", + "thiserror", ] +name = "cosmwasm-std" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "2.1.4" [[package]] -name = "cosmwasm-storage" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b52be0d56b78f502f3acb75e40908a0d04d9f265b6beb0f86b36ec2ece048748" dependencies = [ - "cosmwasm-std 1.5.8", - "serde", + "cosmwasm-std 1.5.8", + "serde", ] +name = "cosmwasm-storage" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.3.3" [[package]] -name = "cpufeatures" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ - "libc", + "libc", ] +name = "cpufeatures" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.2.9" [[package]] -name = "crossbeam-deque" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", + "crossbeam-epoch", + "crossbeam-utils", ] +name = "crossbeam-deque" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.8.5" [[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "crossbeam-utils", + "crossbeam-utils", ] +name = "crossbeam-epoch" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.9.18" [[package]] +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" name = "crossbeam-utils" -version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +version = "0.8.20" [[package]] -name = "crypto-bigint" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "740fe28e594155f10cfc383984cbefd529d7396050557148f79cb0f621204124" dependencies = [ - "generic-array", - "rand_core 0.6.4", - "subtle", - "zeroize", + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", ] +name = "crypto-bigint" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.5.3" [[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "generic-array", - "typenum", + "generic-array", + "typenum", ] +name = "crypto-common" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.1.6" [[package]] -name = "curve25519-dalek" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle", - "zeroize", + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "subtle", + "zeroize", ] - -[[package]] name = "curve25519-dalek" -version = "4.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" +version = "3.2.0" + +[[package]] checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" dependencies = [ - "cfg-if", - "cpufeatures", - "curve25519-dalek-derive", - "digest 0.10.7", - "fiat-crypto", - "rustc_version", - "subtle", - "zeroize", + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "rustc_version", + "subtle", + "zeroize", ] +name = "curve25519-dalek" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "4.1.3" [[package]] -name = "curve25519-dalek-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", + "proc-macro2", + "quote", + "syn 2.0.82", ] +name = "curve25519-dalek-derive" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.1.1" [[package]] -name = "curve25519-dalek-ng" -version = "4.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.6.4", - "subtle-ng", - "zeroize", + "byteorder", + "digest 0.9.0", + "rand_core 0.6.4", + "subtle-ng", + "zeroize", ] +name = "curve25519-dalek-ng" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "4.1.1" [[package]] -name = "cw-storage-plus" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f13360e9007f51998d42b1bc6b7fa0141f74feae61ed5fd1e5b0a89eec7b5de1" dependencies = [ - "cosmwasm-std 2.1.4", - "schemars", - "serde", + "cosmwasm-std 2.1.4", + "schemars", + "serde", ] +name = "cw-storage-plus" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "2.0.0" [[package]] -name = "cw2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b04852cd38f044c0751259d5f78255d07590d136b8a86d4e09efdd7666bd6d27" dependencies = [ - "cosmwasm-schema", - "cosmwasm-std 2.1.4", - "cw-storage-plus", - "schemars", - "semver", - "serde", - "thiserror", + "cosmwasm-schema", + "cosmwasm-std 2.1.4", + "cw-storage-plus", + "schemars", + "semver", + "serde", + "thiserror", ] +name = "cw2" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "2.0.0" [[package]] -name = "der" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ - "const-oid", - "zeroize", + "const-oid", + "zeroize", ] +name = "der" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.7.8" [[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "proc-macro2", + "quote", + "syn 1.0.109", ] +name = "derivative" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "2.2.0" [[package]] -name = "derive_more" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" dependencies = [ - "derive_more-impl", + "derive_more-impl", ] +name = "derive_more" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.0.0" [[package]] -name = "derive_more-impl" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", - "unicode-xid", + "proc-macro2", + "quote", + "syn 2.0.82", + "unicode-xid", ] +name = "derive_more-impl" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.0.0" [[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array", + "generic-array", ] - -[[package]] name = "digest" -version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.9.0" + +[[package]] checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.4", - "const-oid", - "crypto-common", - "subtle", + "block-buffer 0.10.4", + "const-oid", + "crypto-common", + "subtle", ] +name = "digest" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.10.7" [[package]] +checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" name = "dyn-clone" -version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" +version = "1.0.13" [[package]] -name = "ecdsa" -version = "0.16.8" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" dependencies = [ - "der", - "digest 0.10.7", - "elliptic-curve", - "rfc6979", - "signature", - "spki", + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature", + "spki", ] +name = "ecdsa" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.16.8" [[package]] -name = "ed25519" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ - "pkcs8", - "signature", + "pkcs8", + "signature", ] +name = "ed25519" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "2.2.3" [[package]] -name = "ed25519-consensus" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c8465edc8ee7436ffea81d21a019b16676ee3db267aa8d5a8d729581ecf998b" dependencies = [ - "curve25519-dalek-ng", - "hex", - "rand_core 0.6.4", - "sha2 0.9.9", - "zeroize", + "curve25519-dalek-ng", + "hex", + "rand_core 0.6.4", + "sha2 0.9.9", + "zeroize", ] +name = "ed25519-consensus" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "2.1.0" [[package]] -name = "ed25519-zebra" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ - "curve25519-dalek 3.2.0", - "hashbrown 0.12.3", - "hex", - "rand_core 0.6.4", - "serde", - "sha2 0.9.9", - "zeroize", + "curve25519-dalek 3.2.0", + "hashbrown 0.12.3", + "hex", + "rand_core 0.6.4", + "serde", + "sha2 0.9.9", + "zeroize", ] - -[[package]] name = "ed25519-zebra" -version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" +version = "3.1.0" + +[[package]] checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" dependencies = [ - "curve25519-dalek 4.1.3", - "ed25519", - "hashbrown 0.14.0", - "hex", - "rand_core 0.6.4", - "sha2 0.10.7", - "zeroize", + "curve25519-dalek 4.1.3", + "ed25519", + "hashbrown 0.14.0", + "hex", + "rand_core 0.6.4", + "sha2 0.10.7", + "zeroize", ] +name = "ed25519-zebra" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "4.0.3" [[package]] +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" name = "either" -version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +version = "1.9.0" [[package]] -name = "elliptic-curve" -version = "0.13.8" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ - "base16ct", - "crypto-bigint", - "digest 0.10.7", - "ff", - "generic-array", - "group", - "pkcs8", - "rand_core 0.6.4", - "sec1", - "subtle", - "zeroize", + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "subtle", + "zeroize", ] +name = "elliptic-curve" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.13.8" [[package]] -name = "encoding_rs" -version = "0.8.33" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ - "cfg-if", + "cfg-if", ] +name = "encoding_rs" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.8.33" [[package]] +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" name = "equivalent" -version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +version = "1.0.1" [[package]] -name = "eyre" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c2b6b5a29c02cdc822728b7d7b8ae1bab3e3b05d44522770ddd49722eeac7eb" dependencies = [ - "indenter", - "once_cell", + "indenter", + "once_cell", ] +name = "eyre" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.6.8" [[package]] -name = "ff" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "rand_core 0.6.4", - "subtle", + "rand_core 0.6.4", + "subtle", ] +name = "ff" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.13.0" [[package]] +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" name = "fiat-crypto" -version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" +version = "0.2.9" [[package]] -name = "flex-error" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c606d892c9de11507fa0dcffc116434f94e105d0bbdc4e405b61519464c49d7b" dependencies = [ - "eyre", - "paste", + "eyre", + "paste", ] +name = "flex-error" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.4.4" [[package]] +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" name = "fnv" -version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +version = "1.0.7" [[package]] -name = "form_urlencoded" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ - "percent-encoding", + "percent-encoding", ] +name = "form_urlencoded" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.2.0" [[package]] +checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" name = "forward_ref" -version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" +version = "1.0.0" [[package]] -name = "futures" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", ] - -[[package]] -name = "futures-channel" -version = "0.3.31" +name = "futures" source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.3.31" + +[[package]] checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ - "futures-core", - "futures-sink", + "futures-core", + "futures-sink", ] +name = "futures-channel" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.3.31" [[package]] +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" name = "futures-core" -version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +version = "0.3.31" [[package]] -name = "futures-executor" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ - "futures-core", - "futures-task", - "futures-util", + "futures-core", + "futures-task", + "futures-util", ] +name = "futures-executor" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.3.31" [[package]] +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" name = "futures-io" -version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" +version = "0.3.31" [[package]] -name = "futures-macro" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", + "proc-macro2", + "quote", + "syn 2.0.82", ] +name = "futures-macro" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.3.31" [[package]] +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" name = "futures-sink" -version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" +version = "0.3.31" [[package]] +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" name = "futures-task" -version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +version = "0.3.31" [[package]] +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" name = "futures-timer" -version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" +version = "3.0.3" [[package]] -name = "futures-util" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", ] +name = "futures-util" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.3.31" [[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ - "typenum", - "version_check", - "zeroize", + "typenum", + "version_check", + "zeroize", ] +name = "generic-array" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.14.7" [[package]] -name = "getrandom" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi", - "wasm-bindgen", + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", ] +name = "getrandom" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.2.10" [[package]] +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" name = "gimli" -version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +version = "0.28.0" [[package]] +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" name = "glob" -version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +version = "0.3.1" [[package]] -name = "group" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ - "ff", - "rand_core 0.6.4", - "subtle", + "ff", + "rand_core 0.6.4", + "subtle", ] +name = "group" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.13.0" [[package]] -name = "h2" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap 1.9.3", - "slab", - "tokio", - "tokio-util", - "tracing", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 1.9.3", + "slab", + "tokio", + "tokio-util", + "tracing", ] +name = "h2" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.3.21" [[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash 0.7.6", + "ahash 0.7.6", ] - -[[package]] name = "hashbrown" -version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.12.3" + +[[package]] checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.11", + "ahash 0.8.11", ] - -[[package]] name = "hashbrown" -version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.13.2" + +[[package]] checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" dependencies = [ - "ahash 0.8.11", - "allocator-api2", + "ahash 0.8.11", + "allocator-api2", ] +name = "hashbrown" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.14.0" [[package]] +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" name = "hashbrown" -version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +version = "0.15.0" [[package]] +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" name = "hermit-abi" -version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +version = "0.3.2" [[package]] +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" name = "hex" -version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +version = "0.4.3" [[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.7", + "digest 0.10.7", ] +name = "hmac" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.12.1" [[package]] -name = "http" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ - "bytes", - "fnv", - "itoa", + "bytes", + "fnv", + "itoa", ] +name = "http" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.2.9" [[package]] -name = "http-body" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ - "bytes", - "http", - "pin-project-lite", + "bytes", + "http", + "pin-project-lite", ] +name = "http-body" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.4.5" [[package]] +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" name = "httparse" -version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +version = "1.8.0" [[package]] +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" name = "httpdate" -version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +version = "1.0.3" [[package]] -name = "hyper" -version = "0.14.27" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2 0.4.9", - "tokio", - "tower-service", - "tracing", - "want", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2 0.4.9", + "tokio", + "tower-service", + "tracing", + "want", ] +name = "hyper" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.14.27" [[package]] -name = "hyper-rustls" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ - "futures-util", - "http", - "hyper", - "rustls", - "tokio", - "tokio-rustls", + "futures-util", + "http", + "hyper", + "rustls", + "tokio", + "tokio-rustls", ] +name = "hyper-rustls" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.24.2" [[package]] -name = "idna" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "unicode-bidi", + "unicode-normalization", ] +name = "idna" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.4.0" [[package]] +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" name = "indenter" -version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" +version = "0.3.3" [[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ - "autocfg", - "hashbrown 0.12.3", + "autocfg", + "hashbrown 0.12.3", ] - -[[package]] name = "indexmap" -version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.9.3" + +[[package]] checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ - "equivalent", - "hashbrown 0.15.0", + "equivalent", + "hashbrown 0.15.0", ] +name = "indexmap" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "2.6.0" [[package]] +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" name = "ipnet" -version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +version = "2.9.0" [[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ - "either", + "either", ] - -[[package]] name = "itertools" -version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.10.5" + +[[package]] checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ - "either", + "either", ] +name = "itertools" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.13.0" [[package]] +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" name = "itoa" -version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +version = "1.0.9" [[package]] -name = "js-sys" -version = "0.3.64" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ - "wasm-bindgen", + "wasm-bindgen", ] +name = "js-sys" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.3.64" [[package]] -name = "k256" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" dependencies = [ - "cfg-if", - "ecdsa", - "elliptic-curve", - "once_cell", - "sha2 0.10.7", - "signature", + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2 0.10.7", + "signature", ] +name = "k256" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.13.4" [[package]] -name = "konst" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50a0ba6de5f7af397afff922f22c149ff605c766cd3269cf6c1cd5e466dbe3b9" dependencies = [ - "const_panic", - "konst_kernel", - "konst_proc_macros", - "typewit", + "const_panic", + "konst_kernel", + "konst_proc_macros", + "typewit", ] +name = "konst" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.3.9" [[package]] -name = "konst_kernel" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be0a455a1719220fd6adf756088e1c69a85bf14b6a9e24537a5cc04f503edb2b" dependencies = [ - "typewit", + "typewit", ] +name = "konst_kernel" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.3.9" [[package]] +checksum = "4e28ab1dc35e09d60c2b8c90d12a9a8d9666c876c10a3739a3196db0103b6043" name = "konst_proc_macros" -version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e28ab1dc35e09d60c2b8c90d12a9a8d9666c876c10a3739a3196db0103b6043" +version = "0.3.0" [[package]] +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" name = "libc" -version = "0.2.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" +version = "0.2.151" [[package]] -name = "libloading" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ - "cfg-if", - "winapi", + "cfg-if", + "winapi", ] +name = "libloading" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.7.4" [[package]] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" name = "log" -version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +version = "0.4.20" [[package]] +checksum = "5486aed0026218e61b8a01d5fbd5a0a134649abb71a0e53b7bc088529dced86e" name = "memchr" -version = "2.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5486aed0026218e61b8a01d5fbd5a0a134649abb71a0e53b7bc088529dced86e" +version = "2.6.2" [[package]] +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" name = "mime" -version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +version = "0.3.17" [[package]] +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" name = "minimal-lexical" -version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" +version = "0.2.1" [[package]] -name = "miniz_oxide" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ - "adler", + "adler", ] +name = "miniz_oxide" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.7.1" [[package]] -name = "mio" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ - "libc", - "wasi", - "windows-sys", + "libc", + "wasi", + "windows-sys", ] +name = "mio" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.8.8" [[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ - "memchr", - "minimal-lexical", + "memchr", + "minimal-lexical", ] +name = "nom" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "7.1.3" [[package]] -name = "num-bigint" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "num-integer", - "num-traits", + "num-integer", + "num-traits", ] +name = "num-bigint" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.4.6" [[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "num-traits", + "num-traits", ] +name = "num-integer" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.1.46" [[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ - "autocfg", + "autocfg", ] +name = "num-traits" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.2.19" [[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi", - "libc", + "hermit-abi", + "libc", ] +name = "num_cpus" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.16.0" [[package]] -name = "num_threads" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" dependencies = [ - "libc", + "libc", ] +name = "num_threads" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.1.6" [[package]] -name = "object" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" dependencies = [ - "memchr", + "memchr", ] +name = "object" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.32.0" [[package]] +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" name = "once_cell" -version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +version = "1.19.0" [[package]] +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" name = "opaque-debug" -version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +version = "0.3.0" [[package]] +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" name = "openssl-probe" -version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +version = "0.1.5" [[package]] -name = "osmosis-std" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd621cc2f26474c6fb689ccc114dc0d8b53369a322f1fa5f24802f3de3d3def3" dependencies = [ - "chrono", - "cosmwasm-std 2.1.4", - "osmosis-std-derive", - "prost 0.13.3", - "prost-types 0.13.3", - "schemars", - "serde", - "serde-cw-value", + "chrono", + "cosmwasm-std 2.1.4", + "osmosis-std-derive", + "prost 0.13.3", + "prost-types 0.13.3", + "schemars", + "serde", + "serde-cw-value", ] +name = "osmosis-std" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.26.0" [[package]] -name = "osmosis-std-derive" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b0240fd030a4bbc79fa6cbea0b3eb0260a4b79075ebc039b93e2652bff8655b" dependencies = [ - "itertools 0.10.5", - "proc-macro2", - "prost-types 0.11.9", - "quote", - "syn 1.0.109", + "itertools 0.10.5", + "proc-macro2", + "prost-types 0.11.9", + "quote", + "syn 1.0.109", ] +name = "osmosis-std-derive" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.26.0" [[package]] -name = "osmosis-test-tube" -version = "26.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8bb569512b10f8fb1fa4fe2e2dc0b474f1fca7ed80500a4328593fc85ad0c3e6" dependencies = [ - "base64 0.22.1", - "bindgen", - "cosmrs", - "cosmwasm-std 2.1.4", - "osmosis-std", - "prost 0.13.3", - "serde", - "serde_json", - "test-tube", - "thiserror", + "base64 0.22.1", + "bindgen", + "cosmrs", + "cosmwasm-std 2.1.4", + "osmosis-std", + "prost 0.13.3", + "serde", + "serde_json", + "test-tube", + "thiserror", ] +name = "osmosis-test-tube" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "26.0.1" [[package]] -name = "p256" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" dependencies = [ - "ecdsa", - "elliptic-curve", - "primeorder", - "sha2 0.10.7", + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2 0.10.7", ] +name = "p256" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.13.2" [[package]] +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" name = "paste" -version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +version = "1.0.14" [[package]] -name = "peg" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "295283b02df346d1ef66052a757869b2876ac29a6bb0ac3f5f7cd44aebe40e8f" dependencies = [ - "peg-macros", - "peg-runtime", + "peg-macros", + "peg-runtime", ] +name = "peg" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.8.4" [[package]] -name = "peg-macros" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bdad6a1d9cf116a059582ce415d5f5566aabcd4008646779dab7fdc2a9a9d426" dependencies = [ - "peg-runtime", - "proc-macro2", - "quote", + "peg-runtime", + "proc-macro2", + "quote", ] +name = "peg-macros" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.8.4" [[package]] +checksum = "e3aeb8f54c078314c2065ee649a7241f46b9d8e418e1a9581ba0546657d7aa3a" name = "peg-runtime" -version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3aeb8f54c078314c2065ee649a7241f46b9d8e418e1a9581ba0546657d7aa3a" +version = "0.8.3" [[package]] +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" name = "percent-encoding" -version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +version = "2.3.0" [[package]] -name = "pin-project" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ - "pin-project-internal", + "pin-project-internal", ] +name = "pin-project" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.1.3" [[package]] -name = "pin-project-internal" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", + "proc-macro2", + "quote", + "syn 2.0.82", ] +name = "pin-project-internal" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.1.3" [[package]] +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" name = "pin-project-lite" -version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +version = "0.2.13" [[package]] +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" name = "pin-utils" -version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +version = "0.1.0" [[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der", - "spki", + "der", + "spki", ] +name = "pkcs8" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.10.2" [[package]] -name = "ppv-lite86" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" dependencies = [ - "zerocopy", + "zerocopy", ] +name = "ppv-lite86" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.2.20" [[package]] -name = "prettyplease" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ - "proc-macro2", - "syn 2.0.82", + "proc-macro2", + "syn 2.0.82", ] +name = "prettyplease" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.2.15" [[package]] -name = "primeorder" -version = "0.13.6" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" dependencies = [ - "elliptic-curve", + "elliptic-curve", ] +name = "primeorder" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.13.6" [[package]] -name = "proc-macro-crate" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.22.22", + "toml_edit 0.22.22", ] +name = "proc-macro-crate" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "3.2.0" [[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", ] +name = "proc-macro-error" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.0.4" [[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2", - "quote", - "version_check", + "proc-macro2", + "quote", + "version_check", ] +name = "proc-macro-error-attr" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.0.4" [[package]] -name = "proc-macro2" -version = "1.0.88" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c3a7fc5db1e57d5a779a352c8cdb57b29aa4c40cc69c3a68a7fedc815fbf2f9" dependencies = [ - "unicode-ident", + "unicode-ident", ] +name = "proc-macro2" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.0.88" [[package]] -name = "prost" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ - "bytes", - "prost-derive 0.11.9", + "bytes", + "prost-derive 0.11.9", ] - -[[package]] name = "prost" -version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.11.9" + +[[package]] checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" dependencies = [ - "bytes", - "prost-derive 0.13.3", + "bytes", + "prost-derive 0.13.3", ] +name = "prost" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.13.3" [[package]] -name = "prost-derive" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ - "anyhow", - "itertools 0.10.5", - "proc-macro2", - "quote", - "syn 1.0.109", + "anyhow", + "itertools 0.10.5", + "proc-macro2", + "quote", + "syn 1.0.109", ] - -[[package]] name = "prost-derive" -version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.11.9" + +[[package]] checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" dependencies = [ - "anyhow", - "itertools 0.13.0", - "proc-macro2", - "quote", - "syn 2.0.82", + "anyhow", + "itertools 0.13.0", + "proc-macro2", + "quote", + "syn 2.0.82", ] +name = "prost-derive" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.13.3" [[package]] -name = "prost-types" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" dependencies = [ - "prost 0.11.9", + "prost 0.11.9", ] - -[[package]] name = "prost-types" -version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.11.9" + +[[package]] checksum = "4759aa0d3a6232fb8dbdb97b61de2c20047c68aca932c7ed76da9d788508d670" dependencies = [ - "prost 0.13.3", + "prost 0.13.3", ] +name = "prost-types" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.13.3" [[package]] -name = "quote" -version = "1.0.37" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ - "proc-macro2", + "proc-macro2", ] +name = "quote" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.0.37" [[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ - "libc", - "rand_chacha", - "rand_core 0.6.4", + "libc", + "rand_chacha", + "rand_core 0.6.4", ] +name = "rand" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.8.5" [[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", + "ppv-lite86", + "rand_core 0.6.4", ] +name = "rand_chacha" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.3.1" [[package]] +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" name = "rand_core" -version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +version = "0.5.1" [[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom", ] +name = "rand_core" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.6.4" [[package]] -name = "rayon" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ - "either", - "rayon-core", + "either", + "rayon-core", ] +name = "rayon" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.10.0" [[package]] -name = "rayon-core" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ - "crossbeam-deque", - "crossbeam-utils", + "crossbeam-deque", + "crossbeam-utils", ] +name = "rayon-core" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.12.1" [[package]] -name = "regex" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", ] +name = "regex" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.11.0" [[package]] -name = "regex-automata" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", + "aho-corasick", + "memchr", + "regex-syntax", ] - +name = "regex-automata" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.4.8" + [[package]] +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" name = "regex-syntax" -version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +version = "0.8.5" [[package]] +checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" name = "relative-path" -version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" +version = "1.9.3" [[package]] -name = "reqwest" -version = "0.11.22" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" dependencies = [ - "base64 0.21.5", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-rustls", - "ipnet", - "js-sys", - "log", - "mime", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls", - "rustls-native-certs", - "rustls-pemfile", - "serde", - "serde_json", - "serde_urlencoded", - "system-configuration", - "tokio", - "tokio-rustls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg", + "base64 0.21.5", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-rustls", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls", + "rustls-native-certs", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "system-configuration", + "tokio", + "tokio-rustls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", ] +name = "reqwest" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.11.22" [[package]] -name = "rfc6979" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ - "hmac", - "subtle", + "hmac", + "subtle", ] +name = "rfc6979" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.4.0" [[package]] -name = "ring" -version = "0.17.7" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" dependencies = [ - "cc", - "getrandom", - "libc", - "spin", - "untrusted", - "windows-sys", + "cc", + "getrandom", + "libc", + "spin", + "untrusted", + "windows-sys", ] +name = "ring" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.17.7" [[package]] -name = "ripemd" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" dependencies = [ - "digest 0.10.7", + "digest 0.10.7", ] +name = "ripemd" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.1.3" [[package]] -name = "rstest" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a2c585be59b6b5dd66a9d2084aa1d8bd52fbdb806eafdeffb52791147862035" dependencies = [ - "futures", - "futures-timer", - "rstest_macros", - "rustc_version", + "futures", + "futures-timer", + "rstest_macros 0.18.2", + "rustc_version", ] +name = "rstest" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.23.0" [[package]] -name = "rstest_macros" -version = "0.23.0" +checksum = "7b423f0e62bdd61734b67cd21ff50871dfaeb9cc74f869dcd6af974fbcb19936" +dependencies = [ + "futures", + "futures-timer", + "rstest_macros 0.22.0", + "rustc_version", +] +name = "rstest" source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.22.0" + +[[package]] checksum = "825ea780781b15345a146be27eaefb05085e337e869bff01b4306a4fd4a9ad5a" dependencies = [ - "cfg-if", - "glob", - "proc-macro-crate", - "proc-macro2", - "quote", - "regex", - "relative-path", - "rustc_version", - "syn 2.0.82", - "unicode-ident", + "cfg-if", + "glob", + "proc-macro-crate", + "proc-macro2", + "quote", + "regex", + "relative-path", + "rustc_version", + "syn 2.0.82", + "unicode-ident", ] +name = "rstest_macros" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.23.0" [[package]] +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" name = "rustc-demangle" -version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +version = "0.1.23" [[package]] +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" name = "rustc-hash" -version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +version = "1.1.0" [[package]] -name = "rustc_version" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ - "semver", + "semver", ] +name = "rustc_version" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.4.1" [[package]] -name = "rustls" -version = "0.21.10" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ - "log", - "ring", - "rustls-webpki", - "sct", + "log", + "ring", + "rustls-webpki", + "sct", ] +name = "rustls" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.21.10" [[package]] -name = "rustls-native-certs" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ - "openssl-probe", - "rustls-pemfile", - "schannel", - "security-framework", + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", ] +name = "rustls-native-certs" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.6.3" [[package]] -name = "rustls-pemfile" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.5", + "base64 0.21.5", ] +name = "rustls-pemfile" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.0.4" [[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring", - "untrusted", + "ring", + "untrusted", ] +name = "rustls-webpki" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.101.7" [[package]] +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" name = "ryu" -version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +version = "1.0.15" [[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" dependencies = [ - "winapi-util", + "winapi-util", ] +name = "same-file" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.0.6" [[package]] -name = "schannel" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys", + "windows-sys", ] +name = "schannel" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.1.22" [[package]] -name = "schemars" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" dependencies = [ - "dyn-clone", - "schemars_derive", - "serde", - "serde_json", + "dyn-clone", + "schemars_derive", + "serde", + "serde_json", ] +name = "schemars" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.8.21" [[package]] -name = "schemars_derive" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" dependencies = [ - "proc-macro2", - "quote", - "serde_derive_internals", - "syn 2.0.82", + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.82", ] +name = "schemars_derive" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.8.21" [[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring", - "untrusted", + "ring", + "untrusted", ] +name = "sct" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.7.1" [[package]] -name = "sec1" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ - "base16ct", - "der", - "generic-array", - "pkcs8", - "subtle", - "zeroize", + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", ] +name = "sec1" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.7.3" [[package]] -name = "security-framework" -version = "2.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", + "bitflags 1.3.2", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", ] +name = "security-framework" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "2.9.2" [[package]] -name = "security-framework-sys" -version = "2.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ - "core-foundation-sys", - "libc", + "core-foundation-sys", + "libc", ] +name = "security-framework-sys" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "2.9.1" [[package]] +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" name = "semver" -version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +version = "1.0.20" [[package]] -name = "serde" -version = "1.0.210" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ - "serde_derive", + "serde_derive", ] +name = "serde" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.0.210" [[package]] -name = "serde-cw-value" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75d32da6b8ed758b7d850b6c3c08f1d7df51a4df3cb201296e63e34a78e99d4" dependencies = [ - "serde", + "serde", ] +name = "serde-cw-value" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.7.0" [[package]] -name = "serde-json-wasm" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e9213a07d53faa0b8dd81e767a54a8188a242fdb9be99ab75ec576a774bfdd7" dependencies = [ - "serde", + "serde", ] - -[[package]] name = "serde-json-wasm" -version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.5.2" + +[[package]] checksum = "f05da0d153dd4595bdffd5099dc0e9ce425b205ee648eb93437ff7302af8c9a5" dependencies = [ - "serde", + "serde", ] +name = "serde-json-wasm" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.0.1" [[package]] -name = "serde_bytes" -version = "0.11.12" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" dependencies = [ - "serde", + "serde", ] +name = "serde_bytes" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.11.12" [[package]] -name = "serde_derive" -version = "1.0.210" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", + "proc-macro2", + "quote", + "syn 2.0.82", ] +name = "serde_derive" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.0.210" [[package]] -name = "serde_derive_internals" -version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", + "proc-macro2", + "quote", + "syn 2.0.82", ] +name = "serde_derive_internals" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.29.1" [[package]] -name = "serde_json" -version = "1.0.105" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" dependencies = [ - "itoa", - "ryu", - "serde", + "itoa", + "ryu", + "serde", ] +name = "serde_json" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.0.105" [[package]] -name = "serde_repr" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", + "proc-macro2", + "quote", + "syn 2.0.82", ] +name = "serde_repr" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.1.16" [[package]] -name = "serde_spanned" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ - "serde", + "serde", ] +name = "serde_spanned" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.6.8" [[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", + "form_urlencoded", + "itoa", + "ryu", + "serde", ] +name = "serde_urlencoded" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.7.1" [[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", ] - -[[package]] name = "sha2" -version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.9.9" + +[[package]] checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", + "cfg-if", + "cpufeatures", + "digest 0.10.7", ] +name = "sha2" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.10.7" [[package]] +checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" name = "shlex" -version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" +version = "1.1.0" [[package]] -name = "signature" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" dependencies = [ - "digest 0.10.7", - "rand_core 0.6.4", + "digest 0.10.7", + "rand_core 0.6.4", ] +name = "signature" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "2.1.0" [[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ - "autocfg", + "autocfg", ] +name = "slab" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.4.9" [[package]] -name = "socket2" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ - "libc", - "winapi", + "libc", + "winapi", ] - -[[package]] name = "socket2" -version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.4.9" + +[[package]] checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" dependencies = [ - "libc", - "windows-sys", + "libc", + "windows-sys", ] +name = "socket2" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.5.3" [[package]] +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" name = "spin" -version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +version = "0.9.8" [[package]] -name = "spki" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" dependencies = [ - "base64ct", - "der", + "base64ct", + "der", ] +name = "spki" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.7.2" [[package]] +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" name = "static_assertions" -version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +version = "1.1.0" [[package]] +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" name = "subtle" -version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +version = "2.5.0" [[package]] -name = "subtle-encoding" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" dependencies = [ - "zeroize", + "zeroize", ] +name = "subtle-encoding" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.5.1" [[package]] +checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" name = "subtle-ng" -version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" +version = "2.5.0" [[package]] -name = "sylvia" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96e34c4bc8b8847011ca9c1478cfd5f532acb691377bca5fecf748833acffde8" dependencies = [ - "cosmwasm-schema", - "cosmwasm-std 2.1.4", - "derivative", - "konst", - "schemars", - "serde", - "serde-cw-value", - "serde-json-wasm 1.0.1", - "sylvia-derive", + "cosmwasm-schema", + "cosmwasm-std 2.1.4", + "derivative", + "konst", + "schemars", + "serde", + "serde-cw-value", + "serde-json-wasm 1.0.1", + "sylvia-derive", ] +name = "sylvia" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.2.1" [[package]] -name = "sylvia-derive" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad349313e23cfe1d54876be195a31b3293ca91ae31754abcf1f908e10812b4e7" dependencies = [ - "convert_case", - "itertools 0.13.0", - "proc-macro-crate", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.82", + "convert_case", + "itertools 0.13.0", + "proc-macro-crate", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.82", ] +name = "sylvia-derive" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.2.1" [[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "proc-macro2", + "quote", + "unicode-ident", ] - -[[package]] name = "syn" -version = "2.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.0.109" + +[[package]] checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "proc-macro2", + "quote", + "unicode-ident", ] +name = "syn" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "2.0.82" [[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", ] +name = "system-configuration" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.5.1" [[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" dependencies = [ - "core-foundation-sys", - "libc", + "core-foundation-sys", + "libc", ] +name = "system-configuration-sys" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.5.0" [[package]] -name = "tendermint" -version = "0.39.1" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f3afea7809ffaaf1e5d9c3c9997cb3a834df7e94fbfab2fad2bc4577f1cde41" dependencies = [ - "bytes", - "digest 0.10.7", - "ed25519", - "ed25519-consensus", - "flex-error", - "futures", - "k256", - "num-traits", - "once_cell", - "prost 0.13.3", - "ripemd", - "serde", - "serde_bytes", - "serde_json", - "serde_repr", - "sha2 0.10.7", - "signature", - "subtle", - "subtle-encoding", - "tendermint-proto", - "time", - "zeroize", + "bytes", + "digest 0.10.7", + "ed25519", + "ed25519-consensus", + "flex-error", + "futures", + "k256", + "num-traits", + "once_cell", + "prost 0.13.3", + "ripemd", + "serde", + "serde_bytes", + "serde_json", + "serde_repr", + "sha2 0.10.7", + "signature", + "subtle", + "subtle-encoding", + "tendermint-proto", + "time", + "zeroize", ] +name = "tendermint" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.39.1" [[package]] -name = "tendermint-config" -version = "0.39.1" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8add7b85b0282e5901521f78fe441956ac1e2752452f4e1f2c0ce7e1f10d485" dependencies = [ - "flex-error", - "serde", - "serde_json", - "tendermint", - "toml", - "url", + "flex-error", + "serde", + "serde_json", + "tendermint", + "toml", + "url", ] +name = "tendermint-config" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.39.1" [[package]] -name = "tendermint-proto" -version = "0.39.1" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf3abf34ecf33125621519e9952688e7a59a98232d51538037ba21fbe526a802" dependencies = [ - "bytes", - "flex-error", - "prost 0.13.3", - "serde", - "serde_bytes", - "subtle-encoding", - "time", + "bytes", + "flex-error", + "prost 0.13.3", + "serde", + "serde_bytes", + "subtle-encoding", + "time", ] +name = "tendermint-proto" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.39.1" [[package]] -name = "tendermint-rpc" -version = "0.39.1" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9693f42544bf3b41be3cbbfa418650c86e137fb8f5a57981659a84b677721ecf" dependencies = [ - "async-trait", - "bytes", - "flex-error", - "futures", - "getrandom", - "peg", - "pin-project", - "rand", - "reqwest", - "semver", - "serde", - "serde_bytes", - "serde_json", - "subtle", - "subtle-encoding", - "tendermint", - "tendermint-config", - "tendermint-proto", - "thiserror", - "time", - "tokio", - "tracing", - "url", - "uuid", - "walkdir", + "async-trait", + "bytes", + "flex-error", + "futures", + "getrandom", + "peg", + "pin-project", + "rand", + "reqwest", + "semver", + "serde", + "serde_bytes", + "serde_json", + "subtle", + "subtle-encoding", + "tendermint", + "tendermint-config", + "tendermint-proto", + "thiserror", + "time", + "tokio", + "tracing", + "url", + "uuid", + "walkdir", ] +name = "tendermint-rpc" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.39.1" [[package]] -name = "test-tube" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc02a1036b1d92445cb09078bcc933a84937586e6acb28ee5dfa7b5c20be569f" dependencies = [ - "base64 0.22.1", - "cosmrs", - "cosmwasm-std 2.1.4", - "osmosis-std", - "prost 0.13.3", - "serde", - "serde_json", - "thiserror", + "base64 0.22.1", + "cosmrs", + "cosmwasm-std 2.1.4", + "osmosis-std", + "prost 0.13.3", + "serde", + "serde_json", + "thiserror", ] +name = "test-tube" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.8.0" [[package]] -name = "thiserror" -version = "1.0.63" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ - "thiserror-impl", + "thiserror-impl", ] +name = "thiserror" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.0.63" [[package]] -name = "thiserror-impl" -version = "1.0.63" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", + "proc-macro2", + "quote", + "syn 2.0.82", ] +name = "thiserror-impl" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.0.63" [[package]] -name = "time" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72c91f41dcb2f096c05f0873d667dceec1087ce5bcf984ec8ffb19acddbb3217" dependencies = [ - "libc", - "num_threads", - "time-macros", + "libc", + "num_threads", + "time-macros", ] +name = "time" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.3.11" [[package]] +checksum = "42657b1a6f4d817cda8e7a0ace261fe0cc946cf3a80314390b22cc61ae080792" name = "time-macros" -version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42657b1a6f4d817cda8e7a0ace261fe0cc946cf3a80314390b22cc61ae080792" +version = "0.2.4" [[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ - "tinyvec_macros", + "tinyvec_macros", ] +name = "tinyvec" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.6.0" [[package]] +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" name = "tinyvec_macros" -version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" +version = "0.1.1" [[package]] -name = "tokio" -version = "1.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "num_cpus", - "pin-project-lite", - "socket2 0.5.3", - "tokio-macros", - "windows-sys", + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "pin-project-lite", + "socket2 0.5.3", + "tokio-macros", + "windows-sys", ] +name = "tokio" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.32.0" [[package]] -name = "tokio-macros" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", + "proc-macro2", + "quote", + "syn 2.0.82", ] +name = "tokio-macros" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "2.1.0" [[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls", - "tokio", + "rustls", + "tokio", ] +name = "tokio-rustls" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.24.1" [[package]] -name = "tokio-util" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", - "tracing", + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", ] - -[[package]] -name = "toml" -version = "0.8.2" +name = "tokio-util" source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.7.8" + +[[package]] checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.20.2", + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.20.2", ] +name = "toml" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.8.2" [[package]] -name = "toml_datetime" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ - "serde", + "serde", ] +name = "toml_datetime" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.6.8" [[package]] -name = "toml_edit" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap 2.6.0", - "serde", - "serde_spanned", - "toml_datetime", - "winnow 0.5.15", + "indexmap 2.6.0", + "serde", + "serde_spanned", + "toml_datetime", + "winnow 0.5.15", ] - -[[package]] name = "toml_edit" -version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.20.2" + +[[package]] checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.6.0", - "toml_datetime", - "winnow 0.6.20", + "indexmap 2.6.0", + "toml_datetime", + "winnow 0.6.20", ] +name = "toml_edit" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.22.22" [[package]] +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" name = "tower-service" -version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +version = "0.3.2" [[package]] -name = "tracing" -version = "0.1.37" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "cfg-if", - "pin-project-lite", - "tracing-core", + "cfg-if", + "pin-project-lite", + "tracing-core", ] +name = "tracing" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.1.37" [[package]] -name = "tracing-core" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ - "once_cell", + "once_cell", ] +name = "tracing-core" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.1.31" [[package]] -name = "transmuter" -version = "4.0.0" dependencies = [ - "cosmwasm-schema", - "cosmwasm-std 2.1.4", - "cosmwasm-storage", - "cw-storage-plus", - "cw2", - "itertools 0.13.0", - "osmosis-std", - "osmosis-test-tube", - "rstest", - "schemars", - "serde", - "sylvia", - "thiserror", - "transmuter_math", + "cosmwasm-schema", + "cosmwasm-std 2.1.4", + "cosmwasm-storage", + "cw-storage-plus", + "cw2", + "itertools 0.13.0", + "osmosis-std", + "osmosis-test-tube", + "rstest 0.18.2", + "schemars", + "serde", + "sylvia", + "thiserror", + "transmuter_math", ] +name = "transmuter" +version = "4.0.0" [[package]] -name = "transmuter_math" -version = "1.0.0" dependencies = [ - "cosmwasm-schema", - "cosmwasm-std 2.1.4", - "thiserror", + "cosmwasm-schema", + "cosmwasm-std 2.1.4", + "thiserror", ] +name = "transmuter_math" +version = "1.0.0" [[package]] +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" name = "try-lock" -version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +version = "0.2.4" [[package]] +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" name = "typenum" -version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +version = "1.16.0" [[package]] +checksum = "3e5cee357cc77d1e02f10a3e6c4e13b8462fafab05998b62d331b7d9485589ff" name = "typewit" -version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e5cee357cc77d1e02f10a3e6c4e13b8462fafab05998b62d331b7d9485589ff" +version = "1.5.0" [[package]] +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" name = "unicode-bidi" -version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +version = "0.3.13" [[package]] +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" name = "unicode-ident" -version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" +version = "1.0.13" [[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ - "tinyvec", + "tinyvec", ] +name = "unicode-normalization" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.1.22" [[package]] +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" name = "unicode-segmentation" -version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +version = "1.10.1" [[package]] +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" name = "unicode-xid" -version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" +version = "0.2.6" [[package]] +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" name = "untrusted" -version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" +version = "0.9.0" [[package]] -name = "url" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", + "form_urlencoded", + "idna", + "percent-encoding", ] +name = "url" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "2.4.1" [[package]] +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" name = "uuid" -version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" +version = "1.11.0" [[package]] +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" name = "version_check" -version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +version = "0.9.4" [[package]] -name = "walkdir" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" dependencies = [ - "same-file", - "winapi-util", + "same-file", + "winapi-util", ] +name = "walkdir" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "2.3.3" [[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "try-lock", + "try-lock", ] +name = "want" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.3.1" [[package]] +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +version = "0.11.0+wasi-snapshot-preview1" [[package]] -name = "wasm-bindgen" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ - "cfg-if", - "wasm-bindgen-macro", + "cfg-if", + "wasm-bindgen-macro", ] +name = "wasm-bindgen" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.2.87" [[package]] -name = "wasm-bindgen-backend" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.82", - "wasm-bindgen-shared", + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.82", + "wasm-bindgen-shared", ] +name = "wasm-bindgen-backend" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.2.87" [[package]] -name = "wasm-bindgen-futures" -version = "0.4.37" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", ] +name = "wasm-bindgen-futures" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.4.37" [[package]] -name = "wasm-bindgen-macro" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ - "quote", - "wasm-bindgen-macro-support", + "quote", + "wasm-bindgen-macro-support", ] +name = "wasm-bindgen-macro" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.2.87" [[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", - "wasm-bindgen-backend", - "wasm-bindgen-shared", + "proc-macro2", + "quote", + "syn 2.0.82", + "wasm-bindgen-backend", + "wasm-bindgen-shared", ] +name = "wasm-bindgen-macro-support" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.2.87" [[package]] +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" name = "wasm-bindgen-shared" -version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +version = "0.2.87" [[package]] -name = "web-sys" -version = "0.3.64" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" dependencies = [ - "js-sys", - "wasm-bindgen", + "js-sys", + "wasm-bindgen", ] +name = "web-sys" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.3.64" [[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] +name = "winapi" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.3.9" [[package]] +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +version = "0.4.0" [[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi", + "winapi", ] +name = "winapi-util" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.1.5" [[package]] +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +version = "0.4.0" [[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets", ] +name = "windows-sys" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.48.0" [[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] +name = "windows-targets" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.48.5" [[package]] +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" name = "windows_aarch64_gnullvm" -version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +version = "0.48.5" [[package]] +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" name = "windows_aarch64_msvc" -version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +version = "0.48.5" [[package]] +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" name = "windows_i686_gnu" -version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +version = "0.48.5" [[package]] +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" name = "windows_i686_msvc" -version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +version = "0.48.5" [[package]] +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" name = "windows_x86_64_gnu" -version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +version = "0.48.5" [[package]] +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" name = "windows_x86_64_gnullvm" -version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +version = "0.48.5" [[package]] +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" name = "windows_x86_64_msvc" -version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +version = "0.48.5" [[package]] -name = "winnow" -version = "0.5.15" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" dependencies = [ - "memchr", + "memchr", ] - -[[package]] name = "winnow" -version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.5.15" + +[[package]] checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ - "memchr", + "memchr", ] +name = "winnow" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.6.20" [[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "cfg-if", - "windows-sys", + "cfg-if", + "windows-sys", ] +name = "winreg" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.50.0" [[package]] -name = "zerocopy" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ - "byteorder", - "zerocopy-derive", + "byteorder", + "zerocopy-derive", ] +name = "zerocopy" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.7.35" [[package]] -name = "zerocopy-derive" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", + "proc-macro2", + "quote", + "syn 2.0.82", ] +name = "zerocopy-derive" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.7.35" [[package]] -name = "zeroize" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" dependencies = [ - "zeroize_derive", + "zeroize_derive", ] +name = "zeroize" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.7.0" [[package]] -name = "zeroize_derive" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", + "proc-macro2", + "quote", + "syn 2.0.82", ] +name = "zeroize_derive" +source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.4.2" diff --git a/packages/transmuter_math/Cargo.toml b/packages/transmuter_math/Cargo.toml index 9a20efd..57a825a 100644 --- a/packages/transmuter_math/Cargo.toml +++ b/packages/transmuter_math/Cargo.toml @@ -10,4 +10,5 @@ version = "1.0.0" [dependencies] cosmwasm-schema = {workspace = true} cosmwasm-std = {workspace = true} +rstest = "0.22.0" thiserror = "1.0.63" diff --git a/packages/transmuter_math/src/errors.rs b/packages/transmuter_math/src/errors.rs index 22c358a..edd00ee 100644 --- a/packages/transmuter_math/src/errors.rs +++ b/packages/transmuter_math/src/errors.rs @@ -15,6 +15,9 @@ pub enum TransmuterMathError { #[error("Missing data points to calculate moving average")] MissingDataPoints, + #[error("Value is not normalized: {var_name}")] + NotNormalized { var_name: String }, + #[error("{0}")] DecimalRangeExceeded(#[from] DecimalRangeExceeded), diff --git a/packages/transmuter_math/src/rebalancing_incentive.rs b/packages/transmuter_math/src/rebalancing_incentive.rs index 76672be..d4e158e 100644 --- a/packages/transmuter_math/src/rebalancing_incentive.rs +++ b/packages/transmuter_math/src/rebalancing_incentive.rs @@ -92,9 +92,9 @@ impl ImpactFactorParamGroup { } } -pub enum Reaction { - Incentivize, - CollectFee, +pub enum ReblancingResponse { + Incentive, + Fee, } /// combine all the impact factor components @@ -107,7 +107,7 @@ pub enum Reaction { /// The reason why it needs to include all dimensions is because the case that swapping with alloyed asset, which will effect overall composition rather than just 2 assets. pub fn calculate_impact_factor( impact_factor_param_groups: &[ImpactFactorParamGroup], -) -> Result<(Reaction, Decimal256), TransmuterMathError> { +) -> Result<(ReblancingResponse, Decimal256), TransmuterMathError> { let mut cumulative_impact_factor_sqaure = Decimal256::zero(); let mut impact_factor_component_sum = SignedDecimal256::zero(); @@ -130,9 +130,9 @@ pub fn calculate_impact_factor( } let reaction = if impact_factor_component_sum.is_negative() { - Reaction::Incentivize + ReblancingResponse::Incentive } else { - Reaction::CollectFee + ReblancingResponse::Fee }; let impact_factor = cumulative_impact_factor_sqaure.checked_div(n)?.sqrt(); @@ -150,8 +150,22 @@ pub fn calculate_rebalancing_fee( lambda: Decimal, impact_factor: Decimal, amount_in: Uint128, -) -> Result { - let amount_in_dec = Decimal::from_atomics(amount_in, 0)?; +) -> Result { + if lambda > Decimal::one() { + return Err(TransmuterMathError::NotNormalized { + var_name: "lambda".to_string(), + }); + } + + if impact_factor > Decimal::one() { + return Err(TransmuterMathError::NotNormalized { + var_name: "impact_factor".to_string(), + }); + } + + let lambda = Decimal256::from(lambda); + let impact_factor = Decimal256::from(impact_factor); + let amount_in_dec = Decimal256::from_atomics(amount_in, 0)?; lambda .checked_mul(impact_factor)? @@ -164,7 +178,7 @@ pub fn calculate_rebalancing_impact( lambda: Decimal, impact_factor: Decimal, amount_in: Uint128, -) -> Result { +) -> Result { calculate_rebalancing_fee(lambda, impact_factor, amount_in) } @@ -197,3 +211,50 @@ pub fn calculate_rebalancing_incentive( .checked_mul(incentive_pool_dec) .map_err(TransmuterMathError::OverflowError) } + +#[cfg(test)] +mod tests { + use super::*; + use rstest::rstest; + + #[rstest] + #[case( + Decimal::percent(100), + Decimal::percent(100), + Uint128::MAX, + Ok(Decimal256::from_atomics(u128::MAX, 0).unwrap()) + )] + #[case( + Decimal::percent(100), + Decimal::percent(100), + Uint128::zero(), + Ok(Decimal256::zero()) + )] + #[case( + Decimal::percent(50), + Decimal::percent(50), + Uint128::from(100u128), + Ok(Decimal256::from_atomics(25u128, 0).unwrap()) + )] + #[case( + Decimal::percent(101), + Decimal::percent(100), + Uint128::MAX, + Err(TransmuterMathError::NotNormalized { var_name: "lambda".to_string() }) + )] + #[case( + Decimal::percent(100), + Decimal::percent(101), + Uint128::MAX, + Err(TransmuterMathError::NotNormalized { var_name: "impact_factor".to_string() }) + )] + fn test_calculate_rebalancing_fee( + #[case] lambda: Decimal, + #[case] impact_factor: Decimal, + #[case] amount_in: Uint128, + #[case] expected: Result, + ) { + let actual = calculate_rebalancing_fee(lambda, impact_factor, amount_in); + assert_eq!(expected, actual); + } +} From 19f03a62e0e90b43e73d16e5bf74319fc3ed3e55 Mon Sep 17 00:00:00 2001 From: Supanat Potiwarakorn Date: Wed, 11 Sep 2024 15:41:38 +0700 Subject: [PATCH 03/13] add prop test --- packages/transmuter_math/Cargo.toml | 5 ++++- .../rebalancing_incentive.txt | 7 +++++++ .../src/rebalancing_incentive.rs | 17 +++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 packages/transmuter_math/proptest-regressions/rebalancing_incentive.txt diff --git a/packages/transmuter_math/Cargo.toml b/packages/transmuter_math/Cargo.toml index 57a825a..f73fd82 100644 --- a/packages/transmuter_math/Cargo.toml +++ b/packages/transmuter_math/Cargo.toml @@ -10,5 +10,8 @@ version = "1.0.0" [dependencies] cosmwasm-schema = {workspace = true} cosmwasm-std = {workspace = true} -rstest = "0.22.0" thiserror = "1.0.63" + +[dev-dependencies] +proptest = "1.5.0" +rstest = "0.22.0" diff --git a/packages/transmuter_math/proptest-regressions/rebalancing_incentive.txt b/packages/transmuter_math/proptest-regressions/rebalancing_incentive.txt new file mode 100644 index 0000000..fb54f54 --- /dev/null +++ b/packages/transmuter_math/proptest-regressions/rebalancing_incentive.txt @@ -0,0 +1,7 @@ +# Seeds for failure cases proptest has generated in the past. It is +# automatically read and these particular cases re-run before any +# novel cases are generated. +# +# It is recommended to check this file in to source control so that +# everyone who runs the test benefits from these saved cases. +cc 562a32f0f5c0872580ed28523b29332acb431e7009dee0c7aba7b67a58523c3e # shrinks to lambda = 1000000000000000001, impact_factor = 0, amount_in = 0 diff --git a/packages/transmuter_math/src/rebalancing_incentive.rs b/packages/transmuter_math/src/rebalancing_incentive.rs index d4e158e..d6d7c86 100644 --- a/packages/transmuter_math/src/rebalancing_incentive.rs +++ b/packages/transmuter_math/src/rebalancing_incentive.rs @@ -215,6 +215,7 @@ pub fn calculate_rebalancing_incentive( #[cfg(test)] mod tests { use super::*; + use proptest::prelude::*; use rstest::rstest; #[rstest] @@ -257,4 +258,20 @@ mod tests { let actual = calculate_rebalancing_fee(lambda, impact_factor, amount_in); assert_eq!(expected, actual); } + + proptest! { + #[test] + fn test_rebalancing_fee_must_never_exceed_amount_in( + lambda in 0u128..=1000000000000000000, + impact_factor in 0u128..=1000000000000000000, + amount_in in 0..=u128::MAX, + ) { + let lambda = Decimal::raw(lambda); + let impact_factor = Decimal::raw(impact_factor); + let amount_in = Uint128::new(amount_in); + + let actual = calculate_rebalancing_fee(lambda, impact_factor, amount_in).unwrap(); + assert!(actual <= Decimal256::from_atomics(amount_in, 0).unwrap()); + } + } } From 29fa5d1e93c3cc1e92a84596acc37a60ff791046 Mon Sep 17 00:00:00 2001 From: Supanat Potiwarakorn Date: Wed, 11 Sep 2024 16:20:13 +0700 Subject: [PATCH 04/13] test calc incentive --- packages/transmuter_math/src/lib.rs | 3 +- .../src/rebalancing_incentive.rs | 91 +++++++++++++++++-- 2 files changed, 85 insertions(+), 9 deletions(-) diff --git a/packages/transmuter_math/src/lib.rs b/packages/transmuter_math/src/lib.rs index f405790..69cb84b 100644 --- a/packages/transmuter_math/src/lib.rs +++ b/packages/transmuter_math/src/lib.rs @@ -1,7 +1,8 @@ mod division; mod errors; mod helpers; -mod rebalancing_incentive; + +pub mod rebalancing_incentive; pub use cosmwasm_std::{Decimal, Timestamp, Uint64}; pub use division::Division; diff --git a/packages/transmuter_math/src/rebalancing_incentive.rs b/packages/transmuter_math/src/rebalancing_incentive.rs index d6d7c86..6048027 100644 --- a/packages/transmuter_math/src/rebalancing_incentive.rs +++ b/packages/transmuter_math/src/rebalancing_incentive.rs @@ -64,6 +64,22 @@ pub struct ImpactFactorParamGroup { } impl ImpactFactorParamGroup { + pub fn new( + prev_normalized_balance: Decimal, + update_normalized_balance: Decimal, + ideal_balance_lower_bound: Decimal, + ideal_balance_upper_bound: Decimal, + upper_limit: Decimal, + ) -> Self { + Self { + prev_normalized_balance, + update_normalized_balance, + ideal_balance_lower_bound, + ideal_balance_upper_bound, + upper_limit, + } + } + fn has_no_change_in_balance(&self) -> bool { self.prev_normalized_balance == self.update_normalized_balance } @@ -202,19 +218,29 @@ pub fn calculate_rebalancing_impact( pub fn calculate_rebalancing_incentive( impact: Decimal, incentive_pool: Uint128, -) -> Result { - let incentive_pool_dec = Decimal::from_atomics(incentive_pool, 0)?; +) -> Result { + if impact > Decimal::one() { + return Err(TransmuterMathError::NotNormalized { + var_name: "impact".to_string(), + }); + } + + let impact = Decimal256::from(impact); + let incentive_pool_dec = Decimal256::from_atomics(incentive_pool, 0)?; + let impact_by_incentive_pool = impact.checked_mul(incentive_pool_dec)?; let extended_incentive_pool = incentive_pool_dec.checked_add(impact)?; - let impact_over_extended_incentive_pool = impact.checked_div(extended_incentive_pool)?; - impact_over_extended_incentive_pool - .checked_mul(incentive_pool_dec) - .map_err(TransmuterMathError::OverflowError) + impact_by_incentive_pool + .checked_div(extended_incentive_pool) + .map_err(TransmuterMathError::CheckedFromRatioError) } #[cfg(test)] mod tests { + use std::str::FromStr; + use super::*; + use cosmwasm_std::Uint256; use proptest::prelude::*; use rstest::rstest; @@ -262,8 +288,8 @@ mod tests { proptest! { #[test] fn test_rebalancing_fee_must_never_exceed_amount_in( - lambda in 0u128..=1000000000000000000, - impact_factor in 0u128..=1000000000000000000, + lambda in 0u128..=1_000_000_000_000_000_000, // -> 0.0..1.0 + impact_factor in 0u128..=1_000_000_000_000_000_000, // 0.0 -> 1.0 amount_in in 0..=u128::MAX, ) { let lambda = Decimal::raw(lambda); @@ -273,5 +299,54 @@ mod tests { let actual = calculate_rebalancing_fee(lambda, impact_factor, amount_in).unwrap(); assert!(actual <= Decimal256::from_atomics(amount_in, 0).unwrap()); } + + #[test] + fn test_rebalancing_fee_must_equal_rebalancing_impact( + lambda in 0u128..=u128::MAX, + impact_factor in 0u128..=u128::MAX, + amount_in in 0..=u128::MAX, + ) { + let lambda = Decimal::raw(lambda); + let impact_factor = Decimal::raw(impact_factor); + let amount_in = Uint128::new(amount_in); + + let fee = calculate_rebalancing_fee(lambda, impact_factor, amount_in); + let impact = calculate_rebalancing_impact(lambda, impact_factor, amount_in); + + assert_eq!(fee, impact); + } + } + + #[rstest] + #[case(Decimal::one(), Uint128::MAX, Ok(Decimal256::from_ratio( + Uint256::from(u128::MAX), + Uint256::from(u128::MAX) + Uint256::from(1u128), + )))] + #[case(Decimal::zero(), Uint128::new(1000), Ok(Decimal256::zero()))] + #[case(Decimal::one(), Uint128::zero(), Ok(Decimal256::zero()))] + #[case(Decimal::percent(50), Uint128::new(1000), Ok(Decimal256::from_str("0.499750124937531234").unwrap()))] + #[case(Decimal::percent(100), Uint128::new(1000), Ok(Decimal256::from_str("0.999000999000999").unwrap()))] + #[case(Decimal::percent(101), Uint128::new(1000), Err(TransmuterMathError::NotNormalized { var_name: "impact".to_string() }))] + fn test_calculate_rebalancing_incentive( + #[case] impact: Decimal, + #[case] incentive_pool: Uint128, + #[case] expected: Result, + ) { + let actual = calculate_rebalancing_incentive(impact, incentive_pool); + assert_eq!(expected, actual); + } + + proptest! { + #[test] + fn test_rebalancing_incentive_must_less_than_or_equal_to_incentive_pool( + impact in 0u128..=1_000_000_000_000_000_000, + incentive_pool in 0u128..=u128::MAX, + ) { + let impact = Decimal::raw(impact); + let incentive_pool = Uint128::new(incentive_pool); + + let actual = calculate_rebalancing_incentive(impact, incentive_pool).unwrap(); + assert!(actual <= Decimal256::from_atomics(incentive_pool, 0).unwrap()); + } } } From cc5414e7daa503ece2b3a397ba5729616772edec Mon Sep 17 00:00:00 2001 From: Supanat Potiwarakorn Date: Wed, 11 Sep 2024 17:06:37 +0700 Subject: [PATCH 05/13] add test for test_calculate_impact_factor_component --- .../src/rebalancing_incentive.rs | 103 ++++++++++++++++-- 1 file changed, 94 insertions(+), 9 deletions(-) diff --git a/packages/transmuter_math/src/rebalancing_incentive.rs b/packages/transmuter_math/src/rebalancing_incentive.rs index 6048027..d59fdaa 100644 --- a/packages/transmuter_math/src/rebalancing_incentive.rs +++ b/packages/transmuter_math/src/rebalancing_incentive.rs @@ -45,6 +45,9 @@ pub fn calculate_cumulative_impact_factor_component( } else if normalized_balance > ideal_balance_upper_bound { normalized_balance // b .checked_sub(ideal_balance_upper_bound)? // - phi_u + // delta - phi_u will never be 0 as this case requires b > phi_u, + // delta - phi_u = 0 then delta = phi_u + // since b > delta is restricted by limiter, and delta <= phi_u, this will never happen .checked_div(upper_limit.checked_sub(ideal_balance_upper_bound)?)? // / delta - phi_u .pow(2) // ^2 } else { @@ -108,7 +111,7 @@ impl ImpactFactorParamGroup { } } -pub enum ReblancingResponse { +pub enum PayoffType { Incentive, Fee, } @@ -123,7 +126,7 @@ pub enum ReblancingResponse { /// The reason why it needs to include all dimensions is because the case that swapping with alloyed asset, which will effect overall composition rather than just 2 assets. pub fn calculate_impact_factor( impact_factor_param_groups: &[ImpactFactorParamGroup], -) -> Result<(ReblancingResponse, Decimal256), TransmuterMathError> { +) -> Result<(PayoffType, Decimal256), TransmuterMathError> { let mut cumulative_impact_factor_sqaure = Decimal256::zero(); let mut impact_factor_component_sum = SignedDecimal256::zero(); @@ -145,15 +148,15 @@ pub fn calculate_impact_factor( cumulative_impact_factor_sqaure.checked_add(impact_factor_component_square)?; } - let reaction = if impact_factor_component_sum.is_negative() { - ReblancingResponse::Incentive + let payoff_type = if impact_factor_component_sum.is_negative() { + PayoffType::Incentive } else { - ReblancingResponse::Fee + PayoffType::Fee }; let impact_factor = cumulative_impact_factor_sqaure.checked_div(n)?.sqrt(); - Ok((reaction, impact_factor)) + Ok((payoff_type, impact_factor)) } /// Calculate the rebalancing fee @@ -244,6 +247,8 @@ mod tests { use proptest::prelude::*; use rstest::rstest; + const ONE_DEC_RAW: u128 = 1_000_000_000_000_000_000; + #[rstest] #[case( Decimal::percent(100), @@ -288,8 +293,8 @@ mod tests { proptest! { #[test] fn test_rebalancing_fee_must_never_exceed_amount_in( - lambda in 0u128..=1_000_000_000_000_000_000, // -> 0.0..1.0 - impact_factor in 0u128..=1_000_000_000_000_000_000, // 0.0 -> 1.0 + lambda in 0u128..=ONE_DEC_RAW, + impact_factor in 0u128..=ONE_DEC_RAW, amount_in in 0..=u128::MAX, ) { let lambda = Decimal::raw(lambda); @@ -339,7 +344,7 @@ mod tests { proptest! { #[test] fn test_rebalancing_incentive_must_less_than_or_equal_to_incentive_pool( - impact in 0u128..=1_000_000_000_000_000_000, + impact in 0u128..=ONE_DEC_RAW, incentive_pool in 0u128..=u128::MAX, ) { let impact = Decimal::raw(impact); @@ -349,4 +354,84 @@ mod tests { assert!(actual <= Decimal256::from_atomics(incentive_pool, 0).unwrap()); } } + + #[rstest] + #[case( + Decimal::zero(), + Decimal::percent(40), + Decimal::percent(50), + Decimal::percent(60), + Ok(Decimal::one()) + )] + #[case( + Decimal::percent(39), + Decimal::percent(40), + Decimal::percent(50), + Decimal::percent(60), + Ok(Decimal::from_str("0.000625").unwrap()) + )] + #[case( + Decimal::percent(40), + Decimal::percent(40), + Decimal::percent(50), + Decimal::percent(60), + Ok(Decimal::zero()) + )] + #[case( + Decimal::percent(50), + Decimal::percent(40), + Decimal::percent(50), + Decimal::percent(60), + Ok(Decimal::zero()) + )] + #[case( + Decimal::percent(51), + Decimal::percent(40), + Decimal::percent(50), + Decimal::percent(60), + Ok(Decimal::percent(1)) + )] + #[case( + Decimal::percent(60), + Decimal::percent(40), + Decimal::percent(50), + Decimal::percent(60), + Ok(Decimal::one()) + )] + #[case( + Decimal::percent(50), + Decimal::percent(40), + Decimal::percent(60), + Decimal::percent(50), + Ok(Decimal::zero()) + )] + #[case( + Decimal::percent(30), + Decimal::percent(40), + Decimal::percent(60), + Decimal::percent(30), + Ok(Decimal::zero()) + )] + #[case( + Decimal::percent(30), + Decimal::percent(40), + Decimal::percent(30), + Decimal::percent(50), + Ok(Decimal::zero()) + )] + fn test_calculate_impact_factor_component( + #[case] normalized_balance: Decimal, + #[case] ideal_balance_lower_bound: Decimal, + #[case] ideal_balance_upper_bound: Decimal, + #[case] upper_limit: Decimal, + #[case] expected: Result, + ) { + let actual = calculate_cumulative_impact_factor_component( + normalized_balance, + ideal_balance_lower_bound, + ideal_balance_upper_bound, + upper_limit, + ); + assert_eq!(expected, actual); + } } From 55df2ff32bf6b63442b5e711fce3e9dbd1a425de Mon Sep 17 00:00:00 2001 From: Supanat Potiwarakorn Date: Wed, 11 Sep 2024 17:15:32 +0700 Subject: [PATCH 06/13] change pow to checked_pow --- packages/transmuter_math/src/rebalancing_incentive.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/transmuter_math/src/rebalancing_incentive.rs b/packages/transmuter_math/src/rebalancing_incentive.rs index d59fdaa..63ae747 100644 --- a/packages/transmuter_math/src/rebalancing_incentive.rs +++ b/packages/transmuter_math/src/rebalancing_incentive.rs @@ -41,7 +41,7 @@ pub fn calculate_cumulative_impact_factor_component( ideal_balance_lower_bound // phi_l .checked_sub(normalized_balance)? // - b .checked_div(ideal_balance_lower_bound)? // / phi_l - .pow(2) // ^2 + .checked_pow(2)? // ^2 } else if normalized_balance > ideal_balance_upper_bound { normalized_balance // b .checked_sub(ideal_balance_upper_bound)? // - phi_u @@ -49,7 +49,7 @@ pub fn calculate_cumulative_impact_factor_component( // delta - phi_u = 0 then delta = phi_u // since b > delta is restricted by limiter, and delta <= phi_u, this will never happen .checked_div(upper_limit.checked_sub(ideal_balance_upper_bound)?)? // / delta - phi_u - .pow(2) // ^2 + .checked_pow(2)? // ^2 } else { // within ideal balance Decimal::zero() @@ -74,6 +74,7 @@ impl ImpactFactorParamGroup { ideal_balance_upper_bound: Decimal, upper_limit: Decimal, ) -> Self { + // TODO: restrict this Self { prev_normalized_balance, update_normalized_balance, From 8075a1565b4d731e711368618a2ec540d9a84514 Mon Sep 17 00:00:00 2001 From: Supanat Potiwarakorn Date: Wed, 11 Sep 2024 17:58:50 +0700 Subject: [PATCH 07/13] add proptest for calculate_cumulative_impact_factor_component --- .../rebalancing_incentive.txt | 5 + .../src/rebalancing_incentive.rs | 120 +++++++++++++++++- 2 files changed, 124 insertions(+), 1 deletion(-) diff --git a/packages/transmuter_math/proptest-regressions/rebalancing_incentive.txt b/packages/transmuter_math/proptest-regressions/rebalancing_incentive.txt index fb54f54..9b7f5a9 100644 --- a/packages/transmuter_math/proptest-regressions/rebalancing_incentive.txt +++ b/packages/transmuter_math/proptest-regressions/rebalancing_incentive.txt @@ -5,3 +5,8 @@ # It is recommended to check this file in to source control so that # everyone who runs the test benefits from these saved cases. cc 562a32f0f5c0872580ed28523b29332acb431e7009dee0c7aba7b67a58523c3e # shrinks to lambda = 1000000000000000001, impact_factor = 0, amount_in = 0 +cc b152caa95a33e588b05bf0c6d3c53b91808d83e0a5f6a8176d35ce59771ac8df # shrinks to normalized_balance = 269526351641570518, ideal_balance_lower_bound = 0, ideal_balance_upper_bound = 0, upper_limit = 0 +cc 05667d509ee73bc4dc7059dabfd936ca1b83e0858079419ef4ec85d3134e545d # shrinks to normalized_balance = 269724147998904283, ideal_balance_lower_bound = 296075781682198385, ideal_balance_upper_bound = 0, upper_limit = 269724147998904283 +cc b254ff7ece5fb165f9e4d53746fc7222427cff1d17afbcd15cb8e3b3a7282cfc # shrinks to normalized_balance = 0, ideal_balance_lower_bound = 1, ideal_balance_upper_bound = 0, upper_limit = 0 +cc 6bbf8d95569b53ec005ed88b282ebcb88f2a327770cf267800b744274aeaf323 # shrinks to normalized_balance = 340640889074348996, ideal_balance_lower_bound = 340640889074348997, ideal_balance_upper_bound = 340640889074348998, upper_limit = 340640889074348998 +cc 4c6ad67ab30e522b8de8314e2219263f2e0dff53070517988a192b64099320ee # shrinks to normalized_balance = 866170838754561023, ideal_balance_lower_bound = 0, ideal_balance_range = 0 diff --git a/packages/transmuter_math/src/rebalancing_incentive.rs b/packages/transmuter_math/src/rebalancing_incentive.rs index 63ae747..e01d273 100644 --- a/packages/transmuter_math/src/rebalancing_incentive.rs +++ b/packages/transmuter_math/src/rebalancing_incentive.rs @@ -241,7 +241,7 @@ pub fn calculate_rebalancing_incentive( #[cfg(test)] mod tests { - use std::str::FromStr; + use std::{cmp::min, str::FromStr}; use super::*; use cosmwasm_std::Uint256; @@ -435,4 +435,122 @@ mod tests { ); assert_eq!(expected, actual); } + + proptest! { + #[test] + fn test_calculate_impact_factor_component_must_be_within_0_and_1( + normalized_balance in 0u128..=ONE_DEC_RAW, + ideal_balance_lower_bound in 0u128..=ONE_DEC_RAW, + ideal_balance_upper_bound in 0u128..=ONE_DEC_RAW, + upper_limit in 0u128..=ONE_DEC_RAW, + ) { + prop_assume!(normalized_balance <= upper_limit); + + let normalized_balance = Decimal::raw(normalized_balance); + let ideal_balance_lower_bound = Decimal::raw(ideal_balance_lower_bound); + let ideal_balance_upper_bound = Decimal::raw(ideal_balance_upper_bound); + let upper_limit = Decimal::raw(upper_limit); + + match calculate_cumulative_impact_factor_component( + normalized_balance, + ideal_balance_lower_bound, + ideal_balance_upper_bound, + upper_limit, + ) { + Ok(actual) => assert!(actual <= Decimal::one()), + Err(e) => panic!("Failed to calculate impact factor component: {:?}", e), + } + } + + #[test] + fn test_calculate_impact_factor_component_with_normalized_balance_in_ideal_balance_bound_must_be_zero( + normalized_balance in 0u128..=ONE_DEC_RAW, + ideal_balance_lower_bound_from_normalized_balance in 0u128..=ONE_DEC_RAW, + ideal_balance_upper_bound_from_normalized_balance in 0u128..=ONE_DEC_RAW, + ) { + let ideal_balance_upper_bound = Decimal::raw(min(ONE_DEC_RAW, normalized_balance + ideal_balance_upper_bound_from_normalized_balance)); + let ideal_balance_lower_bound = Decimal::raw(normalized_balance.saturating_sub(ideal_balance_lower_bound_from_normalized_balance)); + let normalized_balance = Decimal::raw(normalized_balance); + let upper_limit = ideal_balance_upper_bound; + let actual = calculate_cumulative_impact_factor_component( + normalized_balance, + ideal_balance_lower_bound, + ideal_balance_upper_bound, + upper_limit, + ).unwrap(); + + assert_eq!(Decimal::zero(), actual); + } + + #[test] + fn test_calculate_impact_factor_component_with_normalized_balance_decreasing_while_less_than_ideal_balance_lower_bound_must_be_increasing( + normalized_balance in 1u128..=ONE_DEC_RAW, + ideal_balance_lower_bound in 0u128..=ONE_DEC_RAW, + ) { + prop_assume!(normalized_balance < ideal_balance_lower_bound); + + let ideal_balance_upper_bound = ideal_balance_lower_bound + 1; + let upper_limit = ideal_balance_upper_bound + 1; + + let normalized_balance = Decimal::raw(normalized_balance); + let ideal_balance_lower_bound = Decimal::raw(ideal_balance_lower_bound); + let ideal_balance_upper_bound = Decimal::raw(ideal_balance_upper_bound); + let upper_limit = Decimal::raw(upper_limit); + let epsilon = Decimal::raw(1000u128); + + let c1 = calculate_cumulative_impact_factor_component( + normalized_balance - epsilon, + ideal_balance_lower_bound, + ideal_balance_upper_bound, + upper_limit, + ).unwrap(); + + let c2 = calculate_cumulative_impact_factor_component( + normalized_balance, + ideal_balance_lower_bound, + ideal_balance_upper_bound, + upper_limit, + ).unwrap(); + + assert!(c1 > c2, "c1: {c1}, c2: {c2}"); + } + + #[test] + fn test_calculate_impact_factor_component_with_normalized_balance_increasing_while_greater_than_ideal_balance_upper_bound_must_be_increasing( + normalized_balance in 0u128..=ONE_DEC_RAW-1, + ideal_balance_upper_bound in 0u128..=ONE_DEC_RAW, + upper_limit in 0u128..=ONE_DEC_RAW, + ) { + prop_assume!(normalized_balance > ideal_balance_upper_bound); + prop_assume!(upper_limit > ideal_balance_upper_bound); + + let ideal_balance_lower_bound = ideal_balance_upper_bound - 1; + + let normalized_balance = Decimal::raw(normalized_balance); + let ideal_balance_lower_bound = Decimal::raw(ideal_balance_lower_bound); + let ideal_balance_upper_bound = Decimal::raw(ideal_balance_upper_bound); + let upper_limit = Decimal::raw(upper_limit); + let epsilon = Decimal::raw(1000u128); + + let c1 = calculate_cumulative_impact_factor_component( + normalized_balance - epsilon, + ideal_balance_lower_bound, + ideal_balance_upper_bound, + upper_limit, + ).unwrap(); + + let c2 = calculate_cumulative_impact_factor_component( + normalized_balance, + ideal_balance_lower_bound, + ideal_balance_upper_bound, + upper_limit, + ).unwrap(); + + assert!(c1 < c2, "c1: {c1}, c2: {c2}"); + } + } + + // TODO: tests + // - ImpactFactorParamGroup + // - calculate_impact_factor } From 1760600d4b5274433b4585b09d0f401edfa68af7 Mon Sep 17 00:00:00 2001 From: Supanat Potiwarakorn Date: Mon, 16 Sep 2024 10:06:18 +0700 Subject: [PATCH 08/13] rename for clarity --- packages/transmuter_math/src/errors.rs | 4 +- .../src/rebalancing_incentive.rs | 46 ++++++++++++------- 2 files changed, 31 insertions(+), 19 deletions(-) diff --git a/packages/transmuter_math/src/errors.rs b/packages/transmuter_math/src/errors.rs index edd00ee..1b667a1 100644 --- a/packages/transmuter_math/src/errors.rs +++ b/packages/transmuter_math/src/errors.rs @@ -15,8 +15,8 @@ pub enum TransmuterMathError { #[error("Missing data points to calculate moving average")] MissingDataPoints, - #[error("Value is not normalized: {var_name}")] - NotNormalized { var_name: String }, + #[error("`{var_name}` must be within normalized range [0, 1]")] + OutOfNormalizedRange { var_name: String }, #[error("{0}")] DecimalRangeExceeded(#[from] DecimalRangeExceeded), diff --git a/packages/transmuter_math/src/rebalancing_incentive.rs b/packages/transmuter_math/src/rebalancing_incentive.rs index e01d273..a970f28 100644 --- a/packages/transmuter_math/src/rebalancing_incentive.rs +++ b/packages/transmuter_math/src/rebalancing_incentive.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{Decimal, Decimal256, SignedDecimal256, Uint128}; +use cosmwasm_std::{ensure, Decimal, Decimal256, SignedDecimal256, Uint128}; use crate::TransmuterMathError; @@ -74,7 +74,17 @@ impl ImpactFactorParamGroup { ideal_balance_upper_bound: Decimal, upper_limit: Decimal, ) -> Self { - // TODO: restrict this + // // Check if the input parameters are within the valid range [0, 1] + // if ideal_balance_lower_bound <= Decimal::one() { + // panic!("ideal_balance_lower_bound must be between 0 and 1"); + // } + // if ideal_balance_upper_bound <= Decimal::one() { + // panic!("ideal_balance_upper_bound must be between 0 and 1"); + // } + // if upper_limit <= Decimal::one() { + // panic!("upper_limit must be between 0 and 1"); + // } + Self { prev_normalized_balance, update_normalized_balance, @@ -171,17 +181,19 @@ pub fn calculate_rebalancing_fee( impact_factor: Decimal, amount_in: Uint128, ) -> Result { - if lambda > Decimal::one() { - return Err(TransmuterMathError::NotNormalized { + ensure!( + lambda <= Decimal::one(), + TransmuterMathError::OutOfNormalizedRange { var_name: "lambda".to_string(), - }); - } + } + ); - if impact_factor > Decimal::one() { - return Err(TransmuterMathError::NotNormalized { + ensure!( + impact_factor <= Decimal::one(), + TransmuterMathError::OutOfNormalizedRange { var_name: "impact_factor".to_string(), - }); - } + } + ); let lambda = Decimal256::from(lambda); let impact_factor = Decimal256::from(impact_factor); @@ -224,7 +236,7 @@ pub fn calculate_rebalancing_incentive( incentive_pool: Uint128, ) -> Result { if impact > Decimal::one() { - return Err(TransmuterMathError::NotNormalized { + return Err(TransmuterMathError::OutOfNormalizedRange { var_name: "impact".to_string(), }); } @@ -273,13 +285,13 @@ mod tests { Decimal::percent(101), Decimal::percent(100), Uint128::MAX, - Err(TransmuterMathError::NotNormalized { var_name: "lambda".to_string() }) + Err(TransmuterMathError::OutOfNormalizedRange { var_name: "lambda".to_string() }) )] #[case( Decimal::percent(100), Decimal::percent(101), Uint128::MAX, - Err(TransmuterMathError::NotNormalized { var_name: "impact_factor".to_string() }) + Err(TransmuterMathError::OutOfNormalizedRange { var_name: "impact_factor".to_string() }) )] fn test_calculate_rebalancing_fee( #[case] lambda: Decimal, @@ -332,7 +344,7 @@ mod tests { #[case(Decimal::one(), Uint128::zero(), Ok(Decimal256::zero()))] #[case(Decimal::percent(50), Uint128::new(1000), Ok(Decimal256::from_str("0.499750124937531234").unwrap()))] #[case(Decimal::percent(100), Uint128::new(1000), Ok(Decimal256::from_str("0.999000999000999").unwrap()))] - #[case(Decimal::percent(101), Uint128::new(1000), Err(TransmuterMathError::NotNormalized { var_name: "impact".to_string() }))] + #[case(Decimal::percent(101), Uint128::new(1000), Err(TransmuterMathError::OutOfNormalizedRange { var_name: "impact".to_string() }))] fn test_calculate_rebalancing_incentive( #[case] impact: Decimal, #[case] incentive_pool: Uint128, @@ -463,7 +475,7 @@ mod tests { } #[test] - fn test_calculate_impact_factor_component_with_normalized_balance_in_ideal_balance_bound_must_be_zero( + fn test_impact_factor_zero_within_ideal_bounds( normalized_balance in 0u128..=ONE_DEC_RAW, ideal_balance_lower_bound_from_normalized_balance in 0u128..=ONE_DEC_RAW, ideal_balance_upper_bound_from_normalized_balance in 0u128..=ONE_DEC_RAW, @@ -483,7 +495,7 @@ mod tests { } #[test] - fn test_calculate_impact_factor_component_with_normalized_balance_decreasing_while_less_than_ideal_balance_lower_bound_must_be_increasing( + fn test_impact_factor_increases_as_balance_decreases_below_lower_bound( normalized_balance in 1u128..=ONE_DEC_RAW, ideal_balance_lower_bound in 0u128..=ONE_DEC_RAW, ) { @@ -516,7 +528,7 @@ mod tests { } #[test] - fn test_calculate_impact_factor_component_with_normalized_balance_increasing_while_greater_than_ideal_balance_upper_bound_must_be_increasing( + fn test_impact_factor_increases_above_upper_bound( normalized_balance in 0u128..=ONE_DEC_RAW-1, ideal_balance_upper_bound in 0u128..=ONE_DEC_RAW, upper_limit in 0u128..=ONE_DEC_RAW, From 7a3d61d2ef0fddeaf4ba1cf05ef46110119fadb1 Mon Sep 17 00:00:00 2001 From: Supanat Potiwarakorn Date: Mon, 16 Sep 2024 10:16:52 +0700 Subject: [PATCH 09/13] restrict new on impact factor param group --- packages/transmuter_math/src/errors.rs | 3 + .../src/rebalancing_incentive.rs | 109 +++++++++++++++--- 2 files changed, 97 insertions(+), 15 deletions(-) diff --git a/packages/transmuter_math/src/errors.rs b/packages/transmuter_math/src/errors.rs index 1b667a1..10c5d1d 100644 --- a/packages/transmuter_math/src/errors.rs +++ b/packages/transmuter_math/src/errors.rs @@ -18,6 +18,9 @@ pub enum TransmuterMathError { #[error("`{var_name}` must be within normalized range [0, 1]")] OutOfNormalizedRange { var_name: String }, + #[error("Normalized balance exceeds upper limit")] + NormalizedBalanceExceedsUpperLimit, + #[error("{0}")] DecimalRangeExceeded(#[from] DecimalRangeExceeded), diff --git a/packages/transmuter_math/src/rebalancing_incentive.rs b/packages/transmuter_math/src/rebalancing_incentive.rs index a970f28..7a0de1c 100644 --- a/packages/transmuter_math/src/rebalancing_incentive.rs +++ b/packages/transmuter_math/src/rebalancing_incentive.rs @@ -58,6 +58,7 @@ pub fn calculate_cumulative_impact_factor_component( Ok(cumulative) } +#[derive(Debug, PartialEq, Eq)] pub struct ImpactFactorParamGroup { prev_normalized_balance: Decimal, update_normalized_balance: Decimal, @@ -73,25 +74,45 @@ impl ImpactFactorParamGroup { ideal_balance_lower_bound: Decimal, ideal_balance_upper_bound: Decimal, upper_limit: Decimal, - ) -> Self { - // // Check if the input parameters are within the valid range [0, 1] - // if ideal_balance_lower_bound <= Decimal::one() { - // panic!("ideal_balance_lower_bound must be between 0 and 1"); - // } - // if ideal_balance_upper_bound <= Decimal::one() { - // panic!("ideal_balance_upper_bound must be between 0 and 1"); - // } - // if upper_limit <= Decimal::one() { - // panic!("upper_limit must be between 0 and 1"); - // } - - Self { + ) -> Result { + // Check if the input parameters are within the valid range [0, 1] + ensure!( + ideal_balance_lower_bound <= Decimal::one(), + TransmuterMathError::OutOfNormalizedRange { + var_name: "ideal_balance_lower_bound".to_string() + } + ); + ensure!( + ideal_balance_upper_bound <= Decimal::one(), + TransmuterMathError::OutOfNormalizedRange { + var_name: "ideal_balance_upper_bound".to_string() + } + ); + ensure!( + upper_limit <= Decimal::one(), + TransmuterMathError::OutOfNormalizedRange { + var_name: "upper_limit".to_string() + } + ); + + // Check if the normalized balance exceeds the upper limit + ensure!( + prev_normalized_balance <= upper_limit, + TransmuterMathError::NormalizedBalanceExceedsUpperLimit + ); + + ensure!( + update_normalized_balance <= upper_limit, + TransmuterMathError::NormalizedBalanceExceedsUpperLimit + ); + + Ok(Self { prev_normalized_balance, update_normalized_balance, ideal_balance_lower_bound, ideal_balance_upper_bound, upper_limit, - } + }) } fn has_no_change_in_balance(&self) -> bool { @@ -561,8 +582,66 @@ mod tests { assert!(c1 < c2, "c1: {c1}, c2: {c2}"); } } + // - ImpactFactorParamGroup + #[rstest] + #[case::valid(Decimal::percent(50), Decimal::percent(60), Decimal::percent(40), Decimal::percent(50), Decimal::percent(60), Ok(ImpactFactorParamGroup{ + prev_normalized_balance, + update_normalized_balance, + ideal_balance_lower_bound, + ideal_balance_upper_bound, + upper_limit, + }))] + #[case::valid(Decimal::zero(), Decimal::percent(10), Decimal::percent(40), Decimal::percent(50), Decimal::percent(60), Ok(ImpactFactorParamGroup{ + prev_normalized_balance, + update_normalized_balance, + ideal_balance_lower_bound, + ideal_balance_upper_bound, + upper_limit, + }))] + #[case::valid(Decimal::percent(99), Decimal::percent(100), Decimal::percent(40), Decimal::percent(50), Decimal::one(), Ok(ImpactFactorParamGroup{ + prev_normalized_balance, + update_normalized_balance, + ideal_balance_lower_bound, + ideal_balance_upper_bound, + upper_limit, + }))] + #[case::invalid(Decimal::percent(50), Decimal::percent(60), Decimal::percent(40), Decimal::percent(50), Decimal::percent(110), Err(TransmuterMathError::OutOfNormalizedRange { var_name: "upper_limit".to_string() }))] + #[case::invalid(Decimal::percent(50), Decimal::percent(60), Decimal::percent(40), Decimal::percent(110), Decimal::percent(60), Err(TransmuterMathError::OutOfNormalizedRange { var_name: "ideal_balance_upper_bound".to_string() }))] + #[case::invalid(Decimal::percent(50), Decimal::percent(60), Decimal::percent(110), Decimal::percent(50), Decimal::percent(60), Err(TransmuterMathError::OutOfNormalizedRange { var_name: "ideal_balance_lower_bound".to_string() }))] + #[case::invalid( + Decimal::percent(110), + Decimal::percent(60), + Decimal::percent(40), + Decimal::percent(50), + Decimal::percent(60), + Err(TransmuterMathError::NormalizedBalanceExceedsUpperLimit) + )] + #[case::invalid( + Decimal::percent(50), + Decimal::percent(110), + Decimal::percent(40), + Decimal::percent(50), + Decimal::percent(60), + Err(TransmuterMathError::NormalizedBalanceExceedsUpperLimit) + )] + fn test_impact_factor_param_group_new( + #[case] prev_normalized_balance: Decimal, + #[case] update_normalized_balance: Decimal, + #[case] ideal_balance_lower_bound: Decimal, + #[case] ideal_balance_upper_bound: Decimal, + #[case] upper_limit: Decimal, + #[case] expected_result: Result, + ) { + let result = ImpactFactorParamGroup::new( + prev_normalized_balance, + update_normalized_balance, + ideal_balance_lower_bound, + ideal_balance_upper_bound, + upper_limit, + ); + assert_eq!(result, expected_result); + } // TODO: tests - // - ImpactFactorParamGroup // - calculate_impact_factor } From a32bb978c6ef24723f9470fbc0a8c214d7fca575 Mon Sep 17 00:00:00 2001 From: Supanat Potiwarakorn Date: Mon, 16 Sep 2024 10:21:24 +0700 Subject: [PATCH 10/13] test has no change in balance --- .../src/rebalancing_incentive.rs | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/packages/transmuter_math/src/rebalancing_incentive.rs b/packages/transmuter_math/src/rebalancing_incentive.rs index 7a0de1c..735fdb3 100644 --- a/packages/transmuter_math/src/rebalancing_incentive.rs +++ b/packages/transmuter_math/src/rebalancing_incentive.rs @@ -642,6 +642,44 @@ mod tests { assert_eq!(result, expected_result); } + proptest! { + #[test] + fn test_has_no_change_in_balance( + normalized_balance in 0..=ONE_DEC_RAW, + update_normalized_balance in 0..=ONE_DEC_RAW, + ) { + prop_assume!(normalized_balance != update_normalized_balance); + let normalized_balance = Decimal::raw(normalized_balance); + let update_normalized_balance = Decimal::raw(update_normalized_balance); + + // all bounds are set to 100% as it's unrelevant to the test + let ideal_balance_lower_bound = Decimal::percent(100); + let ideal_balance_upper_bound = Decimal::percent(100); + let upper_limit = Decimal::percent(100); + + + if let Ok(group) = ImpactFactorParamGroup::new( + normalized_balance, + normalized_balance, + ideal_balance_lower_bound, + ideal_balance_upper_bound, + upper_limit, + ) { + assert!(group.has_no_change_in_balance()); + } + + if let Ok(group) = ImpactFactorParamGroup::new( + normalized_balance, + update_normalized_balance, + ideal_balance_lower_bound, + ideal_balance_upper_bound, + upper_limit, + ) { + assert!(!group.has_no_change_in_balance()); + } + } + } + // TODO: tests // - calculate_impact_factor } From f3387ec8fba13e93de054f2aa8c558582b62e668 Mon Sep 17 00:00:00 2001 From: Supanat Potiwarakorn Date: Mon, 16 Sep 2024 11:09:53 +0700 Subject: [PATCH 11/13] test calculate impact factor component --- .../src/rebalancing_incentive.rs | 81 ++++++++++++++++++- 1 file changed, 78 insertions(+), 3 deletions(-) diff --git a/packages/transmuter_math/src/rebalancing_incentive.rs b/packages/transmuter_math/src/rebalancing_incentive.rs index 735fdb3..3c973d2 100644 --- a/packages/transmuter_math/src/rebalancing_incentive.rs +++ b/packages/transmuter_math/src/rebalancing_incentive.rs @@ -453,7 +453,7 @@ mod tests { Decimal::percent(50), Ok(Decimal::zero()) )] - fn test_calculate_impact_factor_component( + fn test_calculate_cumulative_impact_factor_component( #[case] normalized_balance: Decimal, #[case] ideal_balance_lower_bound: Decimal, #[case] ideal_balance_upper_bound: Decimal, @@ -680,6 +680,81 @@ mod tests { } } - // TODO: tests - // - calculate_impact_factor + #[rstest] + #[case::no_change_in_balance( + Decimal::percent(50), + Decimal::percent(50), + Decimal::percent(40), + Decimal::percent(60), + Decimal::one(), + Ok(SignedDecimal256::zero()) + )] + #[case::move_within_ideal_range( + Decimal::percent(45), + Decimal::percent(55), + Decimal::percent(40), + Decimal::percent(60), + Decimal::one(), + Ok(SignedDecimal256::zero()) + )] + #[case::move_away_from_ideal_range( + Decimal::percent(55), + Decimal::percent(65), + Decimal::percent(40), + Decimal::percent(60), + Decimal::one(), + Ok(SignedDecimal256::from_str("0.015625").unwrap()) + )] + #[case::move_towards_ideal_range( + Decimal::percent(55), + Decimal::percent(45), + Decimal::percent(40), + Decimal::percent(50), + Decimal::one(), + Ok(SignedDecimal256::from_str("-0.01").unwrap()) + )] + #[case::cross_ideal_range_negative( + Decimal::percent(30), + Decimal::percent(65), + Decimal::percent(40), + Decimal::percent(60), + Decimal::one(), + Ok(SignedDecimal256::from_str("-0.046875").unwrap()) + )] + #[case::cross_ideal_range_positive( + Decimal::percent(70), + Decimal::percent(25), + Decimal::percent(40), + Decimal::percent(60), + Decimal::one(), + Ok(SignedDecimal256::from_str("0.078125").unwrap()) + )] + // #[case::precision_issue( + // Decimal::from_str("0.600000000000000001").unwrap(), + // Decimal::from_str("0.600000000000000002").unwrap(), + // Decimal::percent(40), + // Decimal::percent(60), + // Decimal::one(), + // Ok(SignedDecimal256::from_str("-0.000000000000000001").unwrap()) + // )] + fn test_calculate_impact_factor_component( + #[case] prev_normalized_balance: Decimal, + #[case] update_normalized_balance: Decimal, + #[case] ideal_balance_lower_bound: Decimal, + #[case] ideal_balance_upper_bound: Decimal, + #[case] upper_limit: Decimal, + #[case] expected: Result, + ) { + let group = ImpactFactorParamGroup::new( + prev_normalized_balance, + update_normalized_balance, + ideal_balance_lower_bound, + ideal_balance_upper_bound, + upper_limit, + ) + .unwrap(); + + let result = group.calculate_impact_factor_component(); + assert_eq!(result, expected); + } } From 3d69b058c7d47bf9cfe0a289900238224c61258b Mon Sep 17 00:00:00 2001 From: Supanat Potiwarakorn Date: Mon, 16 Sep 2024 17:39:00 +0700 Subject: [PATCH 12/13] resolve precision loss issue --- .../src/rebalancing_incentive.rs | 94 ++++++++++++++----- 1 file changed, 68 insertions(+), 26 deletions(-) diff --git a/packages/transmuter_math/src/rebalancing_incentive.rs b/packages/transmuter_math/src/rebalancing_incentive.rs index 3c973d2..5ea2bdf 100644 --- a/packages/transmuter_math/src/rebalancing_incentive.rs +++ b/packages/transmuter_math/src/rebalancing_incentive.rs @@ -2,6 +2,9 @@ use cosmwasm_std::{ensure, Decimal, Decimal256, SignedDecimal256, Uint128}; use crate::TransmuterMathError; + + + /// Calculating impact factor component /// /// Considering change of balance of asset $i$, fee/incentive impact factor component $\gamma_i$ is @@ -24,7 +27,9 @@ use crate::TransmuterMathError; /// \left(\frac{b - \phi_u}{\delta - \phi_u}\right)^2 & \text{if } \phi_u \lt b \leq \delta /// \end{cases} /// $$ -pub fn calculate_cumulative_impact_factor_component( +/// +/// This function returns √C(b) to delay precision loss handling +pub fn calculate_sqrt_cumulative_impact_factor_component( normalized_balance: Decimal, ideal_balance_lower_bound: Decimal, ideal_balance_upper_bound: Decimal, @@ -41,7 +46,6 @@ pub fn calculate_cumulative_impact_factor_component( ideal_balance_lower_bound // phi_l .checked_sub(normalized_balance)? // - b .checked_div(ideal_balance_lower_bound)? // / phi_l - .checked_pow(2)? // ^2 } else if normalized_balance > ideal_balance_upper_bound { normalized_balance // b .checked_sub(ideal_balance_upper_bound)? // - phi_u @@ -49,7 +53,6 @@ pub fn calculate_cumulative_impact_factor_component( // delta - phi_u = 0 then delta = phi_u // since b > delta is restricted by limiter, and delta <= phi_u, this will never happen .checked_div(upper_limit.checked_sub(ideal_balance_upper_bound)?)? // / delta - phi_u - .checked_pow(2)? // ^2 } else { // within ideal balance Decimal::zero() @@ -120,26 +123,39 @@ impl ImpactFactorParamGroup { } fn calculate_impact_factor_component(&self) -> Result { - // C(b) - let c_b = SignedDecimal256::from(calculate_cumulative_impact_factor_component( + // √C(b) + let sqrt_c_b = SignedDecimal256::from(calculate_sqrt_cumulative_impact_factor_component( self.prev_normalized_balance, self.ideal_balance_lower_bound, self.ideal_balance_upper_bound, self.upper_limit, )?); - // C(b') - let c_b_prime = SignedDecimal256::from(calculate_cumulative_impact_factor_component( + // √C(b') + let sqrt_c_b_prime = SignedDecimal256::from(calculate_sqrt_cumulative_impact_factor_component( self.update_normalized_balance, self.ideal_balance_lower_bound, self.ideal_balance_upper_bound, self.upper_limit, )?); + // \gamma_i = C(b') - C(b) - c_b_prime - .checked_sub(c_b) - .map_err(TransmuterMathError::OverflowError) + let c_b_prime = sqrt_c_b_prime.checked_pow(2)?; + let c_b = sqrt_c_b.checked_pow(2)?; + let gamma_i = c_b_prime.checked_sub(c_b)?; + + // gamma_i = 0 might be due to precision loss after squaring + // if C(b') - C(b) > 0 is counted as fee factor + // round to most precise positive number representable in SignedDecimal256 + // + // C(b') - C(b) < 0 case is not handled here, as it will be counted as incentive factor + // keep it as 0 to prevent overincentive + if gamma_i.is_zero() && sqrt_c_b_prime > sqrt_c_b { + return Ok(SignedDecimal256::raw(1)); + } + + Ok(gamma_i) } } @@ -460,12 +476,12 @@ mod tests { #[case] upper_limit: Decimal, #[case] expected: Result, ) { - let actual = calculate_cumulative_impact_factor_component( + let actual = calculate_sqrt_cumulative_impact_factor_component( normalized_balance, ideal_balance_lower_bound, ideal_balance_upper_bound, upper_limit, - ); + ).map(|x| x.pow(2)); assert_eq!(expected, actual); } @@ -484,7 +500,7 @@ mod tests { let ideal_balance_upper_bound = Decimal::raw(ideal_balance_upper_bound); let upper_limit = Decimal::raw(upper_limit); - match calculate_cumulative_impact_factor_component( + match calculate_sqrt_cumulative_impact_factor_component( normalized_balance, ideal_balance_lower_bound, ideal_balance_upper_bound, @@ -505,7 +521,7 @@ mod tests { let ideal_balance_lower_bound = Decimal::raw(normalized_balance.saturating_sub(ideal_balance_lower_bound_from_normalized_balance)); let normalized_balance = Decimal::raw(normalized_balance); let upper_limit = ideal_balance_upper_bound; - let actual = calculate_cumulative_impact_factor_component( + let actual = calculate_sqrt_cumulative_impact_factor_component( normalized_balance, ideal_balance_lower_bound, ideal_balance_upper_bound, @@ -531,14 +547,14 @@ mod tests { let upper_limit = Decimal::raw(upper_limit); let epsilon = Decimal::raw(1000u128); - let c1 = calculate_cumulative_impact_factor_component( + let c1 = calculate_sqrt_cumulative_impact_factor_component( normalized_balance - epsilon, ideal_balance_lower_bound, ideal_balance_upper_bound, upper_limit, ).unwrap(); - let c2 = calculate_cumulative_impact_factor_component( + let c2 = calculate_sqrt_cumulative_impact_factor_component( normalized_balance, ideal_balance_lower_bound, ideal_balance_upper_bound, @@ -565,14 +581,14 @@ mod tests { let upper_limit = Decimal::raw(upper_limit); let epsilon = Decimal::raw(1000u128); - let c1 = calculate_cumulative_impact_factor_component( + let c1 = calculate_sqrt_cumulative_impact_factor_component( normalized_balance - epsilon, ideal_balance_lower_bound, ideal_balance_upper_bound, upper_limit, ).unwrap(); - let c2 = calculate_cumulative_impact_factor_component( + let c2 = calculate_sqrt_cumulative_impact_factor_component( normalized_balance, ideal_balance_lower_bound, ideal_balance_upper_bound, @@ -729,14 +745,40 @@ mod tests { Decimal::one(), Ok(SignedDecimal256::from_str("0.078125").unwrap()) )] - // #[case::precision_issue( - // Decimal::from_str("0.600000000000000001").unwrap(), - // Decimal::from_str("0.600000000000000002").unwrap(), - // Decimal::percent(40), - // Decimal::percent(60), - // Decimal::one(), - // Ok(SignedDecimal256::from_str("-0.000000000000000001").unwrap()) - // )] + // precision loss for fee impact factor >> 0.000000000000000001 + #[case::precision_loss_positive_impact( + Decimal::from_str("0.600000000000000001").unwrap(), + Decimal::from_str("0.600000000000000002").unwrap(), + Decimal::percent(40), + Decimal::percent(60), + Decimal::one(), + Ok(SignedDecimal256::from_str("0.000000000000000001").unwrap()) + )] + #[case::precision_loss_positive_impact( + Decimal::from_str("0.499999999999999999").unwrap(), + Decimal::from_str("0.600000000000000001").unwrap(), + Decimal::percent(40), + Decimal::percent(60), + Decimal::one(), + Ok(SignedDecimal256::from_str("0.000000000000000001").unwrap()) + )] + // precision loss for incentive impact factor >> 0 + #[case::precision_loss_negative_impact( + Decimal::from_str("0.600000000000000002").unwrap(), + Decimal::from_str("0.600000000000000001").unwrap(), + Decimal::percent(40), + Decimal::percent(60), + Decimal::one(), + Ok(SignedDecimal256::zero()) + )] + #[case::precision_loss_negative_impact( + Decimal::from_str("0.600000000000000001").unwrap(), + Decimal::from_str("0.499999999999999999").unwrap(), + Decimal::percent(40), + Decimal::percent(60), + Decimal::one(), + Ok(SignedDecimal256::zero()) + )] fn test_calculate_impact_factor_component( #[case] prev_normalized_balance: Decimal, #[case] update_normalized_balance: Decimal, From d5fe090c7e57d73ff24e6b62a9dd6a175f763e2e Mon Sep 17 00:00:00 2001 From: Supanat Potiwarakorn Date: Thu, 19 Sep 2024 17:01:04 +0700 Subject: [PATCH 13/13] test calculate_impact_factor --- .../rebalancing_incentive.txt | 1 + .../src/rebalancing_incentive.rs | 263 ++++++++++++++---- 2 files changed, 217 insertions(+), 47 deletions(-) diff --git a/packages/transmuter_math/proptest-regressions/rebalancing_incentive.txt b/packages/transmuter_math/proptest-regressions/rebalancing_incentive.txt index 9b7f5a9..ca2d41f 100644 --- a/packages/transmuter_math/proptest-regressions/rebalancing_incentive.txt +++ b/packages/transmuter_math/proptest-regressions/rebalancing_incentive.txt @@ -10,3 +10,4 @@ cc 05667d509ee73bc4dc7059dabfd936ca1b83e0858079419ef4ec85d3134e545d # shrinks to cc b254ff7ece5fb165f9e4d53746fc7222427cff1d17afbcd15cb8e3b3a7282cfc # shrinks to normalized_balance = 0, ideal_balance_lower_bound = 1, ideal_balance_upper_bound = 0, upper_limit = 0 cc 6bbf8d95569b53ec005ed88b282ebcb88f2a327770cf267800b744274aeaf323 # shrinks to normalized_balance = 340640889074348996, ideal_balance_lower_bound = 340640889074348997, ideal_balance_upper_bound = 340640889074348998, upper_limit = 340640889074348998 cc 4c6ad67ab30e522b8de8314e2219263f2e0dff53070517988a192b64099320ee # shrinks to normalized_balance = 866170838754561023, ideal_balance_lower_bound = 0, ideal_balance_range = 0 +cc efe12946674c15ab9d9f273f5dba5da2b33de803bd00a3c5397935644bca7b99 # shrinks to prev_balance = 115660145667945757, update_balance = 481327951497769476, ideal_lower = 115660145667945758, ideal_upper = 115660145667945758, upper_limit = 481327951497769476 diff --git a/packages/transmuter_math/src/rebalancing_incentive.rs b/packages/transmuter_math/src/rebalancing_incentive.rs index 5ea2bdf..b63699b 100644 --- a/packages/transmuter_math/src/rebalancing_incentive.rs +++ b/packages/transmuter_math/src/rebalancing_incentive.rs @@ -2,8 +2,81 @@ use cosmwasm_std::{ensure, Decimal, Decimal256, SignedDecimal256, Uint128}; use crate::TransmuterMathError; +#[derive(Debug, PartialEq, Eq)] +pub enum ImpactFactor { + Incentive(Decimal256), + Fee(Decimal256), + None, +} +/// combine all the impact factor components +/// +/// $$ +/// f = \frac{\Vert\vec{\gamma}\Vert}{\sqrt{n}} +/// $$ +/// +/// That gives a normalized magnitude of the vector of $n$ dimension into $[0,1]$. +/// The reason why it needs to include all dimensions is because the case that swapping with alloyed asset, which will effect overall composition rather than just 2 assets. +pub fn calculate_impact_factor( + impact_factor_param_groups: &[ImpactFactorParamGroup], +) -> Result { + if impact_factor_param_groups.is_empty() { + return Ok(ImpactFactor::None); + } + + let mut cumulative_impact_factor_sqaure = Decimal256::zero(); + let mut impact_factor_component_sum = SignedDecimal256::zero(); + // accumulated impact_factor_component_square rounded to smallest possible Decimal256 + // when impact_factor_component is smaller then 10^-9 to prevent fee exploitation + let mut lost_rounded_impact_factor_component_square_sum = Decimal256::zero(); + + let n = Decimal256::from_atomics(impact_factor_param_groups.len() as u64, 0)?; + + for impact_factor_params in impact_factor_param_groups { + // optimiztion: if there is no change in balance, the result will be 0 anyway, accumulating 0 has no effect + if impact_factor_params.has_no_change_in_balance() { + continue; + } + + let impact_factor_component = impact_factor_params.calculate_impact_factor_component()?; + + // when impact_factor_component<= 10^-9, the result after squaring will be 0, then + // - if total is counted as incentive, there will be no incentive and it's fine + // since it's neglectible and will not overincentivize and drain incentive pool + // - if total is counted as fee, it could be exploited by + // making swap with small impact_factor_component over and over again to avoid being counted as fee + let impact_factor_component_dec = impact_factor_component.abs_diff(SignedDecimal256::zero()); + if impact_factor_component_dec <= Decimal256::raw(1_000_000_000u128) { + lost_rounded_impact_factor_component_square_sum = lost_rounded_impact_factor_component_square_sum.checked_add(Decimal256::raw(1u128))?; + } + + let impact_factor_component_square = impact_factor_component_dec.checked_pow(2)?; + + impact_factor_component_sum = + impact_factor_component_sum.checked_add(impact_factor_component)?; + cumulative_impact_factor_sqaure = + cumulative_impact_factor_sqaure.checked_add(impact_factor_component_square)?; + } + + if impact_factor_component_sum.is_zero() { + Ok(ImpactFactor::None) + } else if impact_factor_component_sum.is_negative() { + Ok(ImpactFactor::Incentive( + cumulative_impact_factor_sqaure + .checked_div(n)? + .sqrt() + )) + } else { + // add back lost impact_factor_component_square_sum before normalizing + Ok(ImpactFactor::Fee( + cumulative_impact_factor_sqaure + .checked_add(lost_rounded_impact_factor_component_square_sum)? + .checked_div(n)? + .sqrt() + )) + } +} /// Calculating impact factor component /// @@ -159,53 +232,6 @@ impl ImpactFactorParamGroup { } } -pub enum PayoffType { - Incentive, - Fee, -} - -/// combine all the impact factor components -/// -/// $$ -/// f = \frac{\Vert\vec{\gamma}\Vert}{\sqrt{n}} -/// $$ -/// -/// That gives a normalized magnitude of the vector of $n$ dimension into $[0,1]$. -/// The reason why it needs to include all dimensions is because the case that swapping with alloyed asset, which will effect overall composition rather than just 2 assets. -pub fn calculate_impact_factor( - impact_factor_param_groups: &[ImpactFactorParamGroup], -) -> Result<(PayoffType, Decimal256), TransmuterMathError> { - let mut cumulative_impact_factor_sqaure = Decimal256::zero(); - let mut impact_factor_component_sum = SignedDecimal256::zero(); - - let n = Decimal256::from_atomics(impact_factor_param_groups.len() as u64, 0)?; - - for impact_factor_params in impact_factor_param_groups { - // optimiztion: if there is no change in balance, the result will be 0 anyway, accumulating 0 has no effect - if impact_factor_params.has_no_change_in_balance() { - continue; - } - - let impact_factor_component = impact_factor_params.calculate_impact_factor_component()?; - let impact_factor_component_square = - Decimal256::try_from(impact_factor_component.checked_pow(2)?)?; - - impact_factor_component_sum = - impact_factor_component_sum.checked_add(impact_factor_component)?; - cumulative_impact_factor_sqaure = - cumulative_impact_factor_sqaure.checked_add(impact_factor_component_square)?; - } - - let payoff_type = if impact_factor_component_sum.is_negative() { - PayoffType::Incentive - } else { - PayoffType::Fee - }; - - let impact_factor = cumulative_impact_factor_sqaure.checked_div(n)?.sqrt(); - - Ok((payoff_type, impact_factor)) -} /// Calculate the rebalancing fee /// @@ -799,4 +825,147 @@ mod tests { let result = group.calculate_impact_factor_component(); assert_eq!(result, expected); } + + #[rstest] + #[case::empty_input(Vec::new(), Ok(ImpactFactor::None))] + #[case::all_no_change( + vec![ + ImpactFactorParamGroup { + prev_normalized_balance: Decimal::percent(50), + update_normalized_balance: Decimal::percent(50), + ideal_balance_lower_bound: Decimal::percent(40), + ideal_balance_upper_bound: Decimal::percent(60), + upper_limit: Decimal::percent(100), + }, + ImpactFactorParamGroup { + prev_normalized_balance: Decimal::percent(70), + update_normalized_balance: Decimal::percent(70), + ideal_balance_lower_bound: Decimal::percent(40), + ideal_balance_upper_bound: Decimal::percent(60), + upper_limit: Decimal::percent(100), + } + ], + Ok(ImpactFactor::None) + )] + #[case::all_positive_resulted_in_fee( + vec![ + ImpactFactorParamGroup { + prev_normalized_balance: Decimal::percent(70), + update_normalized_balance: Decimal::percent(80), + ideal_balance_lower_bound: Decimal::percent(40), + ideal_balance_upper_bound: Decimal::percent(60), + upper_limit: Decimal::percent(100), + }, + ImpactFactorParamGroup { + prev_normalized_balance: Decimal::percent(65), + update_normalized_balance: Decimal::percent(75), + ideal_balance_lower_bound: Decimal::percent(40), + ideal_balance_upper_bound: Decimal::percent(60), + upper_limit: Decimal::percent(100), + }, + ], + Ok(ImpactFactor::Fee(Decimal256::from_str("0.159344359799774525").unwrap())) + )] + #[case::all_negative_resulted_in_incentive( + vec![ + ImpactFactorParamGroup { + prev_normalized_balance: Decimal::percent(70), + update_normalized_balance: Decimal::percent(60), + ideal_balance_lower_bound: Decimal::percent(40), + ideal_balance_upper_bound: Decimal::percent(60), + upper_limit: Decimal::percent(100), + }, + ImpactFactorParamGroup { + prev_normalized_balance: Decimal::percent(35), + update_normalized_balance: Decimal::percent(45), + ideal_balance_lower_bound: Decimal::percent(40), + ideal_balance_upper_bound: Decimal::percent(60), + upper_limit: Decimal::percent(100), + }, + ], + Ok(ImpactFactor::Incentive(Decimal256::from_str("0.045554311678478909").unwrap()))) + ] + #[case::mixed_positive_and_negative_resulted_in_fee( + vec![ + ImpactFactorParamGroup { + prev_normalized_balance: Decimal::percent(70), + update_normalized_balance: Decimal::percent(80), + ideal_balance_lower_bound: Decimal::percent(40), + ideal_balance_upper_bound: Decimal::percent(60), + upper_limit: Decimal::percent(100), + }, + ImpactFactorParamGroup { + prev_normalized_balance: Decimal::percent(35), + update_normalized_balance: Decimal::percent(45), + ideal_balance_lower_bound: Decimal::percent(40), + ideal_balance_upper_bound: Decimal::percent(60), + upper_limit: Decimal::percent(100), + }, + ], + Ok(ImpactFactor::Fee(Decimal256::from_str("0.133042080983800009").unwrap())) + )] + #[case::mixed_positive_and_negative_resulted_in_incentive( + vec![ + ImpactFactorParamGroup { + prev_normalized_balance: Decimal::percent(70), + update_normalized_balance: Decimal::percent(60), + ideal_balance_lower_bound: Decimal::percent(40), + ideal_balance_upper_bound: Decimal::percent(60), + upper_limit: Decimal::percent(100), + }, + ImpactFactorParamGroup { + prev_normalized_balance: Decimal::percent(35), + update_normalized_balance: Decimal::percent(30), + ideal_balance_lower_bound: Decimal::percent(40), + ideal_balance_upper_bound: Decimal::percent(60), + upper_limit: Decimal::percent(100), + }, + ], + Ok(ImpactFactor::Incentive(Decimal256::from_str("0.055242717280199025").unwrap())) + )] + #[case::loss_rounding_fee( + vec![ + ImpactFactorParamGroup { + prev_normalized_balance: Decimal::percent(60), + update_normalized_balance: Decimal::from_atomics(600_000_000_000_000_001u128, 18).unwrap(), + ideal_balance_lower_bound: Decimal::percent(40), + ideal_balance_upper_bound: Decimal::percent(60), + upper_limit: Decimal::percent(100), + }, + ImpactFactorParamGroup { + prev_normalized_balance: Decimal::percent(60), + update_normalized_balance: Decimal::from_atomics(600_000_000_000_000_001u128, 18).unwrap(), + ideal_balance_lower_bound: Decimal::percent(40), + ideal_balance_upper_bound: Decimal::percent(60), + upper_limit: Decimal::percent(100), + }, + ], + Ok(ImpactFactor::Fee(Decimal256::from_str("0.000000001").unwrap())) + )] + #[case::no_loss_rounding_incentive( + vec![ + ImpactFactorParamGroup { + prev_normalized_balance: Decimal::from_atomics(600_000_000_000_000_001u128, 18).unwrap(), + update_normalized_balance: Decimal::percent(60), + ideal_balance_lower_bound: Decimal::percent(40), + ideal_balance_upper_bound: Decimal::percent(60), + upper_limit: Decimal::percent(100), + }, + ImpactFactorParamGroup { + prev_normalized_balance: Decimal::from_atomics(600_000_000_000_000_001u128, 18).unwrap(), + update_normalized_balance: Decimal::percent(60), + ideal_balance_lower_bound: Decimal::percent(40), + ideal_balance_upper_bound: Decimal::percent(60), + upper_limit: Decimal::percent(100), + }, + ], + Ok(ImpactFactor::None) + )] + fn test_calculate_impact_factor( + #[case] input_param_groups: Vec, + #[case] expected: Result, + ) { + let result = calculate_impact_factor(&input_param_groups); + assert_eq!(result, expected); + } }