Skip to main content
Use this workflow to compare size-dependent quotes from multiple proprietary automated market makers. You will discover available sources, select a directed token pair shared by the largest number of sources, align one representative cohort, and compare quotes at exact common input sizes.

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 its uv environment, and start JupyterLab:
The workflow uses the no-key preview interval reported by Catalog. Start with the imports, comparison limits, and bounded-query helpers:

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 direction is part of the comparison identity. A 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.
The offsets make observation skew visible. They do not make the quotes simultaneous.

Compare exact shared input sizes

Normalize onchain integer amounts with Decimal. 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.
At the same input size, a 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 Decimal values 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.
  • 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