Background
The autopilot currently does not store fee policies for each order which is proposed for execution by solvers. This makes it difficult to exactly replicate the filtering and winner selection logic. Storing all fee policies for orders with at least one solution would resolve this.
Details
The post processing of auctions involves a step where fee policies are stored.
|
let fee_policies: Vec<_> = ranking |
|
.ranked() |
|
.flat_map(|bid| bid.solution().order_ids()) |
|
.unique() |
|
.filter_map(|order_id| match order_lookup.get(order_id) { |
|
Some(auction_order) => { |
|
Some((auction_order.uid, auction_order.protocol_fees.clone())) |
|
} |
|
None => { |
|
tracing::debug!(?order_id, "order not found in auction"); |
|
None |
|
} |
|
}) |
|
.collect(); |
The code restricts to orders in ranked solutions, i.e. solutions which were not filtered out. I think that changing the implementation to use all() instead of ranked() could resolve this problem. This would make it consistent with how solutions themselves are stored.
Acceptance criteria
Background
The autopilot currently does not store fee policies for each order which is proposed for execution by solvers. This makes it difficult to exactly replicate the filtering and winner selection logic. Storing all fee policies for orders with at least one solution would resolve this.
Details
The post processing of auctions involves a step where fee policies are stored.
services/crates/autopilot/src/run_loop.rs
Lines 552 to 565 in 72d5cf4
The code restricts to orders in ranked solutions, i.e. solutions which were not filtered out. I think that changing the implementation to use
all()instead ofranked()could resolve this problem. This would make it consistent with how solutions themselves are stored.Acceptance criteria