From 3aedb2f874aafd93b54ecddc71585e487b2925f9 Mon Sep 17 00:00:00 2001 From: TAMARA LIPOWSKI Date: Thu, 27 Feb 2025 15:30:14 -0500 Subject: [PATCH 1/2] fix: 0.25% slippage check in quickstart 1% is too high --- examples/quickstart/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/quickstart/main.rs b/examples/quickstart/main.rs index 34c3603f..35cdb3b4 100644 --- a/examples/quickstart/main.rs +++ b/examples/quickstart/main.rs @@ -389,7 +389,7 @@ fn encode( given_token: sell_token.address, given_amount: sell_amount, checked_token: buy_token.address, - slippage: Some(0.01), // 1% slippage + slippage: Some(0.0025), // 0.25% slippage expected_amount: Some(expected_amount), exact_out: false, // it's an exact in solution checked_amount: None, // the amount out will not be checked in execution From ec9994aa5bb2ef6ef6ff90d5a351b2c2f3dee9b6 Mon Sep 17 00:00:00 2001 From: TAMARA LIPOWSKI Date: Thu, 27 Feb 2025 15:32:11 -0500 Subject: [PATCH 2/2] chore: slippage warning log --- examples/quickstart/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/quickstart/main.rs b/examples/quickstart/main.rs index 35cdb3b4..68d4af1a 100644 --- a/examples/quickstart/main.rs +++ b/examples/quickstart/main.rs @@ -194,6 +194,7 @@ async fn main() { } println!("Do you want to simulate, execute or skip this swap?"); println!("Please be aware that the market might move while you make your decision, which might lead to a revert if you've set a min amount out or slippage."); + println!("Warning: slippage is set to 0.25% during execution by default."); print!("(simulate/execute/skip): "); io::stdout().flush().unwrap(); let mut input = String::new();