Liquidity looks like a number on a screen. Underneath, it is a negotiation between dozens of venues that disagree about price, sequence, and time. LIAW exists to resolve that disagreement without hiding it. Every normalized price we publish carries the lineage of the ticks that produced it — which venue, in what order, with what freshness.
The naive pipeline treats a feed as a firehose and the consumer as a bucket. That model breaks the moment two venues report the same instrument with a 200ms skew. You do not want the last tick; you want the correct tick, and you want to be able to prove which one it was an hour later when a desk asks why a fill looked off.
- VENUE FEEDSINGRESSWSS · FIX · REST
- // CORECORE_ENGINENORMALIZEDEDUPE · STAMP · TAG
- PROVENANCELEDGER_SYMMETRYHASH · FRESHNESS
Ingress is a fan-in, not a firehose
Each venue connection is a typed source. The ingress layer does not flatten them into an undifferentiated stream — it preserves source identity all the way to the core. A Binance trade and a Coinbase trade for the same pair are distinct events with distinct provenance, even after they collapse into one normalized price.
Normalization is where most of the engineering goes. Venues differ on symbol spelling, decimal precision, sequence semantics, and what they even mean by a "trade". The core engine reconciles all of it into one schema while keeping a back-pointer to the raw event. That back-pointer is the provenance record.
A price without its lineage is a rumor. A price with its lineage is a measurement. We ship measurements.
The ledger is the contract
Once normalized, every price is stamped into the provenance ledger before it is allowed to leave the building. The stamp records the contributing sources, the freshness of each, and a content hash. This is what lets a consumer ask not just what the price is, but why — and get a deterministic answer.
Here is the shape of that stamping step in the core. It is deliberately boring: provenance code should be the most predictable thing in the system.
impl Engine {
/// Stamp a normalized price with its source lineage before publish.
pub fn init_provenance(&self, price: &NormalizedPrice) -> Provenance {
let sources: Vec<SourceRef> = price
.contributions
.iter()
.map(|c| SourceRef {
venue: c.venue,
seq: c.sequence,
freshness_ms: c.observed_at.elapsed_ms(),
})
.collect();
Provenance {
instrument: price.instrument.clone(),
sources,
hash: self.ledger.content_hash(price),
stamped_at: Clock::now(),
}
}
}The result is a feed where freshness, source health, and venue origin are first-class fields, not afterthoughts. That is the whole product in one sentence: liquidity awareness for every market, with the receipts attached.