pub struct RerouteParams {
pub aggregators: RerouteAggregators,
pub filter: Option<RerouteFilter>,
pub detect_failed_l1_swaps: bool,
pub circular_arbs: bool,
pub requote: bool,
pub direct_fill: Option<Box<DirectFillParams>>,
}Expand description
Re-quoting historical swaps through the metis router: each admitted swap is re-quoted and the routed transaction is simulated just before the original executes — never committed, so the replay is unaffected. Each simulation reads the state of the batch its original belonged to; reroutes never observe one another.
Presence is the switch, which makes “a knob but no rerouting” unrepresentable rather than a validation error.
Fields§
§aggregators: RerouteAggregators§filter: Option<RerouteFilter>Restrict re-quoting to the mint pairs of interest — a maker’s own book. Absent: every detected swap on an admitted aggregator is re-quoted.
detect_failed_l1_swaps: boolAlso re-quote swaps whose L1 transaction failed, when the allowlist admits the failure as one re-quoting can answer (a slippage rejection, or a failure after the swap already ran).
Off by default: L1 realised nothing for these, so every comparison against the original is
undefined and they are tracked as their own population — swaps_detected and
swaps_rerouted exclude them, and every row carries original_failed.
circular_arbs: boolAlso re-quote arbitrage cycles — swaps whose input and output mint are the same. Off by default: the router prices a cycle and then refuses to build the route it found.
requote: boolRe-quote detected swaps through the metis router.
On by default, and the only reason a session starts a sidecar. Turn it off to run
Self::direct_fill alone: pricing a venue metis cannot route needs no router, and
waiting on one would be waiting for something that can never answer.
direct_fill: Option<Box<DirectFillParams>>Price a candidate venue against the hops this run detects, alongside the re-quoting.
Boxed: absent on almost every session, and inline it is the largest thing in
BacktestRequest, which every request would then pay for.
Implementations§
Trait Implementations§
Source§impl Clone for RerouteParams
impl Clone for RerouteParams
Source§fn clone(&self) -> RerouteParams
fn clone(&self) -> RerouteParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RerouteParams
impl Debug for RerouteParams
Source§impl Default for RerouteParams
Hand-written rather than derived: requote defaults to ON, and a derived Default would
give the opposite of what deserializing an empty object gives.
impl Default for RerouteParams
Hand-written rather than derived: requote defaults to ON, and a derived Default would
give the opposite of what deserializing an empty object gives.
Source§impl<'de> Deserialize<'de> for RerouteParams
impl<'de> Deserialize<'de> for RerouteParams
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for RerouteParams
Source§impl PartialEq for RerouteParams
impl PartialEq for RerouteParams
Source§impl Serialize for RerouteParams
impl Serialize for RerouteParams
impl StructuralPartialEq for RerouteParams
Auto Trait Implementations§
impl Freeze for RerouteParams
impl RefUnwindSafe for RerouteParams
impl Send for RerouteParams
impl Sync for RerouteParams
impl Unpin for RerouteParams
impl UnsafeUnpin for RerouteParams
impl UnwindSafe for RerouteParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more