partition_due_vault_ids

Documentation for eth_defi.research.metrics_freshness.partition_due_vault_ids function.

partition_due_vault_ids(seen_ids, state, current_tvl_by_id, peak_tvl_by_id, family_by_id, export_threshold_by_id, now, patchable_ids=None)

Split vaults into due (recalculate) and skipped (keep previous record).

See the module docstring for the due rules. The optional patchable_ids precondition is used by the crypto bundle, which has no sticky record replay: a vault may only be skipped when a validated previous export record exists to patch into the output. The stablecoin bundle passes None because its sticky export state replays skipped vaults automatically.

Parameters
Returns

(due_ids, skipped_ids) partitioning seen_ids.

Return type

tuple[set[str], set[str]]