Expand description
Reports over a set of reroute results, from any source.
- Input: one
LegRecordper rerouted swap. Map your source (areplacementSubscribestream, a session database) onto it. - Pricing:
Samplesgathered from the records give USDPrices, derived from the records alone. - Reports: one venue’s flow, onchain against rerouted (
Report); how the reroutes did against the original swaps (RangeReport); and venue probes by template (probes::ProbeReport).
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 rerouted route did against the historical one, as win/loss counts, volume-weighted bps, and the venues both sides routed through.
- probes
- Per-template accounting of venue probes. Probes have their own table
(
direct_fill_probes) and their own wire variant (ReplacementNotification::Venue), so their records arrive pre-selected; nothing here checks that, and router 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 rerouted swap. The three plans share one shape (
RoutePlan); a side that was not recorded isNone, never an empty plan. - Prices
- USD prices for one range, derived from the range’s own reroutes.
- Report
- One venue’s flow across a set of reroute results, onchain against rerouted, by trade direction.
- 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
- Pricing samples gathered from
LegRecords; turn them intoPriceswithSamples::prices. - 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).