Skip to content

Support Multi-Result Oracle Keys #117

@hman38705

Description

@hman38705

issues : 9

Great issue: Support Multi-Result Oracle Keys

Description
get_oracle_result uses a hardcoded sub-index 0 for storing results: OracleData::Result(market_id, 0). This restricts the system to only one oracle result per market forever, preventing multi-oracle aggregation or historical retrieval.

Requirements and context

  • Incorporate an oracle_id or version into the OracleData key structure.
  • Allow querying different outcomes by their respective oracle sources.

Suggested execution

  • Fork the repo and create a branch: git checkout -b fix/issue-9-oracle-indexing
  • Refactor oracle storage mapping.

Implementation changes

  • Modify oracles.rs (around line 89) to replace the hardcoded index with a parameter.

Test and commit

  • Verify that multiple oracles can successfully post data to the same market without collisions.

Example commit message
fix: implement flexible oracle result indexing per market

Guidelines

  • Extensibility for future tiered oracle systems.
  • Timeframe: 48 hours.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions