Repository navigation
Description
Refuse-to-serve / stop-serving policy (economic, margin-based)
Sibling axis to admission (#1754). Where admission asks "is this worth storing?", this asks "is this worth serving at the price I'm paid?" — a per-request economic decision, mostly heuristic.
The decision
On a miss the node must buy the bytes (pass-through from some route/origin) to sell them to the client. If no route is cheap enough to clear a margin at the client's price, the node should re-route or stop serving rather than serve at a loss. The core knob is a maximum buy price ("the most we'd pay for this").
Economics (illustrative — exact constants TBD)
- Assume a ~40% protocol fee skim, so net revenue per serve ≈
0.6 × sell_price. - One-hit-wonder floor: a single serve clears iff
buy_price ≤ 0.6 × sell_price— i.e. we can buy ~40% cheaper than we sell. - Amortization: buy once, serve N times → the one-time buy cost spreads across serves. A high one-time buy can clear if the blob is served enough times (e.g. buying at $0.20/GB is recovered by ~20 serves at $0.01/GB before fees; more once the skim is included). So the max buy price is a function of
sell_price, the fee skim, and the expected re-serve count. - The frequency/heat signal (the same estimator behind Pluggable cache admission & eviction policies (ADR 040) #1754) is what feeds "expected re-serves" — a hot blob justifies a higher buy price; a cold one only clears on a genuine cheap buy.
Signals
Candidate-route buy prices, the client's sell price, the fee skim, frequency/heat (expected re-serves), and latency.
Open question — where does this live?
It's an economic decision, not a cache-engine one — "the cache/engine signalling this back sounds odd." It's closely related to AdmissionPolicy (both gate "should I take this on") but keys on price, not storage. It likely belongs in a pricing/serve-economics layer that can read both the payment/route signals and the heat signal. Needs a proper home.
No penalty for refusing
Refusing is not slashable — the client simply re-routes with no penalty other than latency. This is a local profit optimization, not a protocol obligation, which is exactly what a trustless network needs: nodes serve when it pays and decline when it doesn't.
Related: #1754 (admission & eviction), load-shedding (separate issue).
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Projects
- StatusShow more project fieldsDone
Activity