internet-court/internet-court-skill / vendored/okx/okx-defi
okx-defi
VerifiedOKX-aggregated DeFi (no specific DApp named) — product discovery, deposit/withdraw/claim execution, AND positions viewing. **If the user names ANY third-party protocol/DApp (Aave, Lido, PancakeSwap, Uniswap, Curve, Compound, Morpho, Pendle, Kamino, Raydium, Hyperliquid, Polymarket, …), route to okx-dapp-discovery — NOT here, even for 'show my Aave positions'.** INVEST triggers: 'invest in DeFi', 'earn yield', 'find best APY', 'deposit/stake for yield', 'search DeFi products', 'redeem/withdraw position', 'claim DeFi rewards', 'borrow against asset', 'repay loan', 'add/remove CLMM liquidity', 'APY/TVL history', 'depth chart', yield farming, lending, staking, liquidity pools. PORTFOLIO triggers: 'check my DeFi positions', 'view DeFi holdings/portfolio', 'my staking/lending positions', 'DeFi balance', 'DeFi 持仓', '我的DeFi资产'. Do NOT use for: DEX swaps (okx-agentic-wallet), token prices (okx-dex-market), wallet token balances (okx-agentic-wallet).
| File | Kind | Size |
|---|---|---|
| LICENSE | other | 341 B |
| SKILL.md | skill md | 5.7 KB |
| _shared/preflight.md | markdown | 2.0 KB |
| references/invest-cli-reference.md | markdown | 27.3 KB |
| references/invest-troubleshooting.md | markdown | 1.8 KB |
| references/invest.md | markdown | 13.3 KB |
| references/portfolio-cli-reference.md | markdown | 2.8 KB |
| references/portfolio-troubleshooting.md | markdown | 1.4 KB |
| references/portfolio.md | markdown | 6.6 KB |
references/invest-troubleshooting.md
View on GitHub# Capability: Invest — Troubleshooting
Error codes and failure handling for deposit / withdraw / claim flows. Operational flow lives in `invest.md`; parameter schemas in `invest-cli-reference.md`.
## Error Codes
| Code | Scenario | Handling |
|------|----------|----------|
| 84400 | Parameter null | Check required params — partial exit needs `--amount` or `--ratio` |
| 84021 | Asset syncing | "Position data is syncing, please retry shortly" |
| 84023 | Invalid expectOutputList | CLI auto-constructs from position-detail; retry or pass `--platform-id` |
| 84014 | Balance check failed | Insufficient balance — check with `okx-agentic-wallet` |
| 84018 | Balancing failed | V3 balancing failed — adjust price range or increase slippage |
| 84010 | Token not supported | Check supported tokens via `defi detail` |
| 84001 | Platform not supported | DeFi platform not supported |
| 84016 | Contract execution failed | Check parameters and retry |
| 84019 | Address format mismatch | Address format invalid for this chain |
| 50011 | Rate limit | Wait and retry |
## Common Failure Patterns
- **Calldata generated but broadcast fails on-chain**: the position changed between `position-detail` and the write call (another withdraw/claim landed first). Re-run `defi position-detail` and regenerate — never reuse stale calldata.
- **Solana calldata expired**: base58 VersionedTransaction blockhash expires in ~60 s. If signing took too long, regenerate the calldata; do not retry the expired payload.
- **`--amount` rejected**: amount must be an integer in minimal units (userAmount × 10^tokenPrecision). A decimal or UI-unit value triggers parameter errors (84400).
- **Rate limit (50011)**: wait 1–2 s and retry once; if it persists, tell the user the service is rate-limiting.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |