Repository navigation
Closed
Copy link
Labels
area:clidecdn binary: get, gateway, pool, publish, origin, setuparea:clientdecdn-client SDK: paid pull, lanes, buyer poolkind:featureNew capability or a change to current behavior
Description
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
getdoes anyway;--dry-runalready fetches it) and fromtotal_bytesin the probe/stream response for a blob. - Rates come from a probe round (
cdn/probe/v1, unpaid): every node that answershas_blob: truereturns its signedrate_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 rankingdecdn-clientapplies, so the "likely" figure is the pull's expected cost, not the cheapest node's). get --dry-runprints the same block;getprints 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.linkthat 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
- Receipts after the pull: client:
decdn getends with a signed receipt (hash, bytes, nodes, USDC paid, settlement once it lands) #2599 - Gateway page that shows the estimate: gateway: hosted public HTTP gateway at
<ns>.decdn.linkthat pays a pool behind the scenes #2593 - Rate ceiling on the buyer side: client-pull: profitable rate manipulation leaves no evidence, and the buyer has no rate ceiling #1375
Metadata
Metadata
Assignees
Labels
area:clidecdn binary: get, gateway, pool, publish, origin, setuparea:clientdecdn-client SDK: paid pull, lanes, buyer poolkind:featureNew capability or a change to current behavior
Type
Fields
Priority
None yet
Projects
- StatusShow more project fieldsDone
Activity
feat(cli): `decdn quote <URI>` prices a pull from signed probe rates (#…