# Payments ideas for Livepeer 2.0 — borrowing from The Graph (TAP/GraphTally, Indexing Payments) + x402

Thank you @Paulieb for writing this analysis. I’ve found the same gap while scoping x402 implementation for the Livepeer Payment Clearinghouse project, which is an abstraction above the Livepeer PM tickets protocol.

To describe the x402 integrator problem another way - deposit/reserve requirements for gateways are a blocker because x402 is normally used to pay per request, while Livepeer PM TicketBroker contract currently requires a significant amount of ETH for deposit and reserve locked in the smart contract (using your own wallet presumably), before you can start a job on the network.

Alternatively, a customer/agent looking to perform compute on the network can use a hosted gateway or remote signing service like the Payment Clearinghouse.

Livepeer Gateway users should be able to pay for a single job, settling payment for it without locking funds into a contract for an entire round.

For context, the Payment Clearinghouse project is using OpenMeter to track usage - Graph Protocol could help serve a more decentralized role in tracking usage events.

My suggested approach to solve this is to implement x402 on top of a remote signer that already has a reserve and small deposit on-chain. HTTP 402 statuses are returned by the clearinghouse’s balance gate: when the user’s authenticated request to start a new job session returns insufficient balance, the response can include payment instructions. A balance webhook like offered by TurnKey helps connect the web3 deposits to HTTP requests to apply credits to an OpenMeter customer account.

Much of this could be abstracted into smart contract or an improvement to the TicketBroker contract, (it sounds like that is what you’re exploring), but I just wanted to chime in here and share how I have been thinking of x402 interactions for Livepeer applications.

The Indexing Payments mechanism you mentioned looks interesting. This might be useful for automating some of the Burn-Mint-Equilibrium mechanisms proposed in the Livepeer 2.0 solution.

From what I can tell, the GraphTally solution appears to be nearly identical to PM Tickets protocol, without deposit and reserve requirements. So for our network it feels like a heavy lift / replacing something we already have.

Good discussion, thank you for bringing this up!

1 Like