Skip to main content

RerouteStatsReport

Struct RerouteStatsReport 

Source
pub struct RerouteStatsReport {
Show 17 fields pub swaps_detected: u64, pub swaps_filtered: u64, pub swaps_rerouted: u64, pub swaps_simulated: u64, pub swaps_succeeded: u64, pub requote_failures: u64, pub override_setup_failures: u64, pub metis_unavailable_blocks: u64, pub quote_attempts_unavailable: u64, pub direct_fill_matched: u64, pub direct_fill_outcomes: BTreeMap<String, u64>, pub direct_fill_scored: u64, pub direct_fill_bps_total: i64, pub direct_fill_templates: BTreeMap<String, DirectFillTemplateReport>, pub originals_scored: u64, pub originals_bps_total: i64, pub originals_replayed: u64,
}
Expand description

High-level funnel for a reroute-order-flow session: how many detected swaps made it from re-quoting through simulation to a non-reverting execution, and — for a run carrying a DirectFillTemplate list — how many hops each template priced. Per-swap economics and latency are session-internal and land in the analysis DB.

Fields§

§swaps_detected: u64

Requotable swaps detected in the replayed range, across the admitted aggregators.

§swaps_filtered: u64

Detected swaps excluded before quoting — an unadmitted aggregator, an arbitrage cycle, a mint pair the filter does not name. Without it the gap between swaps_detected and swaps_rerouted reads as routing failures.

§swaps_rerouted: u64

Swaps re-quoted through metis and queued for simulation.

§swaps_simulated: u64

Swaps whose routed transaction was simulated.

§swaps_succeeded: u64

Simulated swaps whose routed transaction executed without reverting.

§requote_failures: u64

Detected swaps metis could not route; nothing was simulated for them.

§override_setup_failures: u64

Computed override actions that failed and therefore contributed no state.

§metis_unavailable_blocks: u64

Blocks replayed unchanged because the metis client was unavailable.

§quote_attempts_unavailable: u64

Quote attempts that could not be made because the metis client was unavailable, summed over every swap left queued by each such block. Each one is retried on the next block, so this counts retries forced rather than swaps lost.

§direct_fill_matched: u64

Hops a template matched, summed over Self::direct_fill_templates. A hop two templates match counts twice. Zero when no template was configured.

§direct_fill_outcomes: BTreeMap<String, u64>

Probes by outcome, summed over the templates — filled, reverted_*, unattributed (ran clean, but the seeded account was gone or unreadable), unsimulatable (could not be compiled or run). Every matched hop lands in exactly one bucket.

§direct_fill_scored: u64

Probes scored against the hop they replace, summed over the templates.

§direct_fill_bps_total: i64

Sum of each scored probe’s change against its L1 fill in basis points, over direct_fill_scored — divide by that count for the mean. Positive always means the template beat the hop, whichever amount the mode fixed.

§direct_fill_templates: BTreeMap<String, DirectFillTemplateReport>

The same four counters per template, keyed by label. A template that never matched is present with zeros.

§originals_scored: u64

Original swaps scored against their own L1 fill at quote time.

§originals_bps_total: i64

Sum of (quote time fill - L1 fill) / L1 fill in basis points over originals_scored swaps — divide by that count for the mean.

§originals_replayed: u64

Originals replayed at the position their replacements were priced at.

Trait Implementations§

Source§

impl Clone for RerouteStatsReport

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RerouteStatsReport

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RerouteStatsReport

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for RerouteStatsReport

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for RerouteStatsReport

Source§

impl PartialEq for RerouteStatsReport

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for RerouteStatsReport

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for RerouteStatsReport

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V