Integration Models
Darex supports three integration patterns to fit different use cases and technical requirements:Model 1: Direct Blockchain Integration
Best For
DeFi protocols, wallets, and dApps that want full control over transactions
Overview
- Integration: Direct smart contract calls via Web3 library
- Custody: User’s self-custody wallet (MetaMask, Coinbase Wallet, etc.)
- Automation: None - user signs every transaction
- Complexity: Medium
Key Features
Full Control
Complete control over transaction parameters and execution
Self-Custody
Users maintain full custody of their assets
No API Keys
No need for API authentication
On-Chain Only
All logic executed on-chain
Use Cases
- DeFi protocols accepting deposits in any token
- Wallet applications offering yield strategies
- dApps with existing Web3 integration
- Smart contract-based automated strategies
Getting Started
1
Install Web3 Library
2
Connect User Wallet
3
Call Smart Contracts
Full Guide
Read the complete Direct Blockchain Integration guide
Model 2: API + External Wallets
Best For
Exchanges, platforms, and services with existing wallet infrastructure
Overview
- Integration: REST API for discovery + smart contracts for execution
- Custody: User’s self-custody wallet
- Automation: None - user must be online to sign
- Complexity: Medium-High
Key Features
Instrument Discovery
Query available instruments via API
Rich Metadata
Access APY, TVL, historical data
Self-Custody
Users maintain control of assets
Hybrid Approach
Best of API and blockchain
Use Cases
- Centralized exchanges offering DeFi yield
- Investment platforms with portfolio management
- Financial advisors providing DeFi access
- Applications with custom UX requirements
Getting Started
Full Guide
Read the complete API Integration guide
Model 3: API + Embedded Wallets
Best For
AI agents, robo-advisors, fintechs, and automated yield strategies
Overview
- Integration: REST API + Privy embedded wallets
- Custody: User (via non-custodial embedded wallet)
- Automation: Yes - session keys enable automated trading
- Complexity: High
Key Features
Full Automation
Execute trades 24/7 without user interaction
Session Keys
Time-limited, amount-limited permissions
Non-Custodial
User owns the private key (via Privy)
Seamless UX
No wallet installation required
Use Cases
- AI-powered yield optimizers
- Robo-advisors with automated rebalancing
- Fintechs offering DeFi savings accounts
- Telegram/Discord bots with trading capabilities
- Recurring DCA (Dollar Cost Averaging) strategies
Getting Started
1
Set Up Privy
2
Create Embedded Wallet
3
Create Session Key
4
Automate Deposits
Full Guide
Read the complete Embedded Wallets Integration guide
Comparison Matrix
| Feature | Model 1: Direct | Model 2: API + Wallet | Model 3: Embedded |
|---|---|---|---|
| Control | Full | Full | Delegated |
| Automation | ❌ No | ❌ No | ✅ Yes |
| Custody | Self-custody | Self-custody | Non-custodial |
| User Experience | Wallet required | Wallet required | No wallet needed |
| Complexity | Medium | Medium-High | High |
| Instrument Discovery | Manual | ✅ API | ✅ API |
| Historical Data | ❌ No | ✅ API | ✅ API |
| 24/7 Trading | ❌ No | ❌ No | ✅ Yes |
| Best For | dApps, wallets | Exchanges, platforms | AI agents, robo-advisors |
Architecture Decision Tree
1
Do you need automated trading?
Yes → Model 3: Embedded WalletsNo → Continue to next question
2
Do you need instrument discovery or analytics?
Yes → Model 2: API + External WalletsNo → Model 1: Direct Blockchain
3
Do you have existing wallet infrastructure?
Yes → Model 2: API + External WalletsNo → Consider Model 3 for better UX
4
Is your application a dApp or protocol?
Yes → Model 1: Direct BlockchainNo → Model 2 or 3 depending on automation needs
Hybrid Approaches
You can combine multiple models:Model 1 + 2: Direct + API
Model 1 + 2: Direct + API
Use API for discovery and metadata, direct contracts for execution:Benefits: Rich discovery + full control
Model 2 + 3: API + Both Wallet Types
Model 2 + 3: API + Both Wallet Types
Support both external and embedded wallets:Benefits: Flexibility for different user types