Repository navigation
Description
Component
sponsord (daemon, onramp, decdn.sh / decdn.ps1 installers)
Who it affects
publisher (someone importing content or sponsoring downloads)
Problem
A publisher who wants to pay for their users' downloads has to: get Sepolia ETH, get USDC, bridge or faucet it onto Arbitrum, open a PaymentPool, run sponsord and sponsord-onramp next to it, and set ONRAMP_SPENDING_CAP_MICRO_USDC by hand. After that they can see what the pool spent only by reading the chain or their node's metrics. Nobody who ships a Linux ISO wants to bridge to Arbitrum first.
Proposed solution
A hosted publisher dashboard, one page per publisher wallet, with three things on it:
- Fund a pool with a card. A fiat-to-USDC onramp widget (Coinbase Onramp, MoonPay or Stripe's crypto onramp; whichever settles USDC on Arbitrum with the lowest minimum) that delivers to the publisher's pool address, so the first deposit is a card payment, not a bridge. The pool stays the publisher's (
PaymentPoolowner), so nothing custodial is added. - See GB served and spend per namespace.
PoolRedeemedlanes carrybytesPaidper pool; the dashboard shows bytes and USDC per namespace per day, and the pool balance against the top-up low-water mark. - Set per-user allowances. sponsord already signs capped, expiring capabilities; the dashboard sets the cap, the expiry, the gate (Turnstile or a webhook, feat(onramp): webhook gate #2550) and a per-namespace allowance for the hosted gateway (linked below), and writes them to the publisher's
sponsordconfig.
The dashboard is a thin UI over sponsord-api plus a chain reader: sponsord stays single-tenant and stateless, and the dashboard holds no key. Labs hosts the dashboard; a publisher who runs their own sponsord points it at their daemon URL and bearer token.
Alternatives considered
- Ship ADR 024 account abstraction first (ADR 024, Draft). Gas sponsorship removes the ETH step but not the USDC step, and it is a protocol change. A card onramp removes both steps with no contract change.
- CLI-only (
decdn pool fund --card). The card flow is a browser redirect anyway, and the publisher who needs this is the one who will not open a terminal. - Custodial pools run by Labs. Removes the wallet entirely but makes Labs the pool owner, which changes who the voucher counterparty is and who can be slashed. Out of scope here; the per-namespace default allowance on the hosted gateway covers the zero-wallet first run.
Design scope
- This proposal changes the protocol, the economics, or the contract surface.
Related
- One-command publish: cli:
decdn publish ./dirpublishes a directory to a namespace in one command #2591 - Hosted gateway (consumes the per-namespace allowance): gateway: hosted public HTTP gateway at
<ns>.decdn.linkthat pays a pool behind the scenes #2593 - Webhook gate for the onramp: feat(onramp): webhook gate #2550
- Docs "Deliver" tab (decdn/website): docs: add a "Deliver" tab for publishers (publish, gateway, SDK, pricing) website#335
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Projects
- StatusShow more project fieldsBacklog
Activity
gjwang commentedon Oct 25, 2026
For item 2, I’d distinguish settled usage from download usage before wiring up the charts.
PoolRedeemedat38353eacmixes two accounting shapes:newPaidCumulativeis a cumulative money watermark;bytesPaidis an increment. Track money by contract deployment + chain + pool + provider + signer, then take the watermark difference. For example, a lane moving from 1,000,000 to 1,500,000 contributes 0.5 USDC, not 1.5 USDC, at the second settlement. A daily scan needs the preceding watermark too.Summing
bytesPaidgives paid/credited bytes, which can differ from raw bytes served: the floor and partial-payment calculation can reduce that credit. The event also has no namespace field, so namespace attribution needs a separate issuance/usage mapping, with shared-signer behavior defined explicitly. Grouping by block timestamp gives the settlement day, not necessarily the download day.A useful dashboard fixture would cover a lane crossing midnight, partial payment, and one signer used across namespaces. That should pin down what “GB served and spend per namespace per day” means without changing the payment contract.