Skip to Content
⚠️ Alert: Sylan is under active development—only trust contract/wallet addresses announced on our official channels; we will never DM you, ask for funds, or run surprise airdrops/presales.
ConceptsPlans & Pricing

Plans & Pricing

Sylan supports two plan types: Pay‑Per‑Call (PPC) and Subscription. Plans are published by Providers inside the on‑chain AccessRegistry and enforced by APIEscrow at purchase/lock time. This page explains what each plan means, how it’s billed, and how fees are split—keeping contract details for the Contracts section.

Prices are in SYL (ERC‑20, 18 decimals). Fee splits use basis points (BPS) where 10,000 = 100%.


Plan types

1) Pay‑Per‑Call (PPC)

  • When to use: one‑off calls or occasional usage.
  • Billing moment: at lock time, the consumer transfers exactly price SYL into escrow with lockForCall(...).
  • What’s covered: one request identified by requestHash and bound by expiresAtMs.
  • Outcome:
    • Success → escrow settles and splits price across Provider / Node Pool / Platform (see Fee splits).
    • Failure (e.g., NoQuorum, InactiveAPI) → escrow refunds the full amount to the consumer.

2) Subscription

  • When to use: ongoing access, streaming/periodic data.
  • Plan fields:
    • price — total cost for the subscription period
    • duration — seconds covered by the purchase window
    • callLimit — max calls during the period (0 = unlimited)
  • Billing moment: at purchase, the consumer calls purchaseSubscription(apiId) and transfers price SYL.
  • Funds handling: fees are allocated immediately to Provider / Node Pool / Platform for the purchased period.
  • Usage: individual calls under an active subscription do not lock funds per call. Optionally, clients can record usage via registerSubRequest(...) for analytics.
  • Refunds: subscription purchases are final at the protocol level (because funds are allocated upfront). If a Provider disables an API mid‑period, refunds—if any—are handled off‑chain/community policy.

Free plans: a Provider may set price = 0 (trial/preview). Fee splits are moot in this case; requests still follow the normal lifecycle.


Plan discovery (read‑only)

Clients read plan information from AccessRegistry:

  • apiPlan(apiId) → returns the current APIPlan with:
    • accessTypeSubscription or PayPerCall
    • price, duration, callLimit
    • freshness controls used by consensus: maxSkewMs, maxTtlMs
    • consistency flag: seqMonotonic (enforce non‑decreasing seqNo)
    • signing authority: providerSigner
    • activation: isActive
  • descriptorOf(apiId) → metadata {uri, contentHash, updatedAt, version} for off‑chain docs and SDKs.

Max request expiry: requests must set expiresAtMs ≤ now + maxRequestExpiryMs (a protocol safety cap).


Fee splits (BPS)

Every PPC request or subscription purchase takes a fee snapshot at the time of lock/purchase:

platformShare = price * platformBps / 10_000 nodeShare = price * nodeBps / 10_000 providerShare = price * providerBps / 10_000
  • Where do BPS come from?
    • The protocol has default BPS in APIEscrow.
    • A plan may define per‑API overrides (when present, escrow snapshots those instead of defaults).
  • Settlement timing:
    • PPC → on success, shares are transferred to Provider/NodePool/Platform; on failure, the consumer is refunded.
    • Subscription → shares are allocated at purchase for the whole period.

The three BPS fields must sum to 10,000. If they don’t, the transaction reverts.


Throttling & limits

  • Subscription call limits: if callLimit > 0, clients should enforce it in UI/backends; Providers/Nodes may also enforce rate limits off‑chain.
  • Deactivation: Providers can set an API to inactive; PPC requests will fail with InactiveAPI. Subscriptions already purchased remain a policy matter since funds are allocated.

Change management

  • Price or BPS changes affect future purchases/locks only. Existing PPC locks keep their original snapshot; active subscriptions are unaffected until renewal.
  • Signer changes (providerSigner) can be timelocked by protocol settings; clients should always read the latest signer before verifying snapshots.
  • Descriptor updates are versioned (version, updatedAt) so SDKs can react to plan/docs changes.

Examples

PPC example

  • Plan: price = 12 SYL, BPS = { provider: 8600, node: 1200, platform: 200 }.
  • Consumer locks 12 SYL → request succeeds.
  • Payouts: Provider 10.32, NodePool 1.44, Platform 0.24 SYL.

Subscription example

  • Plan: price = 300 SYL, duration = 30 days, callLimit = 90.
  • On purchase, escrow allocates shares immediately; consumer can make up to 90 calls in 30 days without extra per‑call funding.

What this page omits

  • Contract signatures and events → see Contracts → AccessRegistry and Contracts → APIEscrow.
  • Node/Provider operational guidance → see Node and Provider sections.
  • The consensus rules → see Concepts → Consensus.
Last updated on