Skip to content

usage-meter: support multiple settlement assets #71

Description

@joelpeace48-cell

Problem

Pricing implicitly assumes a single asset. Real buyers will want to settle in a
stablecoin (USDC on Stellar), some in XLM, and enterprise contracts may be
denominated in fiat terms even when settled in crypto. A single-asset assumption
baked into the rate model is expensive to remove later.

What to do

  • Rates carry the asset they are denominated in.
  • Support a denomination asset distinct from the settlement asset, with an
    explicit conversion step.
  • If conversion uses an oracle, treat that as a trust assumption and document
    it: which oracle, what staleness bound, what happens when it is unavailable.
    Prefer failing closed over settling at a stale rate.
  • Per-payer preferred settlement asset.

Acceptance criteria

  • Rates are asset-denominated
  • Denomination and settlement assets can differ
  • Oracle dependency documented with staleness bounds and a failure mode
  • Tests cover a stale or unavailable oracle

Notes

An oracle is a new trust assumption in a protocol whose value is
trustlessness — introduce it deliberately and say so publicly, or avoid it by
requiring rates to be denominated in the settlement asset.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions