Skip to main content

Payments

MVP payments use prepaid credits in PaymentVault.

Flow (per call)

  1. Consumer approves PaymentVault to spend OLYMP.
  2. Consumer deposits credits on-chain.
  3. Gateway verifies request signature + nonce.
  4. Gateway calls consumeCredits(consumer, cost, requestId).
  5. Gateway returns ADR + signed query receipt.

Flow (epoch batched)

In the epoch mode, gateways track usage off-chain and settle aggregates per epoch. Receipts include EPOCH_BATCHED settlement metadata.

Key properties:

  • Gateways maintain a local usage ledger per consumer and epoch.
  • Settlement submits aggregated consumeCredits(consumer, amount, usageId) calls per epoch (no per-request on-chain calls).
  • Receipts carry epochId and usageId so consumers can match later settlements.
  • Multi-gateway usage is not synchronized in MVP; gateways SHOULD enforce their own credit limits.

Fee collection

Usage fees are collected in ProtocolFeeCollector and routed to:

  • FounderRevenueSplitter (time-limited)
  • EpochRewardDistributor (provider + gateway rewards)
  • Treasury (optional)

If OLYMP fees are available, a governance-controlled burn module may burn a capped share as a supply policy tool. Stablecoin fees are not burned in MVP.

Disclaimers

Payment flows depend on network conditions and protocol configuration. Fees may be zero. No guarantees. Not investment advice.