Decision
Clients pay nodes per MB over off-chain payment channels settled on-chain. All channels are denominated in USDC, fixed at contract deployment. On a cache miss, nodes pay peers per MB for initial content pulls, then amortize that cost across many client deliveries. Origin-backed nodes set the effective price ceiling (their backend egress costs). Rates are fully market-driven within governance-set bounds.Channel lifecycle
The channel token is fixed (USDC) at deployment, soopenChannel takes only the provider and deposit. Close is a three-step lifecycle — closeChannel (callable by either party) starts the dispute window, disputeChannel accepts a higher-nonce voucher during the window, and settleChannel distributes funds after it expires. A node may also withdraw accrued earnings against the latest voucher while the channel stays open — redeeming a monotonic client-signed claim needs no dispute window.
Cooperative close
When both parties are online and agree on the final balance, they can skip the dispute window entirely.cooperativeClose(channelId, amount, nonce, bytesDelivered, clientVoucherSig, providerCloseSig) settles the channel in a single transaction with no dispute window — the provider signs an EIP-712 CooperativeClose waiver acknowledging the final voucher, and either party can submit it. This is purely additive: it is the fast path when both sides cooperate, and if the node declines or is offline, the client falls straight back to closeChannel and the standard dispute window. The client CLI exposes it as decdn channel coop-close.
Vouchers
Off-chain signed messages bound to a specific channel, carrying a strictly increasing nonce (starting at 1) and a cumulative amount and byte count. Each new voucher restates the running total owed — both amount and bytes are monotonically non-decreasing — and the highest-nonce voucher is the one that settles. Nodes persist the latest nonce rather than discarding older state, sincedisputeChannel only accepts a strictly higher nonce. Cadence is negotiated per stream.
Rate discovery
Each node advertises its own per-MB rate. Governance sets rate bounds (in USDC); a node advertising outside the bounds is ignored by selection. Rates can change between streams.Dispute window
A window aftercloseChannel during which either party can submit a later (higher-nonce) voucher via disputeChannel if a stale close was filed. Default 48 hours, governable within 12h–72h.