apply_bad_flag_check
Documentation for eth_defi.research.vault_metrics.apply_bad_flag_check function.
- apply_bad_flag_check(risk, notes, flags)
Blacklist vaults that carry scanned bad flags.
Scan-time flags may come from protocol adapters and are not visible to
get_vault_risk(), which only checks the static manual flag table. Any flag listed ineth_defi.vault.flag.BAD_FLAGSmeans the vault must not be exported as a normal investable row.- Parameters
risk (Optional[eth_defi.vault.risk.VaultTechnicalRisk]) – Current risk classification.
notes (Optional[str]) – Current note, if any. Existing notes are preserved.
flags (set[eth_defi.vault.flag.VaultFlag]) – Scan-time and manual flags collected for the vault.
- Returns
Updated risk, notes, and flags.
- Return type
tuple[eth_defi.vault.risk.VaultTechnicalRisk | None, str | None, set[eth_defi.vault.flag.VaultFlag]]