{
  "schemaVersion": "1.0",
  "item": {
    "slug": "lifi-crosschain",
    "name": "Swap and bridge across 35+ chains with LI.FI",
    "source": "tencent",
    "type": "skill",
    "category": "通讯协作",
    "sourceUrl": "https://clawhub.ai/rhlsthrm/lifi-crosschain",
    "canonicalUrl": "https://clawhub.ai/rhlsthrm/lifi-crosschain",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/lifi-crosschain",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=lifi-crosschain",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "package.json"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/lifi-crosschain"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/lifi-crosschain",
    "agentPageUrl": "https://openagent3.xyz/skills/lifi-crosschain/agent",
    "manifestUrl": "https://openagent3.xyz/skills/lifi-crosschain/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/lifi-crosschain/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "/lifi — Cross-Chain Swaps & Bridges",
        "body": "LI.FI is a cross-chain bridge and DEX aggregation protocol. It finds optimal routes across 35+ blockchains, comparing dozens of bridges (Stargate, Hop, Across, etc.) and DEXes (Uniswap, SushiSwap, 1inch, etc.) to execute token swaps and cross-chain transfers."
      },
      {
        "title": "Arguments: $ARGUMENTS",
        "body": "Parse the arguments:\n\nFirst positional arg: Action — swap, bridge, track, routes, zap, or a natural language request\nRemaining args: Details (token names, amounts, chains, tx hashes, etc.)\n\nIf no arguments are provided, ask the user what they want to do."
      },
      {
        "title": "Key Concepts",
        "body": "Base URL: https://li.quest/v1\nThe API returns transactionRequest objects (to, data, value, gasLimit, gasPrice) ready to sign — provide these to the agent's wallet\nNative token address: 0x0000000000000000000000000000000000000000 (for ETH, MATIC, BNB, etc.)\nAmounts are always in the token's smallest unit (wei): 1 ETH = 1000000000000000000 (18 decimals), 1 USDC = 1000000 (6 decimals)\nOptional API key via x-lifi-api-key header for higher rate limits (not required)"
      },
      {
        "title": "Discovery Endpoints",
        "body": "GET /v1/chains — List supported blockchains\n\ncurl -s \"https://li.quest/v1/chains\"\n# Optional: ?chainTypes=EVM or ?chainTypes=SVM\n\nGET /v1/tokens — List supported tokens\n\ncurl -s \"https://li.quest/v1/tokens?chains=1,137\"\n# Optional: chainTypes, minPriceUSD\n\nGET /v1/token — Get specific token details\n\ncurl -s \"https://li.quest/v1/token?chain=1&token=USDC\"\n# chain (required): chain ID or name. token (required): address or symbol\n\nGET /v1/connections — Check available swap routes\n\ncurl -s \"https://li.quest/v1/connections?fromChain=1&toChain=137&fromToken=0x0000000000000000000000000000000000000000\"\n# Optional: toToken, chainTypes, allowBridges\n\nGET /v1/tools — List available bridges and DEXes\n\ncurl -s \"https://li.quest/v1/tools\"\n# Returns {bridges: [{key, name}], exchanges: [{key, name}]}"
      },
      {
        "title": "Quote & Swap Endpoints",
        "body": "GET /v1/quote — Get optimal route + transaction data\n\nThe primary endpoint for initiating any swap or bridge.\n\ncurl -s \"https://li.quest/v1/quote?\\\nfromChain=1&toChain=137\\\n&fromToken=0x0000000000000000000000000000000000000000\\\n&toToken=0x0000000000000000000000000000000000000000\\\n&fromAddress=0xYOUR_WALLET\\\n&fromAmount=1000000000000000000\\\n&slippage=0.03\"\n\nRequired: fromChain, toChain, fromToken, toToken, fromAddress, fromAmount\nOptional: toAddress, slippage (decimal, e.g. 0.03 = 3%), integrator, order (RECOMMENDED|FASTEST|CHEAPEST|SAFEST), allowBridges, allowExchanges\n\nReturns: action, estimate (toAmount, fees, executionDuration), and transactionRequest (to, data, value, gasLimit).\n\nGET /v1/status — Track cross-chain transfer\n\ncurl -s \"https://li.quest/v1/status?txHash=0xTX_HASH\"\n# Optional: bridge, fromChain, toChain\n\nReturns: status (NOT_FOUND, PENDING, DONE, FAILED), substatus (COMPLETED, PARTIAL, REFUNDED), source/destination tx details."
      },
      {
        "title": "Advanced Routing",
        "body": "POST /v1/advanced/routes — Compare multiple route options\n\ncurl -s -X POST \"https://li.quest/v1/advanced/routes\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"fromChainId\": \"1\",\n    \"toChainId\": \"137\",\n    \"fromTokenAddress\": \"0x0000000000000000000000000000000000000000\",\n    \"toTokenAddress\": \"0x0000000000000000000000000000000000000000\",\n    \"fromAddress\": \"0xYOUR_WALLET\",\n    \"fromAmount\": \"1000000000000000000\",\n    \"options\": {\"order\": \"RECOMMENDED\"}\n  }'\n\nRequired: fromChainId, toChainId, fromTokenAddress, toTokenAddress, fromAddress, fromAmount\nOptional: toAddress, slippage, options.order\n\nReturns: routes[] array — each route has steps, estimated output, fees, and execution time.\n\nPOST /v1/advanced/stepTransaction — Get tx data for a route step\n\ncurl -s -X POST \"https://li.quest/v1/advanced/stepTransaction\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ ...step object from routes response... }'\n\nPass the entire step object from a route. Returns transactionRequest ready to sign.\n\nPOST /v1/quote/contractCalls — Zaps (multi-action DeFi composition)\n\ncurl -s -X POST \"https://li.quest/v1/quote/contractCalls\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"fromChain\": \"1\",\n    \"toChain\": \"137\",\n    \"fromToken\": \"0x0000000000000000000000000000000000000000\",\n    \"toToken\": \"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174\",\n    \"fromAddress\": \"0xYOUR_WALLET\",\n    \"fromAmount\": \"1000000000000000000\",\n    \"contractCalls\": [\n      {\n        \"toContractAddress\": \"0xTARGET_CONTRACT\",\n        \"toContractCallData\": \"0xENCODED_FUNCTION_CALL\",\n        \"toContractGasLimit\": \"200000\"\n      }\n    ]\n  }'\n\nRequired: fromChain, toChain, fromToken, toToken, fromAddress, fromAmount, contractCalls[]\nOptional: slippage"
      },
      {
        "title": "Gas Information",
        "body": "GET /v1/gas/prices — Gas prices across all chains\n\ncurl -s \"https://li.quest/v1/gas/prices\"\n\nGET /v1/gas/suggestion/{chainId} — Recommended gas params for a chain\n\ncurl -s \"https://li.quest/v1/gas/suggestion/1\""
      },
      {
        "title": "Workflow 1 — Swap or Bridge Tokens",
        "body": "Use this for any \"swap X for Y\" or \"bridge tokens to chain\" request.\n\nIdentify parameters from the user's request:\n\nSource chain and token (e.g., \"ETH on Ethereum\")\nDestination chain and token (e.g., \"USDC on Polygon\")\nAmount in human-readable form (e.g., \"1.5 ETH\")\nWallet address (the agent's wallet or user-specified)\n\n\n\nLook up token addresses if the user gave symbols:\ncurl -s \"https://li.quest/v1/token?chain=1&token=USDC\"\n\nExtract address and decimals from the response.\n\n\nConvert amount to smallest unit:\n\nMultiply human amount by 10^decimals\n1.5 ETH (18 decimals) → 1500000000000000000\n100 USDC (6 decimals) → 100000000\n\n\n\nGet a quote:\ncurl -s \"https://li.quest/v1/quote?fromChain=1&toChain=137&fromToken=0x0000000000000000000000000000000000000000&toToken=0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359&fromAddress=0xWALLET&fromAmount=1500000000000000000&slippage=0.03\"\n\n\n\nPresent summary to user (REQUIRED before returning tx data):\nSwap: 1.5 ETH (Ethereum) → ~2,850 USDC (Polygon)\nRoute: Stargate bridge → Uniswap V3\nFees: ~$2.50 (gas) + $0.50 (bridge)\nEstimated time: ~2 minutes\nSlippage: 3%\n\n\n\nIf ERC20 token: Check if the LiFi contract has sufficient allowance. The spender address is transactionRequest.to from the quote response. If allowance < fromAmount, guide the user to approve the token first.\n\n\nReturn transactionRequest for signing by the agent's wallet.\n\n\nIf cross-chain: Explain that bridging is asynchronous — the source chain tx will confirm first, then the bridge delivers tokens to the destination. Offer to track with Workflow 3."
      },
      {
        "title": "Workflow 2 — Compare Routes",
        "body": "Use when the user wants to see options or find the best deal.\n\nGather parameters (same as Workflow 1, steps 1-3).\n\n\nRequest multiple routes:\ncurl -s -X POST \"https://li.quest/v1/advanced/routes\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"fromChainId\": \"1\",\n    \"toChainId\": \"137\",\n    \"fromTokenAddress\": \"0x0000000000000000000000000000000000000000\",\n    \"toTokenAddress\": \"0x0000000000000000000000000000000000000000\",\n    \"fromAddress\": \"0xWALLET\",\n    \"fromAmount\": \"1000000000000000000\",\n    \"options\": {\"order\": \"RECOMMENDED\"}\n  }'\n\n\n\nPresent comparison table:\n#  Route                     Output       Fees     Time    Bridge\n1  Stargate → Uniswap V3    2,850 USDC   $3.00    2 min   Stargate\n2  Hop → SushiSwap          2,845 USDC   $2.80    5 min   Hop\n3  Across → 1inch           2,848 USDC   $3.20    3 min   Across\n\n\n\nUser picks a route. Extract the chosen route's steps.\n\n\nGet transaction data for each step:\ncurl -s -X POST \"https://li.quest/v1/advanced/stepTransaction\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ ...step object... }'\n\n\n\nReturn transactionRequest for signing."
      },
      {
        "title": "Workflow 3 — Track a Transfer",
        "body": "Use when the user wants to check status of a cross-chain transfer.\n\nGet details from user: transaction hash, source chain, destination chain.\n\n\nCheck status:\ncurl -s \"https://li.quest/v1/status?txHash=0xTX_HASH&fromChain=1&toChain=137\"\n\n\n\nInterpret and report status:\n\nNOT_FOUND — Transaction not yet indexed. Wait a minute and retry.\nPENDING — Transfer in progress. Suggest polling every 30 seconds.\nDONE with substatus COMPLETED — Transfer complete. Report destination tx hash.\nDONE with substatus PARTIAL — User received the bridged token on the destination chain but NOT the final target token (e.g., got USDC.e instead of native USDC). The user may need to swap manually.\nDONE with substatus REFUNDED — Transfer failed and funds were returned to the source address.\nFAILED — Transfer failed. Report error details and advise the user to check the source chain tx on a block explorer.\n\n\n\nIf PENDING: Offer to poll periodically. Wait 30 seconds between checks."
      },
      {
        "title": "Workflow 4 — Zap (Contract Call Composition)",
        "body": "Use for multi-step DeFi operations like \"bridge ETH to Polygon and deposit into Aave\" or \"swap to USDC and stake in a vault.\"\n\nUnderstand the multi-step operation — identify:\n\nSource chain/token/amount\nDestination chain/token (the intermediate token before contract calls)\nTarget contract and function to call on the destination\n\n\n\nGather contract call data:\n\ntoContractAddress: The destination contract (e.g., Aave lending pool)\ntoContractCallData: ABI-encoded function call (e.g., deposit(address,uint256,address,uint16))\ntoContractGasLimit: Gas limit for the contract call (e.g., \"200000\")\n\n\n\nRequest zap quote:\ncurl -s -X POST \"https://li.quest/v1/quote/contractCalls\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"fromChain\": \"1\",\n    \"toChain\": \"137\",\n    \"fromToken\": \"0x0000000000000000000000000000000000000000\",\n    \"toToken\": \"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174\",\n    \"fromAddress\": \"0xWALLET\",\n    \"fromAmount\": \"1000000000000000000\",\n    \"contractCalls\": [{\n      \"toContractAddress\": \"0xTARGET\",\n      \"toContractCallData\": \"0xENCODED_CALL\",\n      \"toContractGasLimit\": \"200000\"\n    }]\n  }'\n\n\n\nPresent summary showing all operations in the zap (bridge + swap + deposit/stake/etc.).\n\n\nReturn transactionRequest for signing."
      },
      {
        "title": "Workflow 5 — Discovery",
        "body": "Use when the user asks \"what chains are supported?\", \"what tokens can I swap?\", \"what bridges are available?\", etc.\n\nDetermine what the user wants to know:\n\nSupported chains → GET /v1/chains\nTokens on a chain → GET /v1/tokens?chains={chainId}\nToken details → GET /v1/token?chain={chainId}&token={symbol}\nAvailable routes → GET /v1/connections?fromChain={id}&toChain={id}\nAvailable bridges/DEXes → GET /v1/tools\nGas prices → GET /v1/gas/prices or GET /v1/gas/suggestion/{chainId}\n\n\n\nCall the appropriate endpoint.\n\n\nPresent results in a readable table format. For large responses (e.g., all tokens), summarize the most relevant results and offer to filter further."
      },
      {
        "title": "Safety Protocol",
        "body": "These rules are mandatory — never skip them."
      },
      {
        "title": "Address Validation",
        "body": "ALWAYS verify fromAddress is a valid hex address: starts with 0x, 42 characters total, valid hex characters\nNEVER send to the zero address (0x0000000000000000000000000000000000000000) as toAddress — this burns funds permanently. The zero address is ONLY valid as a fromToken/toToken to represent native tokens."
      },
      {
        "title": "Amount Validation",
        "body": "ALWAYS convert human-readable amounts to the token's smallest unit before calling the API\n\nCheck the token's decimals field (ETH=18, USDC=6, WBTC=8, DAI=18)\nFormula: amount_wei = human_amount × 10^decimals\n\n\nAmounts must be positive integers (no decimals, no negatives, no zero)\nMaximum 78 digits (uint256 max)\nIf the user says \"1 ETH\", send 1000000000000000000, NOT 1"
      },
      {
        "title": "Slippage Validation",
        "body": "Default to 0.03 (3%) if the user doesn't specify\nWARN the user if slippage > 3% — explain they may receive significantly fewer tokens\nREJECT slippage > 50% (0.5) — this is almost certainly an error\nSlippage must be between 0 and 1 (0% to 100%)"
      },
      {
        "title": "ERC20 Token Approvals",
        "body": "ALWAYS check token allowance before executing ERC20 swaps\nIf allowance < fromAmount, guide the user to approve the token first\nNEVER approve unlimited amounts (MaxUint256 / 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) unless the user explicitly requests it — approve only the needed amount\nThe spender address is transactionRequest.to from the quote response"
      },
      {
        "title": "Transaction Presentation",
        "body": "ALWAYS present a human-readable summary before returning any transactionRequest data\nThe summary must include: tokens and amounts, route/bridge used, estimated fees, estimated time, slippage setting\nNEVER return raw transaction data without explanation"
      },
      {
        "title": "Cross-Chain Safety",
        "body": "Explain that cross-chain bridges are non-atomic — funds may be in transit for minutes to hours\nAfter submitting a source chain tx, always offer to track the transfer status\nIf a transfer shows PARTIAL status, explain the user received bridged tokens but not the final target token"
      },
      {
        "title": "No Route Found",
        "body": "If a quote returns no route: suggest trying different tokens, a smaller amount, or an alternative chain pair\nUse GET /v1/connections to verify the route is supported before retrying"
      },
      {
        "title": "Error Handling",
        "body": "ErrorCauseActionHTTP 429Rate limitedWait 30s, retry with exponential backoff (30s → 60s → 120s). Suggest user set LIFI_API_KEY for higher limits.No route foundRoute unsupported or amount too small/largeCheck /v1/connections for valid pairs. Suggest different tokens, smaller amount, or alternative chains.Slippage errorPrice moved beyond toleranceIncrease slippage (e.g., 0.03 → 0.05) and retry. Warn user about the trade-off.Insufficient balanceWallet lacks fundsReport the shortfall amount. Check balance with the agent's wallet tools.Transaction revertedPrice moved, liquidity drained, or gas too lowExplain possible causes. Suggest retrying with higher slippage or gas.PARTIAL completionBridge delivered token but not final swapUser has the bridged asset on the destination chain. They can swap it manually or retry.REFUNDEDBridge failed, funds returnedConfirm refund on source chain. Suggest trying a different bridge via allowBridges.Invalid addressMalformed hex addressVerify address format: 0x prefix, 42 characters, valid hex."
      },
      {
        "title": "Chain Quick Reference",
        "body": "ChainIDNative TokenEthereum1ETHPolygon137MATICArbitrum One42161ETHOptimism10ETHBSC56BNBBase8453ETHAvalanche43114AVAXFantom250FTMzkSync Era324ETHGnosis100xDAIScroll534352ETHLinea59144ETHBlast81457ETHMode34443ETHSolana1151111081099710SOL\n\nFor the full list of supported chains, call GET /v1/chains.\n\nNative token address on all EVM chains: 0x0000000000000000000000000000000000000000"
      }
    ],
    "body": "/lifi — Cross-Chain Swaps & Bridges\n\nLI.FI is a cross-chain bridge and DEX aggregation protocol. It finds optimal routes across 35+ blockchains, comparing dozens of bridges (Stargate, Hop, Across, etc.) and DEXes (Uniswap, SushiSwap, 1inch, etc.) to execute token swaps and cross-chain transfers.\n\nArguments: $ARGUMENTS\n\nParse the arguments:\n\nFirst positional arg: Action — swap, bridge, track, routes, zap, or a natural language request\nRemaining args: Details (token names, amounts, chains, tx hashes, etc.)\n\nIf no arguments are provided, ask the user what they want to do.\n\nKey Concepts\nBase URL: https://li.quest/v1\nThe API returns transactionRequest objects (to, data, value, gasLimit, gasPrice) ready to sign — provide these to the agent's wallet\nNative token address: 0x0000000000000000000000000000000000000000 (for ETH, MATIC, BNB, etc.)\nAmounts are always in the token's smallest unit (wei): 1 ETH = 1000000000000000000 (18 decimals), 1 USDC = 1000000 (6 decimals)\nOptional API key via x-lifi-api-key header for higher rate limits (not required)\nAPI Reference\nDiscovery Endpoints\nGET /v1/chains — List supported blockchains\ncurl -s \"https://li.quest/v1/chains\"\n# Optional: ?chainTypes=EVM or ?chainTypes=SVM\n\nGET /v1/tokens — List supported tokens\ncurl -s \"https://li.quest/v1/tokens?chains=1,137\"\n# Optional: chainTypes, minPriceUSD\n\nGET /v1/token — Get specific token details\ncurl -s \"https://li.quest/v1/token?chain=1&token=USDC\"\n# chain (required): chain ID or name. token (required): address or symbol\n\nGET /v1/connections — Check available swap routes\ncurl -s \"https://li.quest/v1/connections?fromChain=1&toChain=137&fromToken=0x0000000000000000000000000000000000000000\"\n# Optional: toToken, chainTypes, allowBridges\n\nGET /v1/tools — List available bridges and DEXes\ncurl -s \"https://li.quest/v1/tools\"\n# Returns {bridges: [{key, name}], exchanges: [{key, name}]}\n\nQuote & Swap Endpoints\nGET /v1/quote — Get optimal route + transaction data\n\nThe primary endpoint for initiating any swap or bridge.\n\ncurl -s \"https://li.quest/v1/quote?\\\nfromChain=1&toChain=137\\\n&fromToken=0x0000000000000000000000000000000000000000\\\n&toToken=0x0000000000000000000000000000000000000000\\\n&fromAddress=0xYOUR_WALLET\\\n&fromAmount=1000000000000000000\\\n&slippage=0.03\"\n\n\nRequired: fromChain, toChain, fromToken, toToken, fromAddress, fromAmount Optional: toAddress, slippage (decimal, e.g. 0.03 = 3%), integrator, order (RECOMMENDED|FASTEST|CHEAPEST|SAFEST), allowBridges, allowExchanges\n\nReturns: action, estimate (toAmount, fees, executionDuration), and transactionRequest (to, data, value, gasLimit).\n\nGET /v1/status — Track cross-chain transfer\ncurl -s \"https://li.quest/v1/status?txHash=0xTX_HASH\"\n# Optional: bridge, fromChain, toChain\n\n\nReturns: status (NOT_FOUND, PENDING, DONE, FAILED), substatus (COMPLETED, PARTIAL, REFUNDED), source/destination tx details.\n\nAdvanced Routing\nPOST /v1/advanced/routes — Compare multiple route options\ncurl -s -X POST \"https://li.quest/v1/advanced/routes\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"fromChainId\": \"1\",\n    \"toChainId\": \"137\",\n    \"fromTokenAddress\": \"0x0000000000000000000000000000000000000000\",\n    \"toTokenAddress\": \"0x0000000000000000000000000000000000000000\",\n    \"fromAddress\": \"0xYOUR_WALLET\",\n    \"fromAmount\": \"1000000000000000000\",\n    \"options\": {\"order\": \"RECOMMENDED\"}\n  }'\n\n\nRequired: fromChainId, toChainId, fromTokenAddress, toTokenAddress, fromAddress, fromAmount Optional: toAddress, slippage, options.order\n\nReturns: routes[] array — each route has steps, estimated output, fees, and execution time.\n\nPOST /v1/advanced/stepTransaction — Get tx data for a route step\ncurl -s -X POST \"https://li.quest/v1/advanced/stepTransaction\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ ...step object from routes response... }'\n\n\nPass the entire step object from a route. Returns transactionRequest ready to sign.\n\nPOST /v1/quote/contractCalls — Zaps (multi-action DeFi composition)\ncurl -s -X POST \"https://li.quest/v1/quote/contractCalls\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"fromChain\": \"1\",\n    \"toChain\": \"137\",\n    \"fromToken\": \"0x0000000000000000000000000000000000000000\",\n    \"toToken\": \"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174\",\n    \"fromAddress\": \"0xYOUR_WALLET\",\n    \"fromAmount\": \"1000000000000000000\",\n    \"contractCalls\": [\n      {\n        \"toContractAddress\": \"0xTARGET_CONTRACT\",\n        \"toContractCallData\": \"0xENCODED_FUNCTION_CALL\",\n        \"toContractGasLimit\": \"200000\"\n      }\n    ]\n  }'\n\n\nRequired: fromChain, toChain, fromToken, toToken, fromAddress, fromAmount, contractCalls[] Optional: slippage\n\nGas Information\nGET /v1/gas/prices — Gas prices across all chains\ncurl -s \"https://li.quest/v1/gas/prices\"\n\nGET /v1/gas/suggestion/{chainId} — Recommended gas params for a chain\ncurl -s \"https://li.quest/v1/gas/suggestion/1\"\n\nGuided Workflows\nWorkflow 1 — Swap or Bridge Tokens\n\nUse this for any \"swap X for Y\" or \"bridge tokens to chain\" request.\n\nIdentify parameters from the user's request:\n\nSource chain and token (e.g., \"ETH on Ethereum\")\nDestination chain and token (e.g., \"USDC on Polygon\")\nAmount in human-readable form (e.g., \"1.5 ETH\")\nWallet address (the agent's wallet or user-specified)\n\nLook up token addresses if the user gave symbols:\n\ncurl -s \"https://li.quest/v1/token?chain=1&token=USDC\"\n\n\nExtract address and decimals from the response.\n\nConvert amount to smallest unit:\n\nMultiply human amount by 10^decimals\n1.5 ETH (18 decimals) → 1500000000000000000\n100 USDC (6 decimals) → 100000000\n\nGet a quote:\n\ncurl -s \"https://li.quest/v1/quote?fromChain=1&toChain=137&fromToken=0x0000000000000000000000000000000000000000&toToken=0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359&fromAddress=0xWALLET&fromAmount=1500000000000000000&slippage=0.03\"\n\n\nPresent summary to user (REQUIRED before returning tx data):\n\nSwap: 1.5 ETH (Ethereum) → ~2,850 USDC (Polygon)\nRoute: Stargate bridge → Uniswap V3\nFees: ~$2.50 (gas) + $0.50 (bridge)\nEstimated time: ~2 minutes\nSlippage: 3%\n\n\nIf ERC20 token: Check if the LiFi contract has sufficient allowance. The spender address is transactionRequest.to from the quote response. If allowance < fromAmount, guide the user to approve the token first.\n\nReturn transactionRequest for signing by the agent's wallet.\n\nIf cross-chain: Explain that bridging is asynchronous — the source chain tx will confirm first, then the bridge delivers tokens to the destination. Offer to track with Workflow 3.\n\nWorkflow 2 — Compare Routes\n\nUse when the user wants to see options or find the best deal.\n\nGather parameters (same as Workflow 1, steps 1-3).\n\nRequest multiple routes:\n\ncurl -s -X POST \"https://li.quest/v1/advanced/routes\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"fromChainId\": \"1\",\n    \"toChainId\": \"137\",\n    \"fromTokenAddress\": \"0x0000000000000000000000000000000000000000\",\n    \"toTokenAddress\": \"0x0000000000000000000000000000000000000000\",\n    \"fromAddress\": \"0xWALLET\",\n    \"fromAmount\": \"1000000000000000000\",\n    \"options\": {\"order\": \"RECOMMENDED\"}\n  }'\n\n\nPresent comparison table:\n\n#  Route                     Output       Fees     Time    Bridge\n1  Stargate → Uniswap V3    2,850 USDC   $3.00    2 min   Stargate\n2  Hop → SushiSwap          2,845 USDC   $2.80    5 min   Hop\n3  Across → 1inch           2,848 USDC   $3.20    3 min   Across\n\n\nUser picks a route. Extract the chosen route's steps.\n\nGet transaction data for each step:\n\ncurl -s -X POST \"https://li.quest/v1/advanced/stepTransaction\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ ...step object... }'\n\n\nReturn transactionRequest for signing.\n\nWorkflow 3 — Track a Transfer\n\nUse when the user wants to check status of a cross-chain transfer.\n\nGet details from user: transaction hash, source chain, destination chain.\n\nCheck status:\n\ncurl -s \"https://li.quest/v1/status?txHash=0xTX_HASH&fromChain=1&toChain=137\"\n\n\nInterpret and report status:\n\nNOT_FOUND — Transaction not yet indexed. Wait a minute and retry.\nPENDING — Transfer in progress. Suggest polling every 30 seconds.\nDONE with substatus COMPLETED — Transfer complete. Report destination tx hash.\nDONE with substatus PARTIAL — User received the bridged token on the destination chain but NOT the final target token (e.g., got USDC.e instead of native USDC). The user may need to swap manually.\nDONE with substatus REFUNDED — Transfer failed and funds were returned to the source address.\nFAILED — Transfer failed. Report error details and advise the user to check the source chain tx on a block explorer.\n\nIf PENDING: Offer to poll periodically. Wait 30 seconds between checks.\n\nWorkflow 4 — Zap (Contract Call Composition)\n\nUse for multi-step DeFi operations like \"bridge ETH to Polygon and deposit into Aave\" or \"swap to USDC and stake in a vault.\"\n\nUnderstand the multi-step operation — identify:\n\nSource chain/token/amount\nDestination chain/token (the intermediate token before contract calls)\nTarget contract and function to call on the destination\n\nGather contract call data:\n\ntoContractAddress: The destination contract (e.g., Aave lending pool)\ntoContractCallData: ABI-encoded function call (e.g., deposit(address,uint256,address,uint16))\ntoContractGasLimit: Gas limit for the contract call (e.g., \"200000\")\n\nRequest zap quote:\n\ncurl -s -X POST \"https://li.quest/v1/quote/contractCalls\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"fromChain\": \"1\",\n    \"toChain\": \"137\",\n    \"fromToken\": \"0x0000000000000000000000000000000000000000\",\n    \"toToken\": \"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174\",\n    \"fromAddress\": \"0xWALLET\",\n    \"fromAmount\": \"1000000000000000000\",\n    \"contractCalls\": [{\n      \"toContractAddress\": \"0xTARGET\",\n      \"toContractCallData\": \"0xENCODED_CALL\",\n      \"toContractGasLimit\": \"200000\"\n    }]\n  }'\n\n\nPresent summary showing all operations in the zap (bridge + swap + deposit/stake/etc.).\n\nReturn transactionRequest for signing.\n\nWorkflow 5 — Discovery\n\nUse when the user asks \"what chains are supported?\", \"what tokens can I swap?\", \"what bridges are available?\", etc.\n\nDetermine what the user wants to know:\n\nSupported chains → GET /v1/chains\nTokens on a chain → GET /v1/tokens?chains={chainId}\nToken details → GET /v1/token?chain={chainId}&token={symbol}\nAvailable routes → GET /v1/connections?fromChain={id}&toChain={id}\nAvailable bridges/DEXes → GET /v1/tools\nGas prices → GET /v1/gas/prices or GET /v1/gas/suggestion/{chainId}\n\nCall the appropriate endpoint.\n\nPresent results in a readable table format. For large responses (e.g., all tokens), summarize the most relevant results and offer to filter further.\n\nSafety Protocol\n\nThese rules are mandatory — never skip them.\n\nAddress Validation\nALWAYS verify fromAddress is a valid hex address: starts with 0x, 42 characters total, valid hex characters\nNEVER send to the zero address (0x0000000000000000000000000000000000000000) as toAddress — this burns funds permanently. The zero address is ONLY valid as a fromToken/toToken to represent native tokens.\nAmount Validation\nALWAYS convert human-readable amounts to the token's smallest unit before calling the API\nCheck the token's decimals field (ETH=18, USDC=6, WBTC=8, DAI=18)\nFormula: amount_wei = human_amount × 10^decimals\nAmounts must be positive integers (no decimals, no negatives, no zero)\nMaximum 78 digits (uint256 max)\nIf the user says \"1 ETH\", send 1000000000000000000, NOT 1\nSlippage Validation\nDefault to 0.03 (3%) if the user doesn't specify\nWARN the user if slippage > 3% — explain they may receive significantly fewer tokens\nREJECT slippage > 50% (0.5) — this is almost certainly an error\nSlippage must be between 0 and 1 (0% to 100%)\nERC20 Token Approvals\nALWAYS check token allowance before executing ERC20 swaps\nIf allowance < fromAmount, guide the user to approve the token first\nNEVER approve unlimited amounts (MaxUint256 / 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) unless the user explicitly requests it — approve only the needed amount\nThe spender address is transactionRequest.to from the quote response\nTransaction Presentation\nALWAYS present a human-readable summary before returning any transactionRequest data\nThe summary must include: tokens and amounts, route/bridge used, estimated fees, estimated time, slippage setting\nNEVER return raw transaction data without explanation\nCross-Chain Safety\nExplain that cross-chain bridges are non-atomic — funds may be in transit for minutes to hours\nAfter submitting a source chain tx, always offer to track the transfer status\nIf a transfer shows PARTIAL status, explain the user received bridged tokens but not the final target token\nNo Route Found\nIf a quote returns no route: suggest trying different tokens, a smaller amount, or an alternative chain pair\nUse GET /v1/connections to verify the route is supported before retrying\nError Handling\nError\tCause\tAction\nHTTP 429\tRate limited\tWait 30s, retry with exponential backoff (30s → 60s → 120s). Suggest user set LIFI_API_KEY for higher limits.\nNo route found\tRoute unsupported or amount too small/large\tCheck /v1/connections for valid pairs. Suggest different tokens, smaller amount, or alternative chains.\nSlippage error\tPrice moved beyond tolerance\tIncrease slippage (e.g., 0.03 → 0.05) and retry. Warn user about the trade-off.\nInsufficient balance\tWallet lacks funds\tReport the shortfall amount. Check balance with the agent's wallet tools.\nTransaction reverted\tPrice moved, liquidity drained, or gas too low\tExplain possible causes. Suggest retrying with higher slippage or gas.\nPARTIAL completion\tBridge delivered token but not final swap\tUser has the bridged asset on the destination chain. They can swap it manually or retry.\nREFUNDED\tBridge failed, funds returned\tConfirm refund on source chain. Suggest trying a different bridge via allowBridges.\nInvalid address\tMalformed hex address\tVerify address format: 0x prefix, 42 characters, valid hex.\nChain Quick Reference\nChain\tID\tNative Token\nEthereum\t1\tETH\nPolygon\t137\tMATIC\nArbitrum One\t42161\tETH\nOptimism\t10\tETH\nBSC\t56\tBNB\nBase\t8453\tETH\nAvalanche\t43114\tAVAX\nFantom\t250\tFTM\nzkSync Era\t324\tETH\nGnosis\t100\txDAI\nScroll\t534352\tETH\nLinea\t59144\tETH\nBlast\t81457\tETH\nMode\t34443\tETH\nSolana\t1151111081099710\tSOL\n\nFor the full list of supported chains, call GET /v1/chains.\n\nNative token address on all EVM chains: 0x0000000000000000000000000000000000000000"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/rhlsthrm/lifi-crosschain",
    "publisherUrl": "https://clawhub.ai/rhlsthrm/lifi-crosschain",
    "owner": "rhlsthrm",
    "version": "1.0.2",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/lifi-crosschain",
    "downloadUrl": "https://openagent3.xyz/downloads/lifi-crosschain",
    "agentUrl": "https://openagent3.xyz/skills/lifi-crosschain/agent",
    "manifestUrl": "https://openagent3.xyz/skills/lifi-crosschain/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/lifi-crosschain/agent.md"
  }
}