Payments
MVP payments use prepaid credits in PaymentVault.
Flow (per call)
- Consumer approves
PaymentVaultto spend OLYMP. - Consumer deposits credits on-chain.
- Gateway verifies request signature + nonce.
- Gateway calls
consumeCredits(consumer, cost, requestId). - 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
epochIdandusageIdso 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.