> For the complete documentation index, see [llms.txt](https://docs.peach.ag/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.peach.ag/documentation/arc/aggregator/overview.md).

# Overview

How Arc Aggregator finds routes and executes fixed-input token swaps.

Arc Aggregator searches liquidity across supported DEXs and Peach Launchpad. Routes can use multiple pools, intermediate tokens or split paths. The current integration supports fixed-input ERC-20 swaps: specify how much to spend and receive a quote for the output.

### How it works

1. **Find routes:** the Aggregator searches available liquidity for the specified input amount. A route can combine pools, use intermediate tokens or split the input across paths. `findRoutes` returns the route and expected output for the user to review; it prepares no transaction and needs no approval or signature.
2. **Swap:** after the user confirms, `swap` refreshes the route and prepares a validated transaction. The application checks the new minimum output against the confirmed terms, then submits with the wallet. The Execution Router executes the selected route and settles the output to the recipient, subject to the minimum-output requirement.

The input amount is fixed. The output can change with market conditions, so a preview does not lock a price or route. See [Slippage](https://docs.peach.ag/documentation/arc/aggregator/core-features/slippage) for protecting the confirmed minimum. The SDK prepares the transaction; the wallet broadcasts it.

### Get started

* [Quickstart](https://docs.peach.ag/documentation/arc/aggregator/quickstart) — install the SDK and complete a wallet integration.
* [Client Configuration](https://docs.peach.ag/documentation/arc/aggregator/core-features/api-configuration-cancellation-and-errors) — select Mainnet or Testnet and configure the client.
* [Core Features](https://docs.peach.ag/documentation/arc/aggregator/core-features) — routing, slippage, fees and transaction safety.
* [Contract Address](https://docs.peach.ag/documentation/arc/aggregator/contract-address) — network-specific contracts, dependencies and deployment details.

These guides use the [@masterpeach/arc-aggregator-sdk TypeScript SDK](https://www.npmjs.com/package/@masterpeach/arc-aggregator-sdk). Direct HTTP integrations are covered in the separate [API Reference](https://docs.peach.ag/api-reference/arc-aggregator).

### AI coding agent skill

Use the [arc-aggregator skill](https://github.com/peachbuild/peach-arc-skills/tree/main/skills/arc-aggregator) to help an AI coding agent generate and review integrations with `@masterpeach/arc-aggregator-sdk`, the HTTP API and Execution Router. It covers quote and confirmation flows, Direct Allowance, Permit2 Witness and graduation routing. **This skill supports Arc Mainnet only (5042)**, using `https://api.peach.ag/arc` and `/router/find_routes` for quotes.

```bash
npx skills add peachbuild/peach-arc-skills --skill arc-aggregator
```

**Slippage and transaction safety:** preserve the positive, after-fee minimum received that the user confirmed. A refreshed quote must not silently lower that minimum, even with the same slippage percentage. Verify approval spenders, recipients, transaction targets and expiry; validate the full execution plan, simulate and check receipts. Retries must not silently widen slippage.

Example: “Use arc-aggregator to integrate a Mainnet USDC swap preview and confirmation flow with minimum-output checks.”

The skill provides development guidance; signing and submission remain controlled by the application’s user. See [Peach Arc Skills](https://github.com/peachbuild/peach-arc-skills) for installation and version details, and the [Arc Aggregator SDK source](https://github.com/peachbuild/arc-aggregator-sdk) for implementation.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.peach.ag/documentation/arc/aggregator/overview.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
