lifi
하는 일
이 스킬은 75개가 넘는 블록체인에서 토큰 스왑과 브리지를 처리하는 LI.FI API를 다룹니다. DeFi 예치, 수익 데이터, 인텐트 기반 주문도 포함하며, 앱에 체인 간 스왑이나 수익 기능을 추가하는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓사용자가 서로 다른 두 블록체인 사이에서 토큰을 스왑하려고 할 때.
- ✓사용자가 토큰을 다른 체인으로 옮기려고 할 때.
- ✓수익이 나는 볼트를 찾거나 DeFi 프로토콜에 예치하고 싶을 때.
스킬 링크
https://github.com/internet-court/internet-court-skill/blob/main/vendored/lifi/lifi/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“사용자가 제 앱 안에서 Ethereum의 USDC를 Arbitrum의 ETH로 스왑할 수 있게 해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 LI.FI API를 호출해 견적과 경로를 받고, 실행 데이터를 사용한 뒤 전송이 완료될 때까지 상태를 확인합니다. 선택 사항인 API 키는 요청 한도를 늘리며, 요청 헤더로 보냅니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
LI.FI API Integration
LI.FI aggregates bridges, DEXs, intent solvers, and DeFi protocols behind one API. This skill covers the full product surface:
| Product | Base URL | What it does |
|---|---|---|
| Core API (swaps & bridges) | https://li.quest/v1 |
Quotes, routes, execution data, status tracking across 75+ chains |
| Composer (DeFi execution) | https://li.quest/v1 (same /quote endpoint) |
One-click swap/bridge + deposit/withdraw into vaults, lending, staking |
| Earn (yield data) | https://earn.li.fi/v1 |
Vault discovery, APY/TVL analytics, portfolio positions |
| Intents (solver marketplace) | https://order.li.fi |
Intent-based orders filled by a competitive solver network |
For AI agents, LI.FI also offers an MCP server (https://mcp.li.quest/mcp) and a CLI (@lifi/cli). LI.FI recommends agents and backends use the REST API directly rather than the SDK.
Authentication & Rate Limits
API key is optional — it only raises rate limits. Header: x-lifi-api-key (get one at the LI.FI Partner Portal).
curl "https://li.quest/v1/chains" -H "x-lifi-api-key: YOUR_API_KEY"
| Tier | /quote, /advanced/routes |
/advanced/stepTransaction |
Other endpoints |
|---|---|---|---|
| Without API key | 75 req / 2 hours | 50 req / 2 hours | 100 req / minute |
| With API key (default) | 100 RPM (2-hour rolling window: 12,000 / 2h) | same | 100 RPM |
Responses include ratelimit-limit, ratelimit-remaining, ratelimit-reset (seconds) headers. 429 responses carry error code 1005. Never expose your API key in client-side code.
Quick Start — The Five-Call Recipe
The canonical flow for any swap/bridge:
1. GET /chains → discover chains (id, key, chainType, nativeToken)
2. GET /tokens → find tokens & decimals (?chains=1,42161)
3. GET /quote → get quote with ready-to-sign transactionRequest
4. [Execute] → if ERC-20: check allowance vs estimate.approvalAddress, approve if needed;
then sign & send transactionRequest
5. GET /status → poll until DONE or FAILED
# 3. Quote (fromToken/toToken accept addresses OR symbols)
curl "https://li.quest/v1/quote?\
fromChain=42161&toChain=10&\
fromToken=0xaf88d065e77c8cC2239327C5EDb3A432268e5831&\
toToken=0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1&\
fromAmount=10000000&fromAddress=0xYourAddress&slippage=0.005"
# 5. Status (pass fromChain to speed it up; bridge = quote's `tool`)
curl "https://li.quest/v1/status?txHash=0xYourTxHash&fromChain=42161&toChain=10&bridge=across"
From the quote response, extract: transactionRequest (sign & send), estimate.approvalAddress (ERC-20 spender), estimate.toAmount/toAmountMin, estimate.executionDuration (basis for polling), and tool (pass as bridge to /status). Quotes go stale in ~60 seconds — re-fetch before signing if older (and always after a separate approval tx).
Core Endpoints
GET /quote
Single best route with transaction data ready for execution.
| Parameter | Type | Required | Description |
|---|---|---|---|
fromChain / toChain |
string | Yes | Chain ID or key (same value = same-chain swap) |
fromToken / toToken |
string | Yes | Token address or symbol |
fromAmount |
string | Yes | Amount in smallest unit |
fromAddress |
string | Yes | Sender wallet address |
toAddress |
string | No | Recipient (defaults to fromAddress) |
slippage |
number | No | 0.005 = 0.5% (default) |
order |
string | No | FASTEST or CHEAPEST |
integrator |
string | No | Your app ID (analytics + fee collection) |
fee |
number | No | Integrator fee (0.02 = 2%) |
preset |
string | No | Routing preset, e.g. stablecoin (see below) |
allowBridges / denyBridges / preferBridges |
string[] | No | Tool keys from /tools, or all/none/default |
allowExchanges / denyExchanges / preferExchanges |
string[] | No | Same |
allowDestinationCall |
boolean | No | Default true |
maxPriceImpact |
number | No | Default 0.10 (10%) |
fromAmountForGas |
string | No | Amount converted to gas on destination |
skipSimulation |
boolean | No | Faster response, less accurate gas limit |
svmPriorityFeeLevel |
string | No | Solana priority fee: NORMAL/FAST/ULTRA |
swapStepTimingStrategies / routeTimingStrategies |
string[] | No | e.g |
자주 묻는 질문
API 키가 필요한가요?
아니요. 선택 사항이며, 키는 요청 한도만 높여 줍니다.
AI 에이전트가 도구를 통해 이를 쓸 수 있나요?
네. LI.FI는 MCP 서버와 CLI를 제공하지만, 스킬은 REST API를 직접 호출하는 것을 권장합니다.
Earn은 무엇을 다루나요?
Earn은 볼트 탐색, APY와 TVL 데이터, 포트폴리오 포지션을 제공합니다.
상세 정보
작성자의 원본 설명
LI.FI REST API for cross-chain and same-chain token swaps, bridging, DeFi deposits (Composer), yield discovery (Earn), and intent-based execution (Intents). USE THIS SKILL WHEN USER WANTS TO: - Swap tokens between different blockchains (e.g., "swap USDC on Ethereum to ETH on Arbitrum") - Bridge tokens to another chain (e.g., "move my ETH from mainnet to Optimism") - Swap tokens on the same chain with best rates (e.g., "swap ETH to USDC on Polygon") - Find the best route or quote for a token swap across chains - Deposit into DeFi vaults/lending/staking in one click, including cross-chain (Compo
인기도
- GitHub 스타
- 7.0k
- 순위
- #13640
- 라이선스
- —
- 업데이트
- 2026. 10. 26.
댓글
- …
이 저장소의 다른 스킬
internet-court
7.0k에이전트가 다른 AI 에이전트나 유료 서비스와 안전하게 결제하거나 거래하도록 돕고, 적합한 전문 가이드를 알려 줍니다.
genlayer-erc7710-connector
7.0k에이전트가 GenLayer 검토 결과를 권한 시스템에 연결하도록 돕습니다. 나쁜 검토는 에이전트의 권한을 제한하거나 취소할 수 있습니다.
genlayer-intelligent-contracts
7.0k에이전트가 다른 에이전트가 위임받은 범위를 지켰는지 확인하는 AI 심판의 규칙, 증거, 결과를 정하도록 돕습니다.
x402-erc7710
7.0k에이전트가 웹 서비스 요금을 요청 한 건마다 결제하고, 권한 예산 안에서 지속적인 지출을 설정하도록 돕습니다.
비슷한 스킬
api-connector-builder
280k에이전트가 기존 패턴을 따라 새로운 API 연결을 만들도록 합니다. 새로운 방식을 도입하지 않고 연동을 하나 더 추가할 때 씁니다.
api-design
280k에이전트가 모범 사례에 따라 REST API를 설계하도록 돕습니다. API가 통신하는 방식, 오류를 보여 주는 방식, 데이터를 정리하는 방식을 정하는 데 유용합니다.
backend-patterns
280k에이전트가 서버 쪽 아키텍처 패턴과 데이터베이스 최적화를 다루도록 돕습니다. 서버에서 실행되는 코드를 만들거나 검토할 때 유용합니다.