pub struct RangeReport {}Expand description
How the reroutes did against the original swaps, for one range or a cross-range aggregate. Dollar figures are USD; volumes are the original swaps’ value.
Fields§
§n: u64Measured legs.
better: u64Legs where the reroute did better.
same: u64Legs where the reroute tied.
worse: u64Legs where the reroute did worse.
vol: f64Volume across measured legs.
net: f64Reroute minus original across measured legs; positive means the reroutes did better.
vol_better: f64Volume of the legs in Self::better.
vol_same: f64Volume of the legs in Self::same.
vol_worse: f64Volume of the legs in Self::worse.
bps: Vec<f64>Each measured leg’s change, in bps.
majors: SideTotalsLegs between two majors.
exotic: SideTotalsLegs with at least one non-major mint.
venues: BTreeMap<String, VenueTotals>By venue label; (unlabeled) collects hops without one.
Implementations§
Source§impl RangeReport
impl RangeReport
Sourcepub fn from_records(records: &[LegRecord], prices: &Prices) -> Self
pub fn from_records(records: &[LegRecord], prices: &Prices) -> Self
measure each record and total the results; records it cannot measure are skipped.
Sourcepub fn vw_bps(&self) -> f64
pub fn vw_bps(&self) -> f64
The volume-weighted change in bps, net / vol * 10_000; 0 when nothing was measured.
Sourcepub fn render(&self, name: &str) -> String
pub fn render(&self, name: &str) -> String
A Markdown section headed name: the summary lines, then the venue table without venues
under VENUE_DUST_USD on both sides.