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.
Get started
Quickstart — install the SDK and complete a wallet integration.
Client Configuration — select Mainnet or Testnet and configure the client.
Core Features — routing, slippage, fees and transaction safety.
Contract Address — network-specific contracts, dependencies and deployment details.
These guides use the @masterpeach/arc-aggregator-sdk TypeScript SDK. Direct HTTP integrations are covered in the separate API Reference.
AI coding agent skill
Use the official arc-aggregator skill 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.
npx skills add peachbuild/peach-ai-skills --skill arc-aggregatorPreserve 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 for installation and compatibility details, and the Arc Aggregator SDK source for implementation.
Last updated
Was this helpful?