Expand description
The source-agnostic reroute-report core: one row in (LegRecord), the pricing derived
from a stream of them (Samples / Prices), and the three reports built over both — the
venue-flow one (Report), the benchmark (RangeReport), and the per-template direct-fill
probe breakdown (probes::ProbeReport). Adapters map their own source onto LegRecord;
nothing here does I/O.
Re-exports§
pub use benchmark::LoadStats;pub use benchmark::Measurement;pub use benchmark::OUTLIER_BPS;pub use benchmark::RangeReport;pub use benchmark::SideTotals;pub use benchmark::VENUE_DUST_USD;pub use benchmark::VenueTotals;
Modules§
- benchmark
- The reroute benchmark: how each re-quoted route did against the one L1 landed, as win/loss counts, volume-weighted bps, and the venues both sides routed through.
- probes
- Per-template accounting of direct-fill probes. Probes have their own table
(
direct_fill_probes) and their own wire variant (ReplacementNotification::DirectFill), so a population arrives pre-selected; nothing here checks that, and metis rows fed in still render as a plausible-looking probe table.
Structs§
- Direction
- One trade direction’s before and after.
- Flow
- What crossed the venue in one trade direction, on one side of the comparison.
- LegRecord
- One re-quoted swap. The three plans share one shape (
RoutePlan); a side that was not recorded isNone, never an empty plan. - Prices
- Per-range prices, derived from the range’s own reroutes.
- Report
- What a stream said about one venue.
- Report
Builder - Accumulates a
Reportone record at a time, holding pricing samples, one accumulator per trade direction, and the venue labels seen — never the records. - Samples
- Retained until the range ends, because a median cannot be folded. Two mints and two amounts against a notification’s multi-KB route plans, which is what lets a report skip the stream.
- Target
- The venue under test, as the two sides can each name it.
Enums§
- Reroute
Report Error - The selector named a venue the stream never carried — a wrong address or a misspelling.
Reporting that as
$0would be indistinguishable from a venue with no flow. - Swap
Mode - Whether the swap fixes the input amount (
ExactIn) or the output amount (ExactOut).
Type Aliases§
- Pair
- A trade direction, keyed by the mints it moves between as
(input, output).