swap-tokens

Generate server-side token swap code using Circle App Kit or Swap Kit SDKs.

1|Updated Sep 4, 2025
One-click install
npx skills add https://github.com/FuzzysTodd/The-Nexus-Protocol-Token-DAO --skill swap-tokens-fuzzystodd
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: swap-tokens
Source: https://github.com/FuzzysTodd/The-Nexus-Protocol-Token-DAO/tree/main/skills/swap-tokens
Command: npx skills add https://github.com/FuzzysTodd/The-Nexus-Protocol-Token-DAO --skill swap-tokens-fuzzystodd

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @circle-fin/app-kit, @circle-fin/swap-kit, @circle-fin/adapter-viem-v2, viem, @circle-fin/adapter-solana-kit, @solana/kit, @solana/web3.js, @circle-fin/adapter-circle-wallets, and includes references (resource) components.

What problem does it solve? Building token swap functionality with Circle's SDKs requires choosing the right package, adapter, and configuration while avoiding costly mistakes with real mainnet funds. This Skill guides you through the correct SDK selection, wallet adapter setup, and safe swap implementation patterns. ## Core Features & Use Cases - SDK Selection Guidance: Decide between the all-inclusive App Kit (@circle-fin/app-kit) for swap, bridge, and send, or the standalone Swap Kit (@circle-fin/swap-kit) for swap-only use cases. - Multi-Adapter Support: Implement swaps with Viem for EVM chains, Solana Kit for Solana, or Circle developer-controlled wallets. - Safe Swap Configuration: Configure slippage tolerance, stop limits, custom developer fees, and rate estimation via estimateSwap before execution. - Use Case: A developer needs to let users convert USDT to USDC on Ethereum. The Skill walks them through kit key setup, Viem adapter configuration, rate estimation, and swap execution code with proper error handling. ## Quick Start Ask the assistant to build a token swap from USDT to USDC on Ethereum using Circle App Kit with a Viem adapter.

Frequently Asked Questions about swap-tokens

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I swap tokens with Circle App Kit?▼

Install @circle-fin/app-kit with an adapter like @circle-fin/adapter-viem-v2, initialize AppKit, and call kit.swap() with your adapter, chain, tokenIn, tokenOut, amountIn, and a config containing your kit key. All operations run server-side only.

What is the difference between Circle App Kit and Swap Kit?▼

App Kit (@circle-fin/app-kit) is an all-inclusive SDK covering swap, bridge, and send in one package. Swap Kit (@circle-fin/swap-kit) is a lighter standalone package for swap-only use cases. App Kit is recommended unless you will never need bridge or send.

Can I use Circle Swap Kit in browser or client-side code?▼

No. Both App Kit and Swap Kit require a kit key, which is a server-side-only credential. Client-side wallet connections like wagmi or ConnectKit are not supported for swap operations.

Which chains and tokens does Circle swap support?▼

Supported mainnet chains include Ethereum, Base, Arbitrum, Solana, Polygon, and others, with Arc_Testnet as the testnet. Token aliases include USDC, EURC, USDT, PYUSD, DAI, WBTC, WETH, and NATIVE, or any token by contract address.

How do I set slippage and custom fees on a swap?▼

Set slippageBps in the swap config (default 300 bps) or use stopLimit for an absolute minimum output, which takes precedence when both are set. Custom developer fees are supported, with Circle retaining 10% and 90% going to your configured recipient address.

Why can't I swap USDC to NATIVE on Arc?▼

On Arc, the native gas asset is USDC, so USDC and NATIVE are the same asset. A USDC-to-NATIVE swap is a same-asset no-op and must be detected and rejected before calling estimateSwap or routing.