Description
Motivation
Currently, the yield server aggregates pools from various categories, such as variable-rate lending pools, fixed-rate lending protocols, and others. This results in a lack of clarity for users, as comparing pools with fundamentally different structures is mixing apples and oranges.
While users can theoretically do their own research to understand the differences between these pools, this is unrealistic as the DeFi ecosystem grows in complexity.
The filters available on https://swap.defillama.com/?tab=earn are not enough to help users through the decision-making process.
To address this limitation, we propose including richer metadata about pools so they can analyze and compare them more effectively on the frontend.
Proposed solution
- Introduce an optional
type
field to thePool
struct to categorize pools based on their characteristics. This will enable better comparison of similar pools across different protocols and facilitate more informed user decisions. - Introduce an optional
duration
field to thePool
struct to better reflect the yield of fixed-rate protocols, which is currently impossible to do with the aggregated basket
type Type =
| 'VARIABLE_RATE_LENDING'
| 'FIXED_RATE_LENDING'
| 'YIELD_FARMING'
| 'CONCENTRATED_LIQUIDITY'
| 'OTHER'
export interface Pool {
// Existing data
pool: string;
chain: string;
project: string;
// ...
// New fields
type?: Type;
duration?: number;
}
This could be used by fixed-rate lending protocols such as @SizeCredit to convey fixed-rate APYs for different durations/tenors/maturities