apply_abnormal_value_checks

Documentation for eth_defi.research.vault_metrics.apply_abnormal_value_checks function.

apply_abnormal_value_checks(risk, notes, flags, current_nav=None, current_share_price=None, three_months_volatility=None)

Check for broken vaults by detecting abnormal metric values.

Automatically blacklists vaults with unrealistic TVL, share price, or volatility. These thresholds catch broken smart contracts and low-TVL vaults that produce meaningless metrics.

Called multiple times as more metrics become available (first with NAV/price, then again after 3M volatility is computed).

Parameters
  • risk (eth_defi.vault.risk.VaultTechnicalRisk) – Current risk classification.

  • notes (str) – Current notes string.

  • flags (set[eth_defi.vault.flag.VaultFlag]) – Current vault flags set.

  • current_nav (Optional[float]) – Current TVL in USD. Checked against MAX_VALID_NAV.

  • current_share_price (Optional[float]) – Current share price. Checked against MAX_VALID_SHARE_PRICE.

  • three_months_volatility (Optional[float]) – 3-month annualised volatility. Checked against MAX_VALID_VOLATILITY. Catches low-TVL Hyperliquid vaults with one or few trades that produce extreme volatility numbers.

Returns

Updated (risk, notes, flags) tuple.

Return type

tuple[eth_defi.vault.risk.VaultTechnicalRisk, str, set[eth_defi.vault.flag.VaultFlag]]