okx-crosschain-swap

Bridges and swaps tokens across blockchains using LI.FI routing and onchainos wallet execution.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/Nith567/xlayer-skills-arena --skill okx-crosschain-swap-nith567
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: okx-crosschain-swap
Source: https://github.com/Nith567/xlayer-skills-arena/tree/main/okx-crosschain-swap
Command: npx skills add https://github.com/Nith567/xlayer-skills-arena --skill okx-crosschain-swap-nith567

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Moving tokens between blockchains normally requires manually comparing bridges, estimating fees, and tracking transfers across explorers. This Skill automates the entire cross-chain swap workflow: it finds the optimal bridge route via the LI.FI API, shows a full quote with fees and timing, executes the transaction, and polls until the funds arrive on the destination chain. ## Core Features & Use Cases - Optimal Route Discovery: Queries LI.FI across 30+ chains (Ethereum, Base, Arbitrum, Optimism, Polygon, Solana, and more) to find the best bridge by output, fees, or speed. - End-to-End Execution: Checks balances, displays a detailed quote (min received, bridge fee, gas, estimated time), executes via onchainos wallet contract-call, and polls transfer status until confirmed. - Risk Guardrails: Warns on high slippage (>2%), slow routes (>30 min), tiny amounts, and unsupported tokens, with explorer links for both source and destination transactions. - Use Case: Say "swap 100 USDC from Base to Arbitrum" and the Skill resolves token addresses, gets a Stargate or Across quote, executes the bridge transaction, and confirms your USDT balance on Arbitrum minutes later. ## Quick Start Ask the agent to swap 100 USDC from Base to Arbitrum and it will quote, execute, and track the bridge transfer to completion.

Frequently Asked Questions about okx-crosschain-swap

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

FAQPage Schema
How do I bridge tokens from Base to Arbitrum?▼

State the amount, token, and chains in natural language, such as "swap 100 USDC from Base to Arbitrum". The Skill resolves token addresses, fetches a LI.FI quote, executes the bridge transaction via onchainos wallet contract-call, and polls the status until funds arrive.

What chains does LI.FI cross-chain routing support?▼

LI.FI supports 30+ chains including Ethereum, Base, Arbitrum, Optimism, Polygon, BNB Chain, Avalanche, Solana, Linea, and Scroll. The Skill verifies both source and destination chains against the LI.FI chains endpoint before quoting.

Do I need a LI.FI API key for cross-chain swaps?▼

No API key is required for basic usage. The public LI.FI endpoints allow roughly 10 requests per minute, which is sufficient for normal skill usage; a free key from portal.li.fi raises the limit if you hit HTTP 429 rate limiting.

How long does a cross-chain bridge transfer take?▼

Typical routes take 1 to 15 minutes depending on the bridge and chain pair, such as 2-5 minutes for Base to Arbitrum via Stargate or Across. The Skill polls the LI.FI status endpoint every 15 seconds for up to 5 minutes and warns if a route exceeds 30 minutes.

What happens if a bridge transfer fails?▼

If the LI.FI status returns FAILED, the Skill reports the error and notes that funds are typically refunded to the source chain within 30 minutes. You can check the transfer manually at scan.li.fi using the source transaction hash.

When should I use a same-chain swap instead of bridging?▼

If the source and destination chains are identical, cross-chain routing is unnecessary and the Skill routes the request to a same-chain DEX swap instead. Bridging is only appropriate when moving value between two different blockchains.