> 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

Call `arc.swap()` once with the token pair, exact input amount, executor and trade settings. The Aggregator searches liquidity and returns the quote together with a signed transaction. `ArcClient` validates the result and returns `PreparedDirectSwap`.

Display `prepared.expectAmountOut`, `prepared.tx.amountOutMin`, recipient and fee terms. After the user accepts them, complete any required token approval, simulate and submit the same `prepared.tx` with the wallet. The SDK call does not approve tokens or broadcast a transaction.

For a separate payer and executor, use **prepare → payer signature → build**. `prepareDelegatedSwap()` returns the quote and authorization; `buildDelegatedSwap()` reuses that prepared plan without searching for a new quote.

The input amount is fixed. The signed minimum protects the accepted result until expiry. Replacing the result requires a new confirmation; see [Slippage](https://docs.peach.ag/documentation/arc/aggregator/core-features/slippage).

### 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 official [arc-aggregator skill](https://github.com/peachbuild/peach-ai-skills/tree/main/skills/arc-aggregator) to build and review integrations with `@masterpeach/arc-aggregator-sdk`, the HTTP API and Execution Router. It covers exact-input ERC-20 swaps, Direct Allowance, Permit2 Witness and graduation routing on **Arc Mainnet only (`5042`)**, using `https://api.peach.ag/arc`.

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

Preserve the user's positive, after-fee minimum received. A replacement result requires new confirmation, even with the same slippage percentage. Before approvals, payer signatures or submission, verify spenders, recipients, transaction targets and expiry; validate the full execution plan, simulate and check receipts. Never silently widen slippage or blindly retry an uncertain submission.

Example: “Use arc-aggregator to build an Arc Mainnet USDC swap confirmation flow with minimum-output checks.”

The skill provides development guidance; installation does not authorize approvals, signatures or transaction submission. The application's user controls those actions. See [Peach AI Skills](https://github.com/peachbuild/peach-ai-skills) for installation and compatibility 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
