apply_sticky_export_state

Documentation for eth_defi.vault.top_vaults_json.apply_sticky_export_state function.

apply_sticky_export_state(lifetime_data_df, state, *, now, threshold_tvl, stale_warning_age_days)

Apply append-biased sticky export state to lifetime metrics.

Current rows passing the peak TVL filter qualify a vault forever. Later missing, stale, below-threshold, or structurally incomplete rows do not make a previously qualified vault disappear unless exact blacklist/invalid-fallback suppression applies.

Parameters
  • lifetime_data_df (pandas.DataFrame) – Calculated lifetime metrics.

  • state (dict) – Mutable sticky export state.

  • now (datetime.datetime) – Current naive UTC datetime.

  • threshold_tvl (float) – Active peak TVL export threshold.

  • stale_warning_age_days (int) – Warning age in days.

Returns

Final vault rows, mutated state, and counters.

Return type

eth_defi.vault.top_vaults_json.StickyExportResult