Metric Docs | Freshness & Ordering
Learn how Metric treats quote freshness and update ordering so pools can reject stale information before swaps are executed.
Learn how Metric treats quote freshness and update ordering so pools can reject stale information before swaps are executed.
Metric is built around Active Pools: liquidity pools that use a Price Provider to supply bid, ask and reference prices instead of relying only on reserve ratios. This page focuses on Freshness & Ordering and the practical checks that matter when using or integrating the protocol.
Freshness
A quote is only useful while it reflects the market state it claims to represent. Freshness rules should reject data that is older than the pool’s acceptable window.
Ordering
Updates need a deterministic ordering rule so an older update cannot silently overwrite a newer valid state. Sequence numbers, timestamps or source-specific ordering can enforce this property.
Operational checks
| Check | Failure to avoid |
|---|---|
| Timestamp/sequence monotonicity | Replaying an older quote |
| Chain time assumptions | Comparing incompatible clocks |
| Update authorization | Untrusted writer changing price state |
| Reorg handling | Reading state that later changes |
Related Metric Docs
Last updated