System Architecture

API Flow Patterns
1. Protocol Data
Retrieve quotes and protocol information using the API. Endpoints:- Fetch available protocols and their current rates
- Get quotes for swaps or yield positions
- Compare rates across different protocols and chains
2. Transaction Data
Request transaction data (bytecode) needed for execution. Endpoints:- Provides the bytecode for executing transactions
- Supports multiple transaction types:
- Cross-chain swaps
- Same-chain swaps
- Yield positions (deposit/withdraw)
3. Sign & Propagate Bytecode
Key Points:- Users sign transactions themselves using their own wallets
- Transaction propagation is handled by the user
- Full custody remains with the user at all times
- Deframe never has access to your private keys or funds
4. Position Monitoring
After transaction execution, Deframe monitors positions and provides updates. Endpoints:- Track wallet activity and positions across chains
- Monitor yield earnings in real-time
- View swap history and transaction status
- Aggregate positions across multiple protocols
5. Alerts & Notifications
Configure alerts and receive notifications for position monitoring. Features:- Webhook notifications - Real-time callbacks to your server
- Transaction status updates - Track cross-chain transaction progress
- Position changes - Monitor yield earnings and balances
- APY change notifications - Get alerted when rates change significantly
6. Integration Features
Additional features to enhance user protection and experience. Available Features:- Multi-provider routing - Automatic selection of best swap provider
- Cross-chain optimization - Best route for bridge transactions
- Real-time APY tracking - Updated protocol rates
- Gas estimation - Accurate gas cost predictions
- Transaction simulation - Pre-execution validation
Rate Limiting
API rate limits ensure fair usage and system stability:
- 100 requests per minute per API key
- 1,000 requests per hour per API key
API Status
Check real-time API uptime and incident history
Error Handling
The API uses standard HTTP response codes:| Code | Meaning | Description |
|---|---|---|
| 200 | Success | Request completed successfully |
| 400 | Bad Request | Invalid parameters or request format |
| 401 | Unauthorized | Invalid or missing API key |
| 404 | Not Found | Resource does not exist |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server-side error occurred |
Key Guarantees
Trustless Operations
No fund custody - you maintain full control of your assets at all times
Position Monitoring
Real-time tracking of your DeFi positions across chains and protocols
Status Notifications
Webhook alerts for transaction status and position updates
Multi-Chain Support
Seamless operations across Ethereum, Base, Optimism, Arbitrum, Solana, Polygon, Gnosis, and Bitcoin
Next Steps
Quickstart Guide
Add yield to your app in 5 minutes
Yield Guides
Deposit, withdraw, and monitor positions
Code Examples
Copy-paste end-to-end strategy deposit
Swaps Guide
Same-chain & cross-chain swap quotes
Read more about Why Deframe and explore our complete code examples.