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 in eth_defi.vault.flag.BAD_FLAGS means the vault must not be exported as a normal investable row.

Parameters
Returns

Updated risk, notes, and flags.

Return type

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