APY Engine
#Pure-MathYieldIntelligenceforDeFiMarkets
Created on 1st February 2026
•
APY Engine
#Pure-MathYieldIntelligenceforDeFiMarkets
The problem APY Engine solves
Problem & Motivation
DeFi yield data looks simple on the surface, but in practice it is noisy, fragmented, and hard to trust in real time. Raw APY values change every block, differ across chains, and provide no context around risk or stability. Most existing tools either expose this raw data directly or rely on opaque processing, making it difficult for developers and users to reason about yield behavior.
APY Engine was built to solve this gap.
What the System Does
ABY Engine continuously indexes on-chain lending data (currently Aave v3) across multiple EVM chains and converts it into clean, consistent, and explainable yield analytics. Instead of exposing raw rates, the engine applies deterministic smoothing, trend detection, and risk adjustments to produce metrics that are easier to compare and safer to consume.
Why It’s Different
| Problem | APY Engine Approach |
|---|---|
| Highly volatile APYs | Time-aware EMA smoothing |
| No risk context | Volatility & liquidity stress metrics |
| Chain fragmentation | Unified multi-chain view |
| Hard-to-use data | Frontend-ready public API |
flowchart LR On-chain --> Normalize --> Engine --> API --> Dashboard
Challenges we ran into
Challenges & Hurdles Faced
Building ABY Engine involved several practical and conceptual challenges, especially while moving from an idea to a production-ready system.
The first major hurdle was understanding DeFi yield mechanics themselves. Concepts like APY, liquidity rates, compounding behavior, and protocol-specific representations (such as ray units in Aave) required deep research before any meaningful analytics could be built.
The second challenge was engine design over-engineering. Early versions of the engine included decision and confidence states inside the core logic. While theoretically interesting, they added unnecessary complexity, reduced clarity, and made the engine harder to reason about. After testing, this section was removed in favor of a simpler, more deterministic core.
A significant portion of development time went into testing and debugging the engine. Many logical bugs only surfaced during long manual simulations and edge-case testing, leading to multiple refinements in state handling and time-based calculations.
Another major hurdle was on-chain data ingestion and API exposure. Fetching live blockchain data, normalizing it, and serving it reliably as a public API required careful research. This was ultimately solved by refining the indexing layer and deploying the service on Render as a long-running backend.
We also encountered a CORS configuration issue that initially prevented the API from being publicly accessible, which was resolved through backend fixes. Finally, there were several frontend integration challenges, all of which were gradually addressed through iteration and testing.
Tracks Applied (1)
Web3/Defi Track
Lucidly Finance
