diff --git a/ref-exchange/release_notes.md b/ref-exchange/release_notes.md index 0d03de0..78b14aa 100644 --- a/ref-exchange/release_notes.md +++ b/ref-exchange/release_notes.md @@ -1,7 +1,7 @@ # Release Notes ### Version 1.5.2 -1. Lower MIN_RESERVE to 1*10**16; +1. Lower MIN_RESERVE to 1*10**15; ### Version 1.5.1 1. Import rated stable pool; diff --git a/ref-exchange/src/stable_swap/mod.rs b/ref-exchange/src/stable_swap/mod.rs index 3581a5d..400a2da 100644 --- a/ref-exchange/src/stable_swap/mod.rs +++ b/ref-exchange/src/stable_swap/mod.rs @@ -16,7 +16,7 @@ mod math; pub const MIN_DECIMAL: u8 = 1; pub const MAX_DECIMAL: u8 = 24; pub const TARGET_DECIMAL: u8 = 18; -pub const MIN_RESERVE: u128 = 10_000_000_000_000_000; +pub const MIN_RESERVE: u128 = 1_000_000_000_000_000; #[derive(BorshSerialize, BorshDeserialize)] pub struct StableSwapPool { diff --git a/ref-exchange/tests/test_errors.rs b/ref-exchange/tests/test_errors.rs index c30197f..e952d6e 100644 --- a/ref-exchange/tests/test_errors.rs +++ b/ref-exchange/tests/test_errors.rs @@ -438,7 +438,7 @@ fn sim_stable_e69 () { let token1 = test_token(&root, dai(), vec![ex.account_id()]); let token2 = test_token(&root, usdt(), vec![ex.account_id()]); whitelist_token(&owner, &ex, vec![token1.valid_account_id(), token2.valid_account_id()]); - deposit_token(&root, &ex, vec![&token1, &token2], vec![101*ONE_DAI, 101*ONE_USDT]); + deposit_token(&root, &ex, vec![&token1, &token2], vec![101*ONE_DAI, 1001*ONE_USDT]); call!( owner, @@ -479,15 +479,28 @@ fn sim_stable_e69 () { deposit = 1 ) .assert_success(); - + call!( + root, + ex.swap( + vec![SwapAction { + pool_id: 0, + token_in: usdt(), + amount_in: Some(U128(99*ONE_USDT)), + token_out: dai(), + min_amount_out: U128(1) + }], + None + ), + deposit = 1 + ).assert_success(); let outcome = call!( root, ex.swap( vec![SwapAction { pool_id: 0, - token_in: dai(), - amount_in: Some(U128(99*ONE_DAI)), - token_out: usdt(), + token_in: usdt(), + amount_in: Some(U128(99*ONE_USDT)), + token_out: dai(), min_amount_out: U128(1) }], None diff --git a/ref-exchange/tests/test_fuzz_amm.rs b/ref-exchange/tests/test_fuzz_amm.rs index 6337ce1..99dc30d 100644 --- a/ref-exchange/tests/test_fuzz_amm.rs +++ b/ref-exchange/tests/test_fuzz_amm.rs @@ -56,6 +56,7 @@ fn generate_fuzzy_seed() -> Vec{ } #[test] +#[ignore] fn test_fuzzy_amm(){ let seeds = generate_fuzzy_seed(); diff --git a/ref-exchange/tests/test_fuzzy_stable.rs b/ref-exchange/tests/test_fuzzy_stable.rs index 4dd2e16..3193e11 100644 --- a/ref-exchange/tests/test_fuzzy_stable.rs +++ b/ref-exchange/tests/test_fuzzy_stable.rs @@ -47,6 +47,7 @@ fn generate_fuzzy_seed() -> Vec{ } #[test] +#[ignore] fn test_fuzzy_stable() { let seeds = generate_fuzzy_seed(); diff --git a/releases/ref_exchange_release.wasm b/releases/ref_exchange_release.wasm index e9f9259..ae4fa68 100755 Binary files a/releases/ref_exchange_release.wasm and b/releases/ref_exchange_release.wasm differ