Earn / DeFi
Use this skill as a map to the owning surface and service contract. Derive
product behavior from current code, server data, and the real runtime.
Quick Start
- Reproduce the real entry and affected platform.
- Trace
entry -> data/position -> action -> transaction -> status -> refresh.
- Find the first owner whose identity, capability, or transition is wrong.
- Reuse a nearby pattern only when its protocol and operation semantics match;
then verify the changed path and a relevant sibling.
Find The Owner
| Task |
Start here |
Read next |
| Earn home, list, recommendation, or detail |
Earn view/state and its service request |
Architecture, Code map |
| Borrow, staking, claim, withdraw, repay, or status |
Operation owner and current service contract |
Operation flow |
| Portfolio position or action |
Position data, supported action, transaction builder |
Portfolio actions |
| Native route, modal, event, or account switch |
Discovery host and runtime owner |
Architecture |
| External protocol website |
Discovery/browser until an App-owned RPC begins |
Architecture |
| Funding handoff to Swap |
DeFi prefill before quote; Swap execution afterward |
$1k-trade-swap-market |
Load Detail As Needed
- Architecture explains surfaces, hosts,
runtimes, and cross-module boundaries.
- Code map gives stable directories and search anchors.
- Operation flow covers operation identity,
setup, transaction, status, and refresh.
- Portfolio actions covers how visible
positions, supported actions, and transaction building join.
- Validation helps choose focused tests and runtime
evidence for the changed layer.
Finish
State the owning surface/service and the identities that matter. Run nearby
tests and repository-required checks, then prove the affected route reaches the
intended terminal and refresh state. Report unavailable runtime or server proof.
Related skills: $1k-trade-swap-market, $1k-state-management,
$1k-cross-platform, $1k-coding-patterns.
1---2name: 1k-defi-module-integration3description: Navigate and implement OneKey App Earn, Borrow, Staking, and DeFi Portfolio flows. Use for protocol data, portfolio actions, transactions, pending/history, refresh, and Earn routes.4---56# Earn / DeFi78Use this skill as a map to the owning surface and service contract. Derive9product behavior from current code, server data, and the real runtime.1011## Quick Start12131. Reproduce the real entry and affected platform.142. Trace `entry -> data/position -> action -> transaction -> status -> refresh`.153. Find the first owner whose identity, capability, or transition is wrong.164. Reuse a nearby pattern only when its protocol and operation semantics match;17 then verify the changed path and a relevant sibling.1819## Find The Owner2021| Task | Start here | Read next |22| --- | --- | --- |23| Earn home, list, recommendation, or detail | Earn view/state and its service request | [Architecture](references/app-architecture.md), [Code map](references/code-map.md) |24| Borrow, staking, claim, withdraw, repay, or status | Operation owner and current service contract | [Operation flow](references/operation-flow.md) |25| Portfolio position or action | Position data, supported action, transaction builder | [Portfolio actions](references/portfolio-actions-guide.md) |26| Native route, modal, event, or account switch | Discovery host and runtime owner | [Architecture](references/app-architecture.md) |27| External protocol website | Discovery/browser until an App-owned RPC begins | [Architecture](references/app-architecture.md) |28| Funding handoff to Swap | DeFi prefill before quote; Swap execution afterward | `$1k-trade-swap-market` |2930## Load Detail As Needed3132- [Architecture](references/app-architecture.md) explains surfaces, hosts,33 runtimes, and cross-module boundaries.34- [Code map](references/code-map.md) gives stable directories and search anchors.35- [Operation flow](references/operation-flow.md) covers operation identity,36 setup, transaction, status, and refresh.37- [Portfolio actions](references/portfolio-actions-guide.md) covers how visible38 positions, supported actions, and transaction building join.39- [Validation](references/validation.md) helps choose focused tests and runtime40 evidence for the changed layer.4142## Finish4344State the owning surface/service and the identities that matter. Run nearby45tests and repository-required checks, then prove the affected route reaches the46intended terminal and refresh state. Report unavailable runtime or server proof.4748Related skills: `$1k-trade-swap-market`, `$1k-state-management`,49`$1k-cross-platform`, `$1k-coding-patterns`.