okx-defi

bởi okx

OKX tổng hợp DeFi (không nêu tên DApp cụ thể) — khám phá sản phẩm, thực hiện gửi/rút/claim, VÀ xem vị thế. **Nếu người dùng nêu tên BẤT KỲ giao thức/DApp bên thứ ba nào (Aave, Lido, PancakeSwap, Uniswap, Curve, Compound, Morpho, Pendle, Kamino, Raydium, Hyperliquid, Polymarket, ...), hãy chuyển hướng đến okx-dapp-discovery — KHÔNG phải ở đây, ngay cả khi họ yêu cầu 'hiển thị vị thế Aave của tôi'.** Các từ khóa kích hoạt INVEST: 'đầu tư vào DeFi', 'kiếm lợi suất', 'tìm APY tốt nhất', 'gửi/stake để hưởng lợi suất', 'tìm kiếm sản phẩm DeFi',...

npx skills add https://github.com/okx/onchainos-skills --skill okx-defi

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
Product detail (APY, TVL, accepted tokens)invest.md
Deposit / stake / provide liquidityinvest.md
Withdraw / redeem a position (full or partial)invest.md
Claim rewards (platform / investment / V3 fee / bonus / unlocked principal)invest.md
APY history, TVL history, V3 depth / price chartsinvest.md
View DeFi positions / holdings overviewportfolio.md
Per-protocol position detailportfolio.md
Exact parameters / return schemas — invest, shared support, and charts commandsinvest-cli-reference.md
Exact parameters / return schemas — positions commandsportfolio-cli-reference.md
Errors / failed deposits / expired calldatainvest-troubleshooting.md
Errors / empty positions / address-format issuesportfolio-troubleshooting.md

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 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 account
2. onchainos wallet addresses       → get addresses grouped by chain category:
                                       - XLayer addresses
                                       - EVM addresses (Ethereum, BSC, Polygon, etc.)
                                       - Solana addresses
3. 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.

Thêm skills từ okx

