Skip to content

cli: decdn quote <URI> prices a pull from signed probe rates before any paid byte #2600

Description

@thiras

Component

cli (decdn binary)

Who it affects

client (someone running decdn get or the gateway), publisher (someone importing content or sponsoring downloads)

Problem

Nodes sign their own rate_per_mb in every ProbeResponse and StreamResponse, and a client refuses anything above max_rate_per_mb in its config. So the price of a pull is fully known before the first paid byte, and nothing shows it. No command and no page says "this 15 GB will cost about $0.15". The site quotes a target of $0.01/GB; a user cannot check that against the network before committing a pool deposit.

Proposed solution

decdn quote <decdn: URI>:

$ decdn quote 'decdn:9194…69e5/?ns=1'
bundle   29.0 GB in 14 entries
nodes    6 hold it   rates 0.0092–0.0110 USDC/GB   (ceiling in your config: 0.02)
estimate 0.27–0.32 USDC   likely 0.29 USDC
  • Size comes from the manifest for a bundle (one small paid pull, which get does anyway; --dry-run already fetches it) and from total_bytes in the probe/stream response for a blob.
  • Rates come from a probe round (cdn/probe/v1, unpaid): every node that answers has_blob: true returns its signed rate_per_mb. The quote shows the spread, the ceiling in config, and an estimate from the ranking the pull would actually use (the same provider ranking decdn-client applies, so the "likely" figure is the pull's expected cost, not the cheapest node's).
  • get --dry-run prints the same block; get prints a one-line version before the pull starts unless --yes/--json, so the "how much?" question is answered where the money leaves.
  • The gateway (gateway: hosted public HTTP gateway at <ns>.decdn.link that pays a pool behind the scenes #2593) shows the estimate on its download page before the user clicks, and sponsord's onramp page shows what a sponsor is about to pay for.

Alternatives considered

  • Use the site's target rate. A target is marketing; the probe round returns the real signed rates for the real holders, and the gap between the two is exactly what a customer wants to see.
  • Make nodes publish rates on chain. They already sign them on every probe; on-chain pricing is unnecessary state and slower to change (#1679 keeps repricing a drain-and-restart matter).

Design scope

  • This proposal changes the protocol, the economics, or the contract surface.

Related

Activity

  1. added
    kind:feature
    area:cli
    area:client
    on Oct 24, 2026
  2. added theissue type on Oct 24, 2026
  3. assigned and unassigned on Oct 25, 2026
  4. moved this from Backlog to In progress in deCDNon Oct 26, 2026
  5. moved this from In progress to Done in deCDNon Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:cliarea:clientkind:feature

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions