1k-defi-module-integration

Integrate new DeFi modules into OneKey with standardized Earn, Borrow, and standalone patterns.

Updated Apr 15, 2026
One-click install
npx skills add https://github.com/wanghaisheng/web3-scaffold-app-monorepo --skill 1k-defi-module-integration
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: 1k-defi-module-integration
Source: https://github.com/wanghaisheng/web3-scaffold-app-monorepo/tree/main/.claude/skills/1k-defi-module-integration
Command: npx skills add https://github.com/wanghaisheng/web3-scaffold-app-monorepo --skill 1k-defi-module-integration

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Integrating new DeFi modules into OneKey traditionally requires stitching together disparate patterns for Earn, Borrow, and bespoke stand-alone modules. This Skill provides a unified blueprint to streamline provider integration, data orchestration, and routing so teams can add protocols consistently and safely.

Core Features & Use Cases

  • Standardized patterns for Earn, Borrow, and entirely new modules, including Home, DataGate, and modal routing.
  • Reusable architecture primitives: data management with IAsyncData, refresh strategies, PendingBridge, and tag-based pending tracking.
  • Real-world use cases: adding a staking protocol to Earn, integrating a lending market under Borrow, or building a completely new module with its own tab and routes.

Quick Start

Define the module with a Home, a DataGate, a ManagePosition modal, and routing, then implement state management and a PendingBridge per the guide.

Frequently Asked Questions about 1k-defi-module-integration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate a new DeFi protocol into OneKey Earn?

To integrate a new DeFi protocol into OneKey Earn, you apply standardized module patterns including a Home page, a DataGate for data orchestration, and a PendingBridge for pending state. This enforces consistent state management using IAsyncData and tag-based transaction tracking.

What architecture is required to add a lending market to OneKey Borrow?

Adding a lending market to OneKey Borrow requires a Home page, a DataGate for orchestration, modal and tab routing, and a PendingBridge. You must also implement a consistent state management approach using IAsyncData and refresh handling for the new module.

Can I build a completely standalone DeFi module with its own tab and routes in OneKey?

Yes, you can build a standalone DeFi module with its own tab and routes in OneKey. This requires defining a Home page, a DataGate, a ManagePosition modal, and routing, then implementing state management and a PendingBridge per the integration guide.

What is the best way to manage pending transactions when adding DeFi modules to OneKey?

The best way to manage pending transactions in OneKey DeFi modules is using a PendingBridge with tag-based transaction tracking. This provides a standardized approach to handle pending state across Earn, Borrow, and standalone modules.

How does DataGate orchestration work in OneKey DeFi module integration?

DataGate orchestration in OneKey DeFi module integration coordinates data flow for new protocols. It works alongside the Home page and ManagePosition modal to enforce a consistent state management approach using IAsyncData and refresh handling across Earn, Borrow, and standalone modules.

Does OneKey DeFi module integration support TypeScript?

Yes, OneKey DeFi module integration supports TypeScript for adding protocols to Earn, Borrow, or building standalone modules. It provides standardized TypeScript patterns for routing, data orchestration, and state management using IAsyncData and PendingBridge.