okx-agent-identity
okx
ERC-8004 trên chuỗi định danh Agent trên XLayer: đăng ký / tạo / cập nhật / kích hoạt / hủy kích hoạt / tìm kiếm agent; xem đánh giá; liệt kê dịch vụ agent; đặt hình đại diện. Vai trò: user (User / User Agent / Buyer / Client / 用户 / 买家 / 买方), asp (ASP / Provider / Provider Agent / Seller / Merchant / 提供者 / 商家 / 服务提供商 / 卖家 / 卖方), evaluator (Evaluator / Evaluator Agent / 仲裁者 / 评估者). Sử dụng cho: 注册agent / 注册ASP / 注册User / 注册用户 / 注册买家 / 注册卖家 / 注册服务提供商 / 注册仲裁者 / 创建用户 / 创建买家 / 创建卖家 / 我的agent / 我的ASP / 改agent / 更新agent...
developmentapi
okx-ai-guide
okx
Giới thiệu & hướng dẫn bắt đầu về OKX.AI (hệ sinh thái Agent). Sử dụng khi người dùng hỏi OKX.AI là gì, có thể làm gì, cách sử dụng hoặc bắt đầu, muốn hướng dẫn / khởi động nhanh / trợ giúp về OKX.AI, hoặc nhập tên sản phẩm dưới bất kỳ biến thể chính tả / khoảng cách / viết hoa / lỗi gõ nào (OKXAI, okx ai, okx-ai, chữ thường okx.ai, gõ sai tiếng Trung như 啥是okxai) — ví dụ: what is OKX.AI / OKX.AI 是什么 / 怎么用 OKX.AI / OKX.AI 快速开始, và bất kỳ diễn giải nào bằng bất kỳ
researchapidocument
okx-agentic-wallet
okx
Nguồn CHÍNH THỨC về OKX Agentic Wallet và tính năng Gas Station của nó. Gas Station = tính năng stablecoin-gas của OKX trên Solana thông qua Relayer bên thứ ba; chỉ Solana, không có EIP-7702. PHẢI gọi cho các câu hỏi về Gas Station (là gì / cách hoạt động / token hỗ trợ / phí / bật hoặc tắt gas station / thay đổi token gas mặc định / tương thích Jito Bundler) VÀ bất kỳ hành động ví nào: đăng nhập, xác minh OTP, thêm/chuyển đổi/trạng thái/đăng xuất tài khoản, số dư, tài sản, nắm giữ, địa chỉ, nạp/nhận/nạp tiền,...
apiweb-scrapingdevelopment
okx-agent-chat
okx
Routing stub — any a2a-agent-chat envelope / agent-task system message is handled by `okx-agent-task`. For missing or uninitialized OKX A2A communication runtime/plugin, read `skills/okx-agent-chat/ensure-okx-a2a-communication-ready.md`.
developmentapicommunication
okx-agent-task
okx
PHẢI KÍCH HOẠT trên các thư đến: (1) {agentId, message:{source:"system", event, jobId, ...}} — sự kiện hệ thống; (2) {msgType:"a2a-agent-chat", jobId, sender:{role}, ...} — chat tác vụ giữa các tác nhân (các trường ở cấp cao nhất; sender.role = ĐỐI TÁC, không phải bạn); (3) chuỗi ký tự "Read okx-agent-task/SKILL.md" trong thư. CŨNG kích hoạt cho các từ khóa: 发布任务 / 创建任务 / 帮我发任务 / publish task / create task / 接任务 / 接单 / 协商 / 验收 / 拒绝 / 仲裁 / dispute / stake / unstake / 修改卖家 / 修改预算 / change provider / change budget...
developmentapicommunication
okx-agent-payments-protocol
okx
We need to translate the given text from English to Vietnamese. The text is inside <text> tags. We must preserve product names, protocol names, URLs, numbers, technical terms. The name "okx-agent-payments-protocol" is not in the source text, so we don't include it. We translate only the text. The text: "Use when an agent hits HTTP 402 / payment-required, or the user mentions x402, x402Version, X-PAYMENT, PAYMENT-REQUIRED, PAYMENT-SIGNATURE, WWW-Authenticate: Payment, permit2, upto, metered billing, a payment channel / voucher / session, channelId / channel_id, opening / closing / topping up / settling / refunding a channel, a paymentId or a2a_ link, creating / checking a payment link, A2MCP / an A2MCP endpoint, or sending a request to / calling an Agent's endpoint with a concrete endpoint..." We need to translate this into Vietnamese, keeping technical terms like HTTP
okx-security
okx
We need to translate the given text from English to Vietnamese. The text is a description of a skill for security scanning. We must preserve the name "okx-security" but it's not in the text, so we don't include it. We translate the entire text inside <text>. No extra labels, no markdown, just the translation. The text includes a list of actions and triggers. We need to translate naturally. For example: "check transaction safety" -> "kiểm tra an toàn giao dịch", "is this transaction safe" -> "giao dịch này có an toàn không", etc. Also "honeypot detection" -> "phát hiện honeypot" (common term). "DApp/URL phishing detection" -> "phát hiện lừa đảo DApp/URL". "message signature safety" -> "an toàn chữ ký tin nhắn". "approval safety checks" -> "kiểm tra an toàn phê duyệt". "token approval management" ->
okx-task-watch
okx
监听任务进展 / 帮我盯着任务 / 任务有动静告诉我 / 历史消息 / 未读消息 / 未决策 / 待决策 / 继续监听 / task watch / user watch / monitor task progress / catch me up on tasks / outstanding decisions — OKX A2A user-session task-notification monitor: live long-poll via `okx-a2a user watch` (also drains backlog of past/missed/unread events on entry) plus un-replied decision_request lister via `okx-a2a user outdated-list`. Not for wallet / gas / task-list / status queries.
developmentapiproductivity