Livepeer


It’s allowed us to ship an application with comparable speed and performance to traditional Web2 applications.
Adam SofferLivepeer Engineer

This week, Livepeer launched its new tokenholder app built on The Graph that allows transcoder nodes to more easily stake Livepeer tokens (LPT) and interact with the protocol.

Livepeer is an open source video streaming and transcoding network, that launched on mainnet in May 2018. The network is made up of transcoder nodes that transcode videos (convert input video streams) and participate in a verification game.

The new tokenholder app allows users track a leaderboard of transcoder nodes, including their stake, rewards and fee cuts. Users can also stake directly from the app!

Nodes in the Livepeer protocol are selected on a round-by-round basis. Once the round is complete, fees are paid out to transcoders and those that act maliciously are slashed (ie. if they don’t transcode their delegated portion of work or don’t provide verification).

Since transcoding requires a lot of computation, powerful hardware and high-bandwidth, users can delegate their stake to transcoder nodes instead of staking independently. For example, they can delegate to Staked, a reputable staking platform. Users can search for their desired transcoder’s Ethereum address and delegate their stake directly through the app. They can also watch the transcoder’s activity on the leaderboard.

Delegating stake is non-custodial so users don’t have to worry about their stake being stolen or misappropriated. Staking through apps like Staked can yield 100-120% in returns for tokenholders, while running your own transcoder node can earn you 10-20% more in yield. Stakers typically take 4-25% in staking fees depending the protocol, the market of validators and the difficulty of validating.

In case you don’t own LPT but you’d like to stake on the Livepeer network, you can trade ETH for LPT directly from the app using Uniswap! Take a look at the Staking Guide (colorful pink button) to learn how to acquire, delegate and stake your LPT!

Livepeer Subgraph

We at The Graph have heard this many times now: querying blockchain data is hard.

In the case of Livepeer, it was difficult to format the necessary data client-side and still have a performant staking app for users. Thus, Livepeer deployed a subgraph that captures data on staking rounds, information about transcoders and rewards.

Users can also query the subgraph for historical data about the performance of delegate transcoder nodes. This lets users more effectively evaluate the delegate nodes that are least likely to be slashed, a crucial metric to optimize staking yield.

In the above query we’re looking for the past claimEarningsEvents where delegates redeemed their earnings. The results are ordered by the delegates that have earned the most fees, in descending order.

In addition to transcoder performance, we can also query the subgraph to see:

  • Past rounds: including the transcoders that were part of the pool for each round, the total stake, reward cut and fees earned
  • Bonding & unbonding events when users delegate their stake to existing transcoder nodes
  • Other transcoder events like updates, stake slashing, resignations and evictions of transcoder nodes
  • Delegator data including their addresses, total stake, fees earned and transaction events like stake withdrawal or deposits

As Livepeer continues updating their subgraph and staking activity grows, the tokenholder app will be able to capture more interesting data about usage and display it on their app in a performant way.

Why your dApp needs a subgraph

Livepeer’s subgraph has enabled the engineering team to reduce the number of requests per page load from 30 down to just a few. Adam Soffer, an engineer on the Livepeer team, commented that the developer experience has improved massively now that they don’t have to build a server or database or deal with indexing data. This has allowed the team to focus on building the best UI for their users that Adam says was “liberating”.

Are you also tired of building indexers and maintaining centralized servers for your data? Try it for yourself! Check out our docs to get started and see all the other projects using subgraphs in our Graph Explorer, such as Compound Finance, Uniswap, Moloch, ENS and more!

Join the community on our Discord channel to chat about launching a subgraph or building on The Graph ecosystem.

Thanks Adam Soffer from Livepeer.


Category
Featured Subgraphs
Author
Eva Beylin
Published
November 3, 2019

Eva Beylin

View all blog posts