Skip to content

Implement TWAP fallback for Oracle price ingestion #832

Description

@nanaf6203-bit

Problem Statement

Median calc fails or sources stall.

Why it matters

Resilience.

Technical Context

Add historical rolling TWAP; fallback when median is undefined.

Expected Outcome

Stable fallback.

Acceptance Criteria

  1. Tests cover stale median.
  2. Kani harness.
  3. SDK.
  4. Docs.

Implementation Notes

New module oracle::twap.

Files or modules likely to be affected

contracts/oracle/src/twap.rs.

Dependencies

None.

Difficulty level

HARD.

Estimated effort

L (~1 week).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions