pub struct RerouteParams {
pub venues: RerouteVenues,
pub filter: Option<RerouteFilter>,
pub detect_failed_l1_swaps: bool,
pub circular_arbs: bool,
}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§
§venues: RerouteVenues§filter: Option<RerouteFilter>Restrict re-quoting to the mint pairs of interest — a maker’s own book. Absent: every detected swap on an admitted venue 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.
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
impl Default for RerouteParams
Source§fn default() -> RerouteParams
fn default() -> RerouteParams
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