Skip to content

sponsord: publisher dashboard with card-to-USDC pool funding, per-namespace spend and per-user allowances #2594

Description

@thiras

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:

  1. 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 (PaymentPool owner), so nothing custodial is added.
  2. See GB served and spend per namespace. PoolRedeemed lanes carry bytesPaid per pool; the dashboard shows bytes and USDC per namespace per day, and the pool balance against the top-up low-water mark.
  3. 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 sponsord config.

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

Activity

  1. added
    kind:feature
    prio:medium
    area:payments
    area:sponsord
    on Oct 24, 2026
  2. added theissue type on Oct 24, 2026
  3. gjwang commented on Oct 25, 2026

    @gjwang

    For item 2, I’d distinguish settled usage from download usage before wiring up the charts.

    PoolRedeemed at 38353eac mixes two accounting shapes: newPaidCumulative is a cumulative money watermark; bytesPaid is 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 bytesPaid gives 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:paymentsarea:sponsordkind:featureprio:medium

    Fields

    Priority

    None yet

    Projects

    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions