Skip to content

Commit

Permalink
Merge pull request #157 from propeller-heads/execution/tnl/slippage-log
Browse files Browse the repository at this point in the history
fix: 0.25% slippage check in quickstart
  • Loading branch information
tamaralipows authored Feb 27, 2025
2 parents 0799b51 + ec9994a commit 8dd982f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/quickstart/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -389,7 +390,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
Expand Down

0 comments on commit 8dd982f

Please sign in to comment.