Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REQUEST: Separate pools by category #1678

Open
aviggiano opened this issue Jan 3, 2025 · 1 comment
Open

REQUEST: Separate pools by category #1678

aviggiano opened this issue Jan 3, 2025 · 1 comment

Comments

@aviggiano
Copy link

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

  1. Introduce an optional type field to the Pool 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.
  2. Introduce an optional duration field to the Pool 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

@slasher125
Copy link
Collaborator

gm, is a good suggestion. i'll have a think about the actual categories

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants