calculate_vault_rankings

Documentation for eth_defi.research.vault_metrics.calculate_vault_rankings function.

calculate_vault_rankings(results_df, min_tvl_chain_protocol=10000, min_tvl_overall=50000, min_tvl_curator=100, min_tvl_chain_protocol_by_protocol_slug=None)

Calculate rankings for all periods inside PeriodMetrics objects.

Updates PeriodMetrics objects in-place within the period_results lists. Rankings are calculated for all 6 periods (1W, 1M, 3M, 6M, 1Y, lifetime).

Vaults are excluded from rankings if: - They have no CAGR data (zero or NaN) - They have an error_reason set - They are blacklisted (risk == VaultTechnicalRisk.blacklisted) - They are disabled GMX products retained only for historical continuity - Their period TVL is below the applicable ranking threshold

Buoy uses its protocol-specific $500 minimum for every ranking cohort.

Parameters
  • results_df (pandas.DataFrame) – DataFrame from calculate_lifetime_metrics()

  • min_tvl_chain_protocol (float) – Minimum TVL required for chain and protocol rankings (default: $10,000)

  • min_tvl_chain_protocol_by_protocol_slug (Optional[dict[str, float]]) – Per-protocol overrides of min_tvl_chain_protocol, keyed by protocol slug. Defaults to MIN_TVL_CHAIN_PROTOCOL_BY_PROTOCOL_SLUG (Hyperliquid native vaults: $5,000).

  • min_tvl_overall (float) – Minimum TVL required for overall rankings (default: $50,000)

  • min_tvl_curator (float) – Minimum TVL required for curator rankings (default: $100)

Returns

DataFrame with rankings updated in PeriodMetrics objects

Return type

pandas.DataFrame