Skip to content

Staleness detection only emits an event — it does not revert or block downstream usage #26

Description

@Escelit

Description:
get_price detects a stale price (timestamp older than staleness_threshold) and emits a StaleAlert event, but still returns the stale PriceData to the caller. Callers like MortgagePool and PropertyRegistry do not inspect the timestamp themselves. This means liquidation decisions and LTV calculations can be made on hours-old prices with no on-chain protection.

Expected behaviour:
get_price should either panic when the price is stale, or return a result type that forces callers to handle staleness explicitly. A separate get_price_unchecked can be offered for read-only display purposes.

Labels: security, contracts, oracle-adapter, high-priority

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions