Okx Defi

作者 okxcfbb0bafa718MIT收录于 2026年10月8日更新于 2026年10月8日

Discover and manage OKX-aggregated DeFi products and positions across protocols and chains. Use for generic or venue-agnostic yield, APY, or TVL discovery and history; DeFi deposits, staking, liquidity, withdrawals, rewards, lending, CLMM analysis; and DeFi portfolio or position views. Requests targeting a named protocol belong to DApp discovery. Triggers include earn yield, best APY, DeFi product, APY/TVL history, deposit, stake, withdraw, redeem, provide or remove liquidity, claim rewards, borrow or repay, CLMM, V3 liquidity charts, DeFi portfolio, and DeFi holdings.

仅含说明Business & Finance
AI 生成的概览

通过 onchainos defi CLI 发现并管理 OKX 聚合的跨协议、跨链 DeFi 产品与持仓。

功能
该技能将 DeFi 请求路由到相应参考文件,并驱动 onchainos defi CLI 命令组来发现收益产品、查看 APY 与 TVL 历史,以及管理存入、质押、流动性、赎回、奖励和借贷持仓。它还能生成 DeFi 投资组合和单协议持仓视图,并在用户未提供钱包地址时从 Agentic Wallet 解析地址。该技能仅为说明文档,不附带脚本。
适用场景
适用于与具体场所无关的收益、APY 或 TVL 发现与历史查询,DeFi 存入、质押、提供或移除流动性、领取奖励、借款与还款、CLMM 分析,以及 DeFi 投资组合或持仓视图。针对指定第三方协议、代币行情和现货兑换的请求会被路由到其他技能。
运行要求
需要 onchainos defi CLI 以及用于地址解析和登录的 OKX Agentic Wallet;隐含需要访问 OKX 服务的网络连接。不附带脚本,技能仅包含说明与参考文档。

OKX DeFi

Discover and manage multi-chain, OKX-aggregated DeFi products and positions through the onchainos defi CLI group.

Preflight

Preflight checks: At the start of each thread, complete the checks in ../okx-agentic-wallet/_shared/preflight.md. If missing, read _shared/preflight.md.

Intent Routing

Load only the reference files required by the selected route.

User IntentReference
Discover / search DeFi products, find best APYinvest.md [blocked]
Product detail (APY, TVL, accepted tokens)invest.md [blocked]
Deposit / stake / provide liquidityinvest.md [blocked]
Withdraw / redeem a position (full or partial)invest.md [blocked]
Claim rewards (platform / investment / V3 fee / bonus / unlocked principal)invest.md [blocked]
APY history, TVL history, V3 depth / price chartsinvest.md [blocked]
View DeFi positions / holdings overviewportfolio.md [blocked]
Per-protocol position detailportfolio.md [blocked]
Exact parameters / return schemas — invest, shared support, and charts commandsinvest-cli-reference.md [blocked]
Exact parameters / return schemas — positions commandsportfolio-cli-reference.md [blocked]
Errors / failed deposits / expired calldatainvest-troubleshooting.md [blocked]
Errors / empty positions / address-format issuesportfolio-troubleshooting.md [blocked]

Typical flow spans both: view positions (Portfolio) → redeem or claim (Invest). Read both reference files when the request chains them.

Route a named third-party DApp request—including protocol-specific APY, TVL, volume, history, or timeframe analysis—to okx-dapp-discovery. Generic cross-protocol yield/APY/TVL and V3-liquidity analysis stays here. Route token search/price/chart requests to okx-dex-market, and spot swaps, wallet balances, login, contract calls, or transaction broadcasts to okx-agentic-wallet.

Chain Name Support

The CLI resolves chain names automatically (for example, ethereum → 1, bsc → 56, solana → 501). Use the Chain Support table in portfolio.md [blocked] for the DeFi-specific aliases.

Security

Address Resolution

When the user does NOT provide a wallet address, resolve it automatically from the Agentic Wallet before running any defi command:

1. onchainos wallet status          → check if logged in, get active account2. onchainos wallet addresses       → get addresses grouped by chain category:                                       - XLayer addresses                                       - EVM addresses (Ethereum, BSC, Polygon, etc.)                                       - Solana addresses3. Match address to target chain:   - EVM chains → use EVM address   - Solana     → use Solana address   - XLayer     → use XLayer address

Rules:

  • If the user provides an explicit address, use it directly — skip this step
  • If wallet is not logged in, ask the user to log in first (→ okx-agentic-wallet) or provide an address manually
  • If the user says "check all accounts" or "all wallets", use wallet balance --all to get all account IDs, then wallet switch <id> + wallet addresses for each account
  • Always confirm the resolved address with the user before proceeding if the account has multiple addresses of the same type

Address-Chain Compatibility

The --address and chain parameters must be compatible. EVM addresses (0x…) can only query EVM chains; Solana addresses (base58) can only query solana. Never mix them — the API will return error 84019 (Address format error).

  • 0x… address → only pass EVM chains: ethereum,bsc,polygon,arbitrum,base,xlayer,avalanche,optimism,fantom,linea,scroll,zksync
  • base58 address → only pass solana
  • Sui address → only pass sui; Tron address (T…) → only pass tron; TON address → only pass ton
  • If the user wants positions across both EVM and Solana, make two separate calls with the respective addresses

Global Notes

  • The wallet address parameter for ALL defi commands is --address
  • defi positions uses --chains (plural, comma-separated); defi position-detail uses --chain (singular)
  • Before reporting completion, verify the selected command succeeded, apply the output format and safety checks from its routed reference, and report any partial or failed on-chain step explicitly.

来源与署名

来源:okx/onchainos-skills位于skills/okx-defi提交cfbb0ba

许可证: MIT

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架