Skip to content

USD-Pegged Expert Rates via Price Oracle #264

@Luluameh

Description

@Luluameh

USD-Pegged Expert Rates via Price Oracle
Background
XLM price volatility makes it hard for experts to quote stable hourly rates. Experts should be able to set rates in USD and have the contract convert at the current XLM/USD rate.
Goal
Integrate a Soroban-compatible price oracle to fetch the current XLM/USD rate at session start and lock it for the session duration.
Acceptance Criteria

  • ExpertProfile.rate_currency field: XLM or USD.
  • start_session fetches oracle price if rate_currency == USD and stores locked_xlm_rate.
  • Streaming math uses locked_xlm_rate for duration of session.
  • Oracle call fails gracefully with Error::OraclePriceUnavailable (falls back to direct XLM rate).
    Key Files
    contracts/src/lib.rs, contracts/src/oracles.rs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions