How It Works
How the Enterprise API Service Works
Yecho's service runs as a delegated backend for your dApp, computing and storing user-specific yield data on-chain. Here's the step-by-step process:
1. User Address Discovery
To start tracking, Yecho needs the addresses of users interacting with your products (e.g., holders of your tokens or positions in your smart contracts). We offer two main options (both fully supported):
Option 1 : Provide us with user addresses via a secure write endpoint. This approach is optimal for privacy, user consent, and efficiency no unnecessary on-chain scans. Alternatively, you can provide a CSV export of holders.
Option 2 (If public data): If your contracts are fully on-chain and public (e.g., via holders queries), Yecho can scan them periodically. This works well for smaller/static user bases, but increases RPC usage (higher costs). We can discuss during onboarding to choose the best fit for your setup.
2. On-Chain Data Reading & Calculations
Yecho queries your smart contracts on-chain to fetch user balances (e.g., positions in Aave, Morpho, etc.).
If no prior balance is known: We record the initial snapshot.
If a balance exists: We calculate the gain from the position (yield income) or cost from borrow since the last snapshot, using precise on-chain math.
Default Refresh Rate: Once per day (customizable snapshot time, e.g., you can choose midnight UTC, 8 AM UTC, or any hour that suits your users/timezone).
Customizable: Upgrade to higher frequencies (e.g., hourly or every 6h) for real-time updates throughout the day. This ensures users see intra-day changes, but increases RPC usage and pricing.
All data is stored securely in our backend (encrypted, compliant storage).
3. Data Retrieval via Endpoint
Once calculated, integrate directly into your frontend:
User Income Endpoint:
Call our endpoint:
GET https://api-XXX.yecho.app/api/users/{USER_ADDRESS}/incomeSupports filters:
?chain=ethereum&token=USDC&start_date=2025-01-01&end_date=2025-12-31Returns full history of incomes.Response: JSON with full history:
User Positions/Deposits Endpoint:
Call our endpoint: GET https://api-XXX.yecho.app/api/users/{USER_ADDRESS}/deposits
Supports similar filters: ?chain=ethereum&token=USDC
Returns known positions, balances tracked by Yecho.
Easy to integrate into your frontend no extra logic needed.
Optional Dashboard Add-On
The core service is endpoint-only (plug-and-play for most dApps). However, if you want more visibility: We can deploy a simple admin dashboard showing:
Timer to next snapshot
Number of active users tracked
Total yields generated by your users (aggregated anonymized)
Usage stats (RPC calls, etc.)
Last updated