Uniswap Swap

Uniswap Swap workflow and evidence

Galleon Labs

@galleonlabs

Install

$ openclaw skills install @galleonlabs/galleon-uniswap-swap

Uniswap Swap

Return a comparable quote and a bounded unsigned handoff, or resolve an existing transaction/order. Distinguish CLASSIC AMM transactions from UniswapX signed orders before constructing anything. Use the official Trading API or verified official interface; a wallet connection is not needed to explain or compare a public quote, but its real swapper address is needed for an executable one.

For application integration work, discover the official swap-integration skill from uniswap/uniswap-ai if already available. This operational recipe complements that upstream integration surface; it does not require an automatic install or replace upstream transaction builders.

Gather and quote

Require chain IDs, exact input/output token addresses, raw integer amount, exact-input or exact-output intent, swapper, recipient intent, slippage and expiry/cost bounds. Look up token decimals on the selected chain; symbols do not identify assets. For exact-output intent show maximum input, not a fixed input debit.

Use API recipes. Obtain an API key through the user's existing secret mechanism; never print it. Missing key means use a connected official tool/UI or produce a parameter-complete request marked unqueried, not a fabricated quote. Pin one supported x-universal-router-version consistently through the journey. For an AMM-only task request protocols: ["V2","V3","V4"] only if the user accepts those protocols; narrow to the approved subset when required.

Interpret the actual routing discriminator, quoteId, quoted input/output and minimum/maximum amounts. Preserve returned quote JSON rather than reconstructing it. Check txFailureReason, gas, recipient, chain, token identities and quote time. A successful quote endpoint does not prove allowance, affordability or a submitted swap.

Approval and route lifecycle

  1. Use /check_approval with the actual wallet, token, chain and required amount. Inspect any returned revoke/approval transaction: target, spender, token, raw cap and chain. ERC-20 allowance to Permit2 and a signed Permit2 message are different authorizations.
  2. If quote contains permitData, inspect its domain chain/verifying contract, token, spender, amount, nonce and deadlines. The wallet must explicitly authorize that exact message in an execution workflow. A signature belonging to an older quote must never be attached to a refreshed one. Do not expose signatures in a report.
  3. CLASSIC: /swap constructs an unsigned transaction from the preserved quote and matching permit data/signature when needed. Inspect and simulate returned from/to/data/value/chain before any authorized wallet sends it. The skill itself includes no signer. Do not request a signature merely to complete a research task.
  4. UniswapX routes such as DUTCH_V2, DUTCH_V3 or PRIORITY: an order signature can authorize spending. Use the corresponding official /order flow and track order identity/fills. Never feed an auction order into the AMM /swap recipe or label order acceptance a mined fill. Unsupported routing types require their documented flow, not a guessed fallback.
  5. A changed token, recipient, chain, route, quote or limit invalidates the old packet. Refresh and recheck; do not silently relax slippage to make simulation pass. Native input has value/gas requirements, and wrapping is not an ERC-20 transferFrom.

Reconcile the result

For AMM swaps record submitted hash, receipt status and block, input debit, output received by intended recipient, gas paid, and any unspent input/refund. Token transfer logs must agree with the actual token addresses and account deltas; handle unrelated concurrent transfers rather than blindly subtracting two balances. An RPC timeout after send is submission-unknown: inspect the original hash/nonce instead of creating a new send.

For orders query /orders using the documented order identifier and reconcile on-chain fills, remaining authorization, expiry and cancellation status. An expired quote is not proof an already signed order is cancelled. Never retry by signing another order while the first may still fill.

Worked output

Synthetic exact-input 100 USDC (6 decimals): amount 100000000; slippage 0.5 means 0.5 percent in this API. Returned CLASSIC minimum is 49000000000000000 WETH and permitData is present. Report minimum 0.049 WETH plus separately quoted gas; state quote-only, signature and simulation absent. If a second quote replaces the first, discard the earlier permit handoff. Do not use LI.FI's fractional slippage convention here.

Sources and maintenance

Primary sources checked 2026-09-27. Protocol recipes and sources contain the concrete calls. Recheck deployments and API schemas before preparing financial actions; documentation access alone proves no live position or transaction.

Top skills in this category

Free Ride - Unlimited free AI

@shaivpidadi

Manages free AI models from OpenRouter for OpenClaw. Automatically ranks models by quality, configures fallbacks for rate-limit handling, and updates opencla...

49172k

Playwright (Automation + MCP + Scraper)

@ivangdavila

Automates, tests, and debugs browsers with Playwright: locators, auto-waiting, traces, CI runs, and MCP browser control. Use when a test is flaky, times out, or fails only in CI or headless; when a locator matches multiple elements or the wrong one (strict mode violation); when clicks need force, waits become sleeps, or networkidle never settles; for storageState and login setup, request mocking and HAR replay, uploads and downloads, iframes and shadow DOM, popups and dialogs, screenshot diffs that change per machine, trace and report artifacts, sharding a slow suite, device and permission emulation, accessibility checks, driving a real browser through Playwright MCP, extracting data from JS-rendered pages, or porting a Cypress, Puppeteer, or Selenium suite to Playwright. Not for maintaining an existing Cypress or Puppeteer suite (cypress, puppeteer) or for work a plain HTTP request answers (http).

13043k

n8n

@thomasansems

Manage n8n workflows and automations via API. Use when working with n8n workflows, executions, or automation tasks - listing workflows, activating/deactivating, checking execution status, manually triggering workflows, or debugging automation issues.

6121k

google-slides

@byungkyu

Google Slides API integration with managed OAuth. Create presentations, add slides, insert content, and manage slide formatting. Use this skill when users want to interact with Google Slides. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Calls run through the `maton` CLI with OAuth login, or over raw HTTP with a Maton API key where the CLI cannot be installed. Every call is authenticated as the user's connection and reaches only what that connection's authorization allows, which the provider enforces on every request; the endpoints documented here are the ones this skill uses, and any other endpoint of this app needs the user to ask for it by name. Default to read and list calls, and confirm every write or new connection with the user. This file also documents the three constructs that turn a Google Slides connection into automation, in the order they are used: the connection (the first step), a hosted function that runs a Google Slides action through the Maton SDK, and a trigger that calls that function on a schedule or on an event. Those sections are the platform's own reference text, shared with the api-gateway skill, with Google Slides examples; they add no Google Slides capability - Google Slides is not an event source, a trigger cannot read Google Slides data, and the files under `references/<source>/triggers.md` are the platform's event catalogues for the sources Maton offers (time, Calendly, GitHub, Gmail, HubSpot, Linear, Notion, Slack, Stripe).

3420k

Superpowers Dev Workflow

@wlshlad85

Spec-first, TDD, subagent-driven software development workflow. Use when: (1) building any new feature or app — triggers brainstorm → plan → subagent executi...

2129k