PluginBench
Skill
Review
Audit score 70

okx-defi

okx/onchainos-skills

Discover and manage OKX-aggregated DeFi products, yields, and positions across multiple chains.

What is okx-defi?

Manage DeFi investments, staking, liquidity, and lending positions across protocols and chains via OKX aggregation. Use this skill to discover yield opportunities, check APY/TVL history, deposit or withdraw funds, claim rewards, and view your DeFi portfolio.

  • Discover and search DeFi products with APY and TVL data across chains
  • Deposit, stake, or provide liquidity to DeFi protocols
  • Withdraw, redeem positions, or claim rewards (platform, investment, V3 fees, bonuses)
  • View DeFi portfolio overview and per-protocol position details
  • Analyze APY/TVL history and V3 liquidity depth charts
  • Support for EVM chains (Ethereum, BSC, Polygon, Arbitrum, Base, etc.), Solana, Sui, Tron, and TON

How to install okx-defi

npx skills add https://github.com/okx/onchainos-skills --skill okx-defi
Prerequisites
  • OKX Agentic Wallet installed and configured
  • Wallet logged in with at least one address (EVM, Solana, Sui, Tron, or TON)
  • Target chain must be compatible with your wallet address type
Claude Code
Cursor
Windsurf
Cline

How to use okx-defi

  1. 1.Resolve your wallet address automatically from the Agentic Wallet (or provide one manually)
  2. 2.Use `onchainos defi invest` commands to discover DeFi products, check APY/TVL, or deposit/stake funds
  3. 3.Use `onchainos defi portfolio` commands to view your positions and holdings across chains
  4. 4.For withdrawals, redemptions, or reward claims, use the appropriate invest command with your position details
  5. 5.Verify command success and review the output before confirming completion

Use cases

Good for
  • Find the best APY across DeFi protocols and deposit funds to earn yield
  • Check your current DeFi holdings and position details across multiple chains
  • Withdraw or redeem a staking or liquidity position and claim accumulated rewards
  • Analyze historical APY and TVL trends to compare DeFi opportunities
  • Manage concentrated liquidity (CLMM/V3) positions and view fee earnings
Who it's for
  • DeFi investors seeking yield optimization across multiple protocols
  • Traders managing liquidity positions and concentrated liquidity strategies
  • Users with multi-chain wallets wanting a unified DeFi portfolio view
  • Anyone researching DeFi products and comparing APY/TVL metrics

okx-defi FAQ

How do I find the best APY across DeFi protocols?

Use the invest commands to search and discover DeFi products. Filter by chain, token, and protocol type to compare APY rates. The skill aggregates OKX-indexed products across multiple protocols.

Can I manage positions on multiple chains at once?

Yes, but you must use the correct address type for each chain. EVM addresses work on Ethereum, BSC, Polygon, etc.; Solana addresses only work on Solana. For multi-chain queries, make separate calls with the appropriate address and chain.

What happens if my wallet is not logged in?

The skill will prompt you to log in via the Agentic Wallet or provide a wallet address manually. Use `onchainos wallet status` to check login status.

How do I claim rewards from my DeFi positions?

Use the invest claim-rewards command with your position details. The skill supports platform rewards, investment rewards, V3 fee claims, bonuses, and unlocked principal.

What should I do if I get an address format error?

Verify that your address type matches the target chain: `0x…` addresses are EVM-only, base58 addresses are Solana-only. Never mix address types with incompatible chains.

Full instructions (SKILL.md)

Source of truth, from okx/onchainos-skills.


name: okx-defi description: "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." license: MIT metadata: author: okx version: "4.6.3" homepage: "https://web3.okx.com"

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.