Livepeer Protocol Scaling During Times of High Ethereum Gas Prices

Doug Petkanics
Livepeer
Published in
7 min readSep 1, 2020

The Livepeer video infrastructure network uses the Ethereum blockchain in order to secure work, settle payments, and incentivize people all around the world to provide their infrastructure for video encoding work. One of the promises of the Streamflow scaling update back in January, 2020, was that as Ethereum became more expensive to use, Livepeer video infrastructure itself would not become more expensive.

As this post is being published in September, 2020, the costs to use Ethereum are at an all time high — almost 500 times higher than they were at the genesis of Livepeer. And while broadcasting costs on Livepeer do remain low, the cost to operate infrastructure on Livepeer, or to stake Livepeer token, are not fully immune to these incredible increases in prices. This post aims to communicate the plan in both the short and long term, for how the Livepeer community is planning to address and mitigate these high costs for its different types of users.

A Quick Background on Ethereum Transaction Costs and Gas
A full description of what “gas” is on the Ethereum blockchain is beyond the scope of this post, but you can think of it as an estimation for how much it costs to take an action on the blockchain in Livepeer, like staking token, registering a new node, or claiming the fees and token rewards that you have earned. Gas costs were between 1gwei-20gwei for the majority of the 2.5 years the protocol has been live. Today they stand at almost 500 gwei. Certain actions in Livepeer cost more gas than others because they require more space on the blockchain. More details below for each action, but for comparative purposes, note that something that cost approximately $1 in gas at 10gwei a few months ago, might cost a user $50 in gas today. You can see why this needs to be addressed.

Ethereum gas prices are higher than they have ever been.

Broadcasters and Apps — Using Livepeer to Transcode Video

This is the action that is least effected by the rise in Ethereum gas prices. The Streamflow update introduced a mechanism called Probabilistic Micropayments, where broadcasters pay node operators using something like a “lottery ticket”, which often has no value, but every once in awhile “wins” and can be redeemed to cover the costs of all performed video encoding work. As gas prices rise, the value of the tickets can be made larger to cover more work, so that the transaction cost remains a small fraction of the overall earned value. This post shares some details around how these PMs are holding up. The tradeoff here is that they would work perfectly if every broadcaster had a very large deposit of ETH in order to secure their work, however many don’t, forcing node operators to charge a premium in order to reduce the risk of double spends. This is leading to a slight increase in broadcasting prices, but still no where near the 50–500x increase relative to ETH txn costs. Another negative side effect is that Broadcasters with really small deposits may not have their work performed at all.

Short term solution: Broadcasters can increase their ETH deposits to access lower prices.

Long term considerations: R&D is going into mitigating the large deposit requirements by making improvements to the payment protocol mechanics and/or leveraging other layer two payment scaling solutions.

Token Holders — Securing and QA-ing the Livepeer Network Through Staking and Governance

While video apps and broadcasters may be the least effected group, token holders with small amounts of token staked on the network for a long time are likely the most effected group. Token holders earn LPT rewards each round (day) that they have staked, however in order to claim and withdraw them, they have to pay the gas costs to submit transactions that do the accounting to credit the token to their account for each round. If they haven’t moved their stake or claimed in, say two years, they would have over 700 rounds to update this accounting for, and this can be very expensive. Depending on how many reward LPT they have accrued, the costs per round for these transactions may now be greater than the value of LPT they would be withdrawing, essentially making it not worth it to pay to call these transactions. As gas price grows 50x, you can see why something that was worth it at $0.04/day might not be worth it at $2/day.

This is an urgent issue for Livepeer, with 1000’s of token holders “under water” on this equation. However on the bright side, the community has been hard at work, and there are short term solutions proposed, and far along in the protocol update process, which can unlock all of this value for users without significant costs. There is a two pronged approach:

  • Livepeer Improvement Proposal (LIP) 36, proposes changing the accounting algorithm to eliminate the burden of doing the round by round accounting on each user. It’s a complex update, but when implemented, going forward users can claim at any time at low cost.
  • LIP Issue #52, addresses all the yet-to-be-claimed LPT from the past. It proposes a community ratified earnings snapshot, which will let users submit one low-cost transaction to get “up to date”, at which point they can use the above transaction going forward to stay up to date.

