{
  "$schema": "https://degreesofsatoshi.com/encyclopedia/schemas/article-v1.json",
  "schemaVersion": "1.0.0",
  "id": "swap-routing-and-aggregators",
  "canonical": "https://degreesofsatoshi.com/encyclopedia/swap-routing-and-aggregators/",
  "collection": "defi",
  "title": "Swap routing and aggregators: selecting a path through liquidity",
  "description": "Learn how swap routes cross or split between pools, why gas can change the best route, and what an aggregator quote does and does not promise.",
  "aliases": [
    "trade routing"
  ],
  "dates": {
    "published": "2026-10-02",
    "modified": "2026-10-02",
    "verified": "2026-10-02T15:08:18.373Z",
    "dataAsOf": null
  },
  "authorship": {
    "publisher": "Degrees of Satoshi editorial project",
    "process": "AI-assisted research and drafting with a separate automated source-verification pass; no external expert or named human review is implied."
  },
  "quickAnswer": {
    "text": "A swap router executes a path through one or more pools. An aggregator compares available paths or liquidity sources and may split a trade. The most useful comparison includes fees and execution costs; a route with the largest gross token output can still have a lower net result.",
    "claimId": "swap-routing-and-aggregators-quick-answer",
    "sourceIds": [
      "router",
      "pricing"
    ]
  },
  "keyFacts": [
    {
      "label": "Multiple hops",
      "value": "A route can exchange A for an intermediate token before B.",
      "sourceIds": [
        "router"
      ],
      "id": "multiple-hops",
      "claimId": "swap-routing-and-aggregators-fact-multiple-hops"
    },
    {
      "label": "Split execution",
      "value": "Routing can divide an input across several pools.",
      "sourceIds": [
        "router"
      ],
      "id": "split-execution",
      "claimId": "swap-routing-and-aggregators-fact-split-execution"
    },
    {
      "label": "Permission",
      "value": "The spender authorized for routing is a specific contract.",
      "sourceIds": [
        "erc20"
      ],
      "id": "permission",
      "claimId": "swap-routing-and-aggregators-fact-permission"
    }
  ],
  "prerequisites": [
    "decentralized-exchanges",
    "slippage-and-price-impact"
  ],
  "sections": [
    {
      "id": "paths",
      "heading": "Think of pools as possible paths",
      "paragraphs": [
        "A direct A-to-B pool is one path. An A-to-C pool followed by C-to-B is another. Splitting the input can also reduce how far any one pool moves along its curve, at the cost of more contract work.",
        "Uniswap’s September 2021 Auto Router announcement is a dated example: it describes split routing and considering gas when choosing a path. It does not establish which routes, venues or cost estimates any current aggregator uses."
      ],
      "sourceIds": [
        "router"
      ]
    },
    {
      "id": "net",
      "heading": "Compare like-for-like output",
      "paragraphs": [
        "Imagine route one delivers 1,000 quote-token units with an execution cost valued at 2 of those units. Route two delivers 1,003 but costs 7. The illustrative net amounts are 998 and 996 respectively, before any extra interface charges or uncertainty.",
        "This comparison depends on valuing the gas asset in the same unit and at the same time. A longer path can win for a large swap and lose for a small one. An off-chain route search is an estimate until the encoded transaction executes."
      ],
      "sourceIds": [
        "router"
      ]
    },
    {
      "id": "boundaries",
      "heading": "Inspect the transaction behind the quote",
      "paragraphs": [
        "The route, permitted spender, recipient, input and final minimum output are concrete parts of the request. An attractive displayed price does not justify an unrelated approval or a different recipient.",
        "An aggregator searches its supported venues and assumptions; it cannot prove that no better executable trade exists anywhere. Quotes may expire as state changes, and a route can fail if any required operation or final bound fails."
      ],
      "sourceIds": [
        "pricing",
        "erc20"
      ]
    }
  ],
  "faq": [
    {
      "question": "Does an aggregator always choose the best trade?",
      "answer": "It can compare the venues and routes it supports using its own cost estimates. That is not a guarantee of the best executable result across all markets or future states.",
      "sourceIds": [
        "router",
        "pricing"
      ]
    }
  ],
  "claims": [
    {
      "id": "swap-routing-and-aggregators-quick-answer",
      "articleSlug": "swap-routing-and-aggregators",
      "statement": "A swap router executes a path through one or more pools. An aggregator compares available paths or liquidity sources and may split a trade. The most useful comparison includes fees and execution costs; a route with the largest gross token output can still have a lower net result.",
      "sourceIds": [
        "source-8c39f0775aa765a9",
        "source-5cf943a6c62eb740"
      ],
      "sourceLocators": [
        {
          "sourceId": "source-8c39f0775aa765a9",
          "locator": "Split Routes; Gas Cost Awareness"
        },
        {
          "sourceId": "source-5cf943a6c62eb740",
          "locator": "Pricing Trades; Exact Input; Exact Output"
        }
      ],
      "scope": {
        "collection": "defi",
        "dataAsOf": null,
        "blockHeight": null
      },
      "qualification": "",
      "evidenceStatus": "documented",
      "verification": {
        "status": "verified",
        "method": "independent automated source review",
        "checkedAt": "2026-10-02T15:08:18.373Z",
        "reviewer": "automated independent verification",
        "notes": [
          "Read the dated September 16, 2021 Auto Router announcement: split routes and gas-aware route selection. Read ERC-20 allowance for specific spender scope.",
          "Recomputed net outcomes998 versus996. Article separates modeled route selection from future execution and does not promise global optimality."
        ]
      }
    },
    {
      "id": "swap-routing-and-aggregators-fact-multiple-hops",
      "articleSlug": "swap-routing-and-aggregators",
      "statement": "Multiple hops: A route can exchange A for an intermediate token before B.",
      "sourceIds": [
        "source-8c39f0775aa765a9"
      ],
      "sourceLocators": [
        {
          "sourceId": "source-8c39f0775aa765a9",
          "locator": "Split Routes; Gas Cost Awareness"
        }
      ],
      "scope": {
        "collection": "defi",
        "dataAsOf": null,
        "blockHeight": null
      },
      "qualification": "",
      "evidenceStatus": "documented",
      "verification": {
        "status": "verified",
        "method": "independent automated source review",
        "checkedAt": "2026-10-02T15:08:18.373Z",
        "reviewer": "automated independent verification",
        "notes": [
          "Read the dated September 16, 2021 Auto Router announcement: split routes and gas-aware route selection. Read ERC-20 allowance for specific spender scope.",
          "Recomputed net outcomes998 versus996. Article separates modeled route selection from future execution and does not promise global optimality."
        ]
      }
    },
    {
      "id": "swap-routing-and-aggregators-fact-split-execution",
      "articleSlug": "swap-routing-and-aggregators",
      "statement": "Split execution: Routing can divide an input across several pools.",
      "sourceIds": [
        "source-8c39f0775aa765a9"
      ],
      "sourceLocators": [
        {
          "sourceId": "source-8c39f0775aa765a9",
          "locator": "Split Routes; Gas Cost Awareness"
        }
      ],
      "scope": {
        "collection": "defi",
        "dataAsOf": null,
        "blockHeight": null
      },
      "qualification": "",
      "evidenceStatus": "documented",
      "verification": {
        "status": "verified",
        "method": "independent automated source review",
        "checkedAt": "2026-10-02T15:08:18.373Z",
        "reviewer": "automated independent verification",
        "notes": [
          "Read the dated September 16, 2021 Auto Router announcement: split routes and gas-aware route selection. Read ERC-20 allowance for specific spender scope.",
          "Recomputed net outcomes998 versus996. Article separates modeled route selection from future execution and does not promise global optimality."
        ]
      }
    },
    {
      "id": "swap-routing-and-aggregators-fact-permission",
      "articleSlug": "swap-routing-and-aggregators",
      "statement": "Permission: The spender authorized for routing is a specific contract.",
      "sourceIds": [
        "source-ac4ad503a55127bb"
      ],
      "sourceLocators": [
        {
          "sourceId": "source-ac4ad503a55127bb",
          "locator": "Methods: approve, allowance, transferFrom"
        }
      ],
      "scope": {
        "collection": "defi",
        "dataAsOf": null,
        "blockHeight": null
      },
      "qualification": "",
      "evidenceStatus": "documented",
      "verification": {
        "status": "verified",
        "method": "independent automated source review",
        "checkedAt": "2026-10-02T15:08:18.373Z",
        "reviewer": "automated independent verification",
        "notes": [
          "Read the dated September 16, 2021 Auto Router announcement: split routes and gas-aware route selection. Read ERC-20 allowance for specific spender scope.",
          "Recomputed net outcomes998 versus996. Article separates modeled route selection from future execution and does not promise global optimality."
        ]
      }
    }
  ],
  "sources": [
    {
      "id": "router",
      "label": "Introducing the Auto Router",
      "publisher": "Uniswap Labs",
      "url": "https://blog.uniswap.org/auto-router",
      "locator": "Split Routes; Gas Cost Awareness",
      "note": "A dated implementation example of routing across pools with gas-aware optimization.",
      "version": "2021-09-16 announcement",
      "checkedAt": "2026-10-02",
      "recordId": "source-8c39f0775aa765a9",
      "contentSha256": null
    },
    {
      "id": "pricing",
      "label": "Uniswap v2 pricing",
      "publisher": "Uniswap",
      "url": "https://developers.uniswap.org/docs/protocols/v2/concepts/pricing",
      "locator": "Pricing Trades; Exact Input; Exact Output",
      "note": "Reserve-dependent quotes, trade bounds and external price observations.",
      "version": "Uniswap v2",
      "checkedAt": "2026-10-02",
      "recordId": "source-5cf943a6c62eb740",
      "contentSha256": null
    },
    {
      "id": "erc20",
      "label": "ERC-20: Token Standard",
      "publisher": "Ethereum Improvement Proposals",
      "url": "https://eips.ethereum.org/EIPS/eip-20",
      "locator": "Methods: approve, allowance, transferFrom",
      "note": "The token spending allowance is separate from a website connection.",
      "version": "ERC-20 final",
      "checkedAt": "2026-10-02",
      "recordId": "source-ac4ad503a55127bb",
      "contentSha256": null
    }
  ],
  "related": {
    "articles": [
      "slippage-and-price-impact",
      "connecting-a-wallet",
      "defi-arbitrage",
      "limit-orders-onchain"
    ],
    "dossiers": [],
    "wallets": []
  },
  "revisionHistory": [
    {
      "date": "2026-10-02",
      "kind": "published",
      "summary": "First publication after primary-source research and independent automated verification."
    }
  ],
  "citation": "Degrees of Satoshi editorial project. “Swap routing and aggregators: selecting a path through liquidity.” Published 2026-10-02; updated 2026-10-02. https://degreesofsatoshi.com/encyclopedia/swap-routing-and-aggregators/"
}
