Skip to content

feat: implement oracle fallback and resolution timeout with refund #251

@greatest0fallt1me

Description

@greatest0fallt1me

Description:

Implement fallback oracle support and a resolution timeout; if primary oracle fails or timeout is reached, use fallback or trigger refund path.

Requirements and Context:

  • Must be secure, tested, and documented
  • Should allow configurable primary and fallback oracle per event
  • Should allow resolution timeout (e.g., max time after event end to get oracle result)
  • Should attempt fallback when primary fails; if both fail or timeout, allow admin refund or auto-refund
  • Should emit events for fallback use and timeout
  • Must not double-resolve or double-refund

Suggested Execution:

  1. Fork the repo and create a branch

    git checkout -b feature/oracle-fallback-timeout
  2. Implement changes

    • Write contract: src/lib.rs (resolve with fallback, timeout check)
    • Update oracles module: src/oracles.rs (fallback client)
    • Update types, storage, events
    • Add documentation and NatSpec-style comments
  3. Test and commit

    • Run tests; cover primary fail, fallback success/fail, timeout, refund
    • Include test output and security notes

Example Commit Message:

feat: implement oracle fallback and resolution timeout with refund

Guidelines:

  • Minimum 95 percent test coverage
  • Clear documentation
  • Timeframe: 96 hours

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions