Skip to content

Investigate payer-specific ticket face value and win probability #91

Open

Description

@j0sh

Motivation

node configures one TicketFaceValue and TicketWinProb for its on-chain payment engine and advertises those values unchanged to every payer. When a payment arrives, it rejects it if either the payer's deposit or claimable reserve is below the advertised face value. A payer with enough funds for a smaller ticket therefore cannot pay under the current parameters.

go-livepeer calculates ticket parameters per sender. It starts from a multiple of estimated redemption cost, caps face value to the sender's MaxFloat and the configured maximum face value, then calculates win probability from the target ticket EV and resulting face value. It rejects a sender when the capped face value cannot cover the EV or redemption-cost checks.

Investigate which parts of that behavior node should adopt, especially a payer-specific face-value cap and a corresponding win-probability adjustment that preserves the target EV.

Questions to resolve

  • What is the correct node equivalent of go-livepeer's MaxFloat? Determine how deposit, claimable reserve, and any outstanding ticket exposure affect the amount safely available for a winning ticket.
  • Should node derive a payer-specific face value and win probability at challenge creation, rather than advertise the same pair to every payer? If so, define when payer funds are read and how the challenge handles stale or unavailable chain data.
  • Should redemption gas cost influence the initial face value, as it does in go-livepeer? How should a configured maximum face value interact with that calculation and a target EV?
  • What should happen when the available amount is below the minimum viable face value or cannot support the target EV? Preserve a clear rejection path and do not advertise an unredeemable ticket.
  • Decide whether ticket EV and face-value limits remain wei-denominated. The ETH/USD feed currently converts runner prices; go-livepeer's ticket EV and maximum face value are also specified in wei, so matching its behavior does not itself create a USD-denominated face value.

For example, a $2 face value and a 1-in-1,000 win chance imply roughly $0.002 EV per ticket at the conversion rate used to configure them. If the payer can support only a $1 face value, investigate whether a roughly 1-in-500 chance would preserve that EV safely, or whether the payer must be rejected.

Completion criteria

  • Document the intended ticket-parameter algorithm and payer-funds semantics, including any ways it deliberately differs from go-livepeer.
  • If adopting per-payer parameters, cover sufficient funds, reduced available float, insufficient funds, RPC failures, and funds changing between challenge and payment receipt. Verify that the advertised FV is redeemable and the resulting win probability preserves the chosen EV within integer rounding.
  • Specify how operators configure the target EV and any face-value cap, and whether this changes the existing TicketFaceValue/TicketWinProb settings.

Code references

Activity

  1. nehkee commented on Nov 16, 2026

    @nehkee

    I have a proposal plus an opt-in implementation, and I'd value your view before opening a PR.

    Payer float, the MaxFloat equivalent: min(deposit, claimableReserve − unsettled winning tickets from this payer). The claimable reserve is what this recipient is guaranteed; the deposit is shared and can be drained by other recipients. The deposit cap keeps the existing receipt check and the signer's PayerPolicy satisfied.

    Algorithm, enabled only when a new TicketMinFaceValue / --ticket-min-face-value is set:
    -Float ≥ TicketFaceValue: the configured pair is offered unchanged.

    -TicketMinFaceValue ≤ float < TicketFaceValue: face value = float, win probability = ceil(TicketWinProb × TicketFaceValue / float). EV stays at or above the target, and the excess is under one unit of win probability. Your $2 at 1-in-1,000 example becomes $1 at 1-in-500.

    -Float below the minimum, or a ticket that would always win: rejected with 400. No unredeemable ticket is advertised.

    Funds timing: funds are read at each challenge and refresh. Receipt already checks funds against the authenticated face value, so funds that fall after the challenge are rejected there, and a refresh resizes the ticket. A funds RPC failure returns 502, like other chain errors.

    Deliberate differences from go-livepeer: values stay in wei, and redemption gas isn't priced automatically; operators pick a minimum face value worth redeeming. With the setting unset there is no extra RPC and no behaviour change.

    Tests cover sufficient, reduced and insufficient funds, outstanding tickets, RPC failure, funds changing between challenge and receipt, and EV preservation within rounding. The algorithm is documented in docs/orchestrator.md.

    Commit:

    nehkee@020d919

    What do you think of this approach ?

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions