Run the complete notebook
Open the executed notebook for multi-cohort summaries and the full quote-level
and price-impact visualization.
Set up the notebook
Clone the example repository, install itsuv environment, and start
JupyterLab:
Discover and fetch each source
Query up to the first hour of each source’s accessible interval. Keep every source in the coverage table so an empty short window is not confused with an unsupported schema.allow_gaps=True permits a partial preview interval. Preserve the reported
window and hit_cap value with any result.
Select a comparable directed pair
Flatten the event metadata without expanding the quote arrays. Keep Metric pools separate because two pools can produce different curves for the same token pair.token_in -> token_out
quote cannot be compared directly with the reverse direction.
Align one representative cohort
Use the least frequently observed participant as the cohort anchor. Search its observations from newest to oldest, then choose the nearest complete group that fits within both the 12-block and two-minute limits.Compare exact shared input sizes
Normalize onchain integer amounts withDecimal. Compare only input amounts
present in every ladder, and choose the first shared amount at or above 0.01
as each participant’s curve baseline.
quote_edge_bps value of zero identifies the best
observed output in the cohort; negative values trail that output. A negative
curve_impact_bps value means a participant returned less output per input
than it did at the common baseline size.
The probe table describes the range that Polaris observed. Do not interpret
recorded_max_probe as executable capacity.
Extend the comparison
The complete notebook repeats this alignment across every valid cohort. It reports quote-point win rate, median and lower-tail quote edge, median and worst curve impact, and plots average rate, quote edge, and curve impact across the latest cohort. When you extend the workflow, keep these controls explicit:- Compare the same
chain_id, directed token pair, and exact normalized input amount. - Keep source and pool identity separate.
- Record block and observation-time skew for every cohort.
- Keep
Decimalvalues through calculations and convert only for presentation. - Treat empty sources, capped queries, and incomplete cohorts as coverage results rather than silently dropping them.
- Treat the dynamically selected public sample as a workflow example, not a persistent ranking of PropAMMs.
Related documentation
- PropAMMs for source discovery, quote-ladder identity, and single-source analysis
- PropAMM Quote Ladders for the complete method signature and event fields
- Catalog for current source, coverage, and access metadata
- Event envelope for collector timestamps and stored ordering
- Jupyter Notebook for notebook setup and the curated example index