Note that something like a one-time state snapshot might have felt messy or centralized prior to the introduction of Livepeer’s decentralized governance process, which involves LIPs, community review, and polling. But now that this process is in place and has been used to get community consensus on other updates, the community has the chance to fully review and approve a mechanism like this, for everyone’s benefit.

Short term: Use the LIP process to consider implementing the two above changes, which will make the costs of claiming earnings constant, relative to the number of rounds which have passed.

Long term: Even though these transaction costs won’t grow with the passing # of rounds, they will still rise and fall with rising and falling gas prices, and won’t be immune to another 50x increase. See below for general longer term research that allows Livepeer itself to stay low cost, but still get the security provided by layer 1 chains like Ethereum.

Node Operators — Running Infrastructure on Livepeer

Those users who run Orchestrator nodes and GPUs on the Livepeer network to earn ETH fees from users definitely incur the largest daily costs in the form of their hardware and bandwidth, but also in their daily reward calls that trigger the inflationary token rewards for the whole network. Fortunately, these users also have the most control over their ability to cover said costs, and over time have had the most to gain through the reward cut generated inflationary LPT they have earned. Orchestrator nodes with big enough pools of delegated stake are making more than enough value in LPT each day to cover the costs, but the real challenge here is that new node operators or those without large delegated stakes might not be in a position to have a high enough reward cut to cover their daily costs. This is centralizing, and leads to Livepeer being sustainable for big players, but not small players. This needs to be addressed.

One discussion that may lead to an improvement proposal is happening live in this forum thread. It suggests only generating rewards every 7 rounds (or some other interval) rather than every round, in order to reduce the # of transactions and costs, while keeping the reward amounts the same. It comes with some tradeoffs in terms of the requirement to stay active for at least 7 days rather than 1 day, but may be a good short term tradeoff to make.

Short term: Participate in the above discussion and consider moving it towards a community proposal and vote.

Long term: More Layer 2 and side chain R&D — see below.

Longer Term Possibilities

Decentralized technology is a cutting edge and fast moving area of technology. There is a lot of promise about magical scaling technologies that will exist in the future and solve everyone’s problems, but Livepeer has always blended this theoretical future, with a healthy dose of practicality. In fact, practicality is one of the core tenants of the projectwe always want to deliver technology that can work today, without any reliance on future innovation.

That said, with an eye towards the future, the project invests quite a bit in R&D and staying on top of the latest areas of research. One of the most interesting and actionable areas here in the medium term (months) are Optimistic rollups, which let actions like payments and staking take place on an L2 chain, with trust anchored in the layer 1 Ethereum chain. The team has been digging into to solutions and collaborating with various builders in this space, and there are indications that nice scaling solutions are possible here.

An even longer term area of research, which has been ongoing for years, involves looking at own-chain/shard architectures such as Parachains, Cosmos Zones, or ETH2 shard based deployments of the Livepeer protocol. In these environments you might sacrifice realtime composability with additional protocols (which should have minimal effect on core Livepeer as it exists today), but you gain significant capacity within your own protocol without contention for block space. Cross-chain/shard transactions would be enabled by the underlying hubs. There are all sorts of questions that are unanswered here, but the teams working on these solutions are making fast progress as well. There’s no short term plan to target any migration to a solution like this, but as Livepeer sees evidence that it’s viable, it can always be considered.

Summary

In short, there are near term solutions that keep fees low for scaled broadcasters and apps, and token holding delegators. There are early proposals for how to reduce fees for orchestrators, which may come with certain tradeoffs. So confidence should be high that even if gas prices increase by another order of magnitude, the Livepeer protocol can continue to be useful and cost effective. In the medium term, there are solutions that can mitigate the effects further via L2 scaling, and in the longer term the community is staying abreast of further out opportunities to scale more dramatically at low cost such as multiple-chain architectures.

If you’re interested in getting involved in the finer details of these discussions, please check in on the LIPs and the Livepeer Forum.

--

--

Doug Petkanics
Livepeer

Building live streaming on the blockchain at Livepeer. Previously Founder, VP Eng at Wildcard and Hyperpublic (acquired by Groupon).