Repository navigation
Description
Context
The shared payment pool (#1667) intentionally drops the per-signer identity cost to ~0: a client (signer) needs no openChannel gas and no per-signer locked deposit, and for a self-owned pool, self-signing a capability is free. Provider-side sybil resistance (CapacityBond) is untouched — this issue is only about client-side abuse/fairness.
Two facts combine into a real (small) design gap:
- A throwaway signer buys one credit window of unbilled egress (default 8 MiB, node-configurable down to one voucher interval) before the mechanical per-lane pause, and throwaway signer keys are free to mint.
- The obvious lever — per-IP rate limiting — collateral-damages legitimate IP aggregation (CGNAT, a campus/office behind one NAT, VPN exits, ISP neighbourhoods). Throttling by IP punishes the honest majority behind a shared egress. This is the universal "IP is not identity" problem, not deCDN-specific.
The property we want: one attacker (or a few bad actors behind a shared IP) must not be able to degrade service for paying clients, and minting throwaway identities must cost the attacker something without costing honest clients — especially clustered ones — anything.
What already bounds this (do not re-solve)
- Credit window — per-lane cap on unbilled egress; a fresh signer gets at most one window.
- Pool deposit + on-chain cap — throwaway signers share one deposit;
redeempaysmin(cap−spent, deposit−totalRedeemed), so many keys ≠ multiplied spend. - Multi-provider mesh +
CapacityBond— no single node is a network chokepoint; an abused node degrades locally and clients re-select (rate × rtt × reputation); an attacker can't cheaply become many nodes. - Lazy registration — the node registers a signer on-chain only on its first redemption, so a withholding sybil that never pays costs the node zero gas. Its only cost is the credit-window egress it fronted (bandwidth; for a cache miss, bounded by the floor-
Mguard + seed-leech caps).
Alternatives (implement ONE)
A — Payment-priority serve scheduling ✅ recommended (load-bearing)
Serve paying lanes (recent vouchers) at full rate; new/unpaid lanes get only spare capacity.
- Guarantees the property that matters: a paying client is never starved by non-payers — including a legitimate hub whose users pay. A flood of free-riders can only contend for the free/spare tier, which is unmonetizable to the attacker.
- No new client cost, no PoW, no stake, no wallet (preserves wallet-less delegation), and no IP-based collateral damage.
- Residual: (i) free-riders contend among themselves for spare capacity — bounded and low-value; (ii) a brand-new paying client sits in the free tier for its first window until it signs its first voucher, then promotes — a minor cold-start, mitigated by the existing credit window and (optionally) source reputation / the client binding.
- Today's serve path gates setup before payment; the change is to make coarse limits a deprioritization-under-load and let the first voucher promote a lane, rather than a hard pre-payment ban.
B — Cost the free surface (PoW or refundable dust micro-stake per fresh unpaid lane) ❌ rejected as primary
Restores a per-identity friction targeted at the free surface (an honest client pays a voucher within one interval and never feels it). But: PoW taxes honest low-power/mobile clients, and a refundable dust-stake requires the client to hold on-chain value — breaking the wallet-less delegated model that publisher-pays exists for. Wrong primary; revisit only if A proves insufficient.
C — Payment-ratio source throttle (soft demotion) ➖ optional secondary
Deprioritize a source (NodeId, then subnet) whose withhold-rate (served − paid / served) is high — a soft demotion under load, never a ban, so a mostly-paying hub degrades gracefully. Useful refinement of the existing rate-limit layer, but reactive (some free-ride leaks first) and attribution-weak (NodeId rotates free; subnet is coarse). Not load-bearing alone; fine as a complement to A if A alone leaves too much spare-capacity abuse.
D — Per-IP rate limit ⛔ status quo, replace as primary
The current lever, with the collateral damage above. Keep only as a coarse last-resort backstop; never the primary sort.
Recommendation
Implement A (payment-priority serve scheduling) as the load-bearing mechanism; keep the existing credit window + coarse rate limit as backstops; add C only if A leaves too much spare-capacity abuse under real load. Do not implement B (breaks wallet-less / taxes mobile) unless A is measured to be insufficient.
Plus a doc fix: correct ADR 003 § Voucher withholding's "a new key buys an attacker nothing it did not already have" to the honest statement — aggregate free-riding is bounded by scheduling + the credit window, not by key-creation cost.
Scope
Not in #1667 (the core self-owned + delegated pool). This is follow-up design + implementation.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
alpergundogdu commentedon Aug 13, 2026
Resolved — the posture this issue asked for now has a concrete home, split across two follow-ups.
Mechanism: credit-slow-start (#1669). This is Option A (payment-priority scheduling) made concrete and simpler: every new lane starts at a one-chunk floor and ramps to a BDP-derived
credit_maxon its own confirmed payments (credit_ramp_speed, lower = faster, 0 = instant). A paying lane reaches full rate in a few RTTs; a non-paying lane stays pinned at the floor and can only ever contend for the free/spare tier. Crucially it needs no per-client/per-lane reputation storage or graduation table — the window is a pure function of that lane's payments. That delivers the property this issue wanted (a paying client is never starved by non-payers) without the reputation machinery Option A implied.Designed-and-parked alternative: pre-pay (#1671). The stronger form — client fronts payment per lane, so extraction collapses into 'buying data'. Designed end-to-end and parked on gas cost (it leans on the settlement-gas floor and needs a pre-payment-size knob we can't cleanly defend). Full reasoning is captured there: the per-lane cost principle, why every global/per-node criterion is amortizable, deposit over-commitment, and the gas-independent ~$20k lifetime value ceiling.
Confirmed from the original options:
The ADR 003 §Voucher-withholding doc fix folds into the PayWord work (#1670).
Closing; further design continues in #1669 / #1671.