DeFi yield monitor
Crypto · sample build
A monitor that compares yields across lending protocols after gas, slippage and smart-contract risk.
| Protocol | APY | Cost to move | Net, 30 days |
|---|---|---|---|
| Aave v3 | 5.74% | $54 | −$87 |
| Compound v3 · current | 6.57% | — | — |
| Spark | 3.85% | $53 | −$165 |
| Morpho Blue | 3.41% | $27 | −$157 |
| Fluid | 3.61% | $56 | −$178 |
The problem
Headline yields across DeFi protocols ignore gas costs and risk. Moving funds by hand was slow and often not worth it.
The approach
Indexed protocol rates on-chain, priced each move including gas and slippage, scored protocol risk, and proposed rebalances only when the net gain cleared a threshold.
How it was tested
Proposed moves were replayed against historical on-chain rates and gas prices to check that the projected net gain matched what a move would really have earned. The risk scores were reviewed by hand for every protocol before it was allowed into the monitor.
What was handed over
Rate indexer, rebalance proposals with full cost breakdown, risk scoring sheet and alerting.
Stack
- Python
- web3.py
- The Graph
- PostgreSQL