Skip to content

Comparison

Comparison primitives answer “which is better for my position?” across choices that are otherwise apples-to-apples-ish.

  • CompareFeeTiers — V3-only: compare candidate fee tiers for the same token pair.
  • CompareProtocols — cross-protocol: IL and slippage for the same trade across two AMM types.

CompareProtocols is full cross-protocol; CompareFeeTiers is V3-only by definition (V2 has a single 30-bps fee, Bal/Ssw don’t have fee tiers). Where Bal/Ssw show up as Partial below, the gap is slippage_at_amount returning None because CalculateSlippage is V2/V3-only in v2.0 — IL is still computed.

ProtocolCoverageNotes
Uniswap V2Full (CompareProtocols); N/A (CompareFeeTiers — V2 has a single 30-bps fee)
Uniswap V3Full (both primitives)CompareFeeTiers is V3-only by definition.
BalancerPartialAccepted as candidate in CompareProtocols; slippage_at_amount returns None because CalculateSlippage is Uniswap-only. IL still computed.
StableswapPartialSame shape as Balancer — accepted in CompareProtocols, slippage degrades to None.

Slippage gap closes when CalculateSlippage extensions land for Balancer/Stableswap (Bucket A / v2.1).

Neither primitive is in the curated v2.0 set. Comparison answers (“which fee tier?”, “which protocol?”) are second-order decisions an agent makes after a position-level analysis — better composed LLM-side over the leaf primitives.