Skip to content

Commit

Permalink
log mispriced limit order IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
sistemd committed Nov 10, 2022
1 parent 72389b6 commit af9eff2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/autopilot/src/solvable_orders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,12 @@ impl SolvableOrdersCache {
let buy_native = order.data.buy_amount * prices.get(&order.data.buy_token).unwrap();
let sell_native = u256_to_big_decimal(&sell_native);
let buy_native = u256_to_big_decimal(&buy_native);
sell_native >= buy_native * self.limit_order_price_factor.clone()
if sell_native >= buy_native * self.limit_order_price_factor.clone() {
true
} else {
tracing::debug!(order_uid = %order.metadata.uid, "limit order is outside market price, skipping");
false
}
});
orders
}
Expand Down

0 comments on commit af9eff2

Please sign in to comment.