Skip to content

payments: explicit floor-debt repayment instead of clearing by surplus payment #2780

Closed

Description

@thiras

Context

#2779 (closing #2767) charges an abandoned stream's unpaid floor as floor debt on the signer and the pool. Payment past a later stream's own reserved floor clears the debt ("option A"). This rule needs no wire change and never locks out an honest client that keeps paying. The cost is that ordinary paid volume launders abandoned floors.

With P paid to one node, F one floor (about 1 MiB) and k = 8, the free bytes a client can take at that node are about:

  • P/2 from the ramp (already accepted in ADR 003 §Credit window);
  • plus P from floor debt cleared by surplus payment;
  • plus k·F of debt that is still outstanding.

So a paying abuser pays P and receives about 2.5P, which is 60% off.

Option C: explicit debt repayment

The client pays its floor debt directly instead of having ordinary paid volume clear it. Surplus payment would then clear nothing, and the bound drops to P/2 + k·F with no honest lockout, as long as clients repay.

Rough shape, to be decided in an ADR change:

  • A NotFound refusal on the signer cap (or a new class, sent only to the proven requester) carries the µUSDC the signer owes at this node.
  • The client pays it on the lane through a voucher or preimage that is not tied to a stream, and the node clears the debt.
  • decdn-client repays automatically before it retries that node.

Open questions

  • ADR 003 exposure invariant. "The payer never pays for unverified bytes" means a repayment may cover only the floor bytes the client verified. The node charges debt for bytes sent, which can be more.
  • Spec discipline. The client is free not to repay. Without repayment, behaviour is option B (lockout until restart). Does C earn its wire surface over the A′ middle ground: clearing at half the surplus, about P + k·F free, with no wire change?
  • SDK impact. If the gateway surfaces a new refusal class, sdk-typescript and sdk-python must mirror it.
  • Evidence first. Do this only if real traffic shows paying clients abandoning floors at a meaningful rate.

The options are compared in #2779 (A, A′, B, C).

Activity

  1. added
    kind:feature
    design:economics
    on Oct 30, 2026
  2. self-assigned this
    on Oct 30, 2026
  3. added
    prio:low
    status:backlog
    area:node
    on Oct 30, 2026
  4. added
    area:payments
    on Oct 30, 2026
  5. removed their assignment
    on Oct 30, 2026
  6. thiras commented on Oct 30, 2026

    @thiras
    ContributorAuthor

    With #2779 keeping the lockout strict, this issue is also the recovery path. A key whose floor debt fills its k-window cap at a node cannot open the paying stream that would clear the debt, so it stays refused there until the node restarts or the pool is reclaimed. A node's own buyer signer at a seller can reach that state too. Explicit repayment would give such a key a way back without a restart.

  7. moved this from Backlog to In progress in deCDNon Nov 11, 2026
  8. moved this from In progress to Done in deCDNon Nov 13, 2026
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:nodearea:paymentsdesign:economicskind:featureprio:lowstatus:backlog

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions