/Docs
/ Docs
Installation
Video Developers
Video Miners
Protocol
Installation
Video Developers
Video Miners
Protocol
protocol
/reference
Entities define the schema of the subgraph, and represent the data that can be queried. Within each entity are sets of fields that store useful information related to the entity. Below is a list of the available entities within the Livepeer Subgraph, and descriptions for the available fields.
To see an interactive sandbox of all entities see the Graph Explorer.
Each entity is defined with a value type, which will always be a base AssemblyScript type, or a custom type provided by The Graph's custom TypeScript library. For more information on value types see here.
The Protocol entity is responsible for storing aggregate information across the entire protocol. It can be used to view stats such as total supply, total active stake, total volume, participation rate and more. There is only one Protocol entity in the subgraph.
Field | Type | Description |
---|---|---|
id | ID | ID is set to 0 |
inflation | BigInt | Per round inflation rate |
inflationChange | BigInt | Change in inflation rate per round until the target bonding rate is achieved |
numActiveTranscoders | Int | Total active transcoders |
paused | Boolean | True if the protocol is paused |
targetBondingRate | BigInt | Target bonding rate (participation) that determines whether inflation should increase or decrease |
unbondingPeriod | BigInt | Time in blocks needed to wait to unstake |
lockPeriod | BigInt | Time in blocks delegators have to review transcoder information without changes |
roundLockAmount | BigInt | Lock period of a round as a % of round length |
totalActiveStake | BigDecimal | The total amount of active LPT staked |
totalVolumeETH | BigDecimal | Total broadcaster fees transcoders have accumulated in ETH |
totalVolumeUSD | BigDecimal | Total broadcaster fees transcoders have accumulated in USD |
participationRate | BigDecimal | Ratio of total active stake to total supply |
currentRound | Round | Current round the protocol is in |
lastInitializedRound | Round | Round that was last initialized |
lastRoundLengthUpdateRound | Round | Round when round length was last updated |
roundLength | BigInt | Round length in blocks |
lastRoundLengthUpdateStartBlock | BigInt | Block when round length was last updated |
totalSupply | BigDecimal | Livepeer Token supply |
winningTicketCount | Int | Total winning tickets |
roundCount | Int | Total rounds |
The transcoder entity contains data associated with the orchestrator role. It includes references to each of its earning pools, fee volume information, total stake, delegators, and more.
Field | Type | Description |
---|---|---|
id | ID | Transcoder's ETH address |
activationRound | BigInt | Round in which the transcoder became active |
deactivationRound | BigInt | Round in which the transcoder will become inactive |
lastActiveStakeUpdateRound | BigInt | Round for which the stake was last updated while the transcoder is active |
active | Boolean | Whether or not the transcoder is active |
status | TranscoderStatus | Status of the transcoder |
lastRewardRound | Round | Last round that the transcoder called reward |
rewardCut | BigInt | % of block reward cut paid to transcoder by a delegator |
feeShare | BigInt | % of fees paid to delegators by transcoder |
totalStake | BigDecimal | Total tokens delegated toward a transcoder (including their own) |
totalVolumeETH | BigDecimal | Total fees generated by the transcoder in ETH (before distribution to delegators) |
totalVolumeUSD | BigDecimal | Total fees generated by the transcoder in USD (before distribution to delegators) |
pools | [Pool] | Pools associated with the transcoder |
delegators | [Delegator] | Delegators bonded to the transcoder |
delegator | Delegator | Delegator that registered this transcoder |
serviceURI | String | Service URI endpoint that can be used to send off-chain requests |
The Livepeer protocol is round based and each round is represented by some number of Ethereum blocks.
Field | Type | Description |
---|---|---|
id | ID | Round number |
initialized | Boolean | Whether the round was initialized |
length | BigInt | Number of blocks this round lasts for |
startBlock | BigInt | Start block for the round |
endBlock | BigInt | End block for the round |
pools | [Pool] | Pools associated with the round |
mintableTokens | BigDecimal | Mintable tokens for the round |
volumeETH | BigDecimal | Fees generated this round in ETH |
volumeUSD | BigDecimal | Fees generated this round in USD |
totalActiveStake | BigDecimal | Total active stake during the round |
totalSupply | BigDecimal | Total Livepeer token supply during the round |
participationRate | BigDecimal | Participation rate during the round (totalActiveStake/totalSupply) |
movedStake | BigDecimal | Total stake moved from one delegate to another during the round |
newStake | BigDecimal | Total amount of new stake introduced during the round |
Represents a transcoder's rewards and fees to be distributed to delegators
Field | Type | Description |
---|---|---|
id | ID | Unique identifer for the pool (formed using the transcoder's address and round number) |
round | Round | Round associated with the pool |
delegate | Transcoder | Transcoder associated with the pool |
fees | BigDecimal | Fees collected in the pool |
rewardTokens | BigDecimal | Total reward tokens collected in the pool |
totalStake | BigDecimal | Transcoder's total stake during the earnings pool's round |
rewardCut | BigInt | Transcoder's reward cut during the earnings pool's round |
feeShare | BigInt | Transcoder's fee share during the earnings pool's round |
Bonded accounts who have delegated their stake towards a transcoder candidate
Field | Type | Description |
---|---|---|
id | ID | ETH address of a delegator |
delegate | Transcoder | ETH address of the delegate (the one whom the delegator has bonded to) |
startRound | BigInt | Round the delegator becomes bonded and delegated to its delegate |
lastClaimRound | Round | Last round that the delegator claimed reward and fee pool shares |
bondedAmount | BigDecimal | Amount of Livepeer Token a delegator currently has bonded |
principal | BigDecimal | Amount of Livepeer Token a delegator has bonded over its lifetime separate from rewards |
unbonded | BigDecimal | Amount of Livepeer Token a delegator has unbonded over its lifetime |
fees | BigDecimal | Amount of fees a delegator has collected |
withdrawnFees | BigDecimal | Amount of fees withdrawn |
delegatedAmount | BigDecimal | Amount of Livepeer Token the delegator has delegated |
unbondingLocks | [UnbondingLock] | Unbonding locks associated with the delegator |
Broadcasters pay transcoders to do the work of transcoding in exchange for fees
Field | Type | Description |
---|---|---|
id | ID | ETH address of a broadcaster |
deposit | BigDecimal | Amount of funds deposited |
reserve | BigDecimal | Amount of funds in reserve |
Get an unbonding lock for a delegator
Field | Type | Description |
---|---|---|
id | ID | Unique unlock identifer |
unbondingLockId | Int | unbonding lock id |
delegator | Delegator | Delegator address this lock belongs to |
delegate | Transcoder | Address of delegate unbonding from |
amount | BigDecimal | Amount being unbonded |
withdrawRound | BigInt | Round number when the unbonding amount will be available for withdrawal |
Stake weighted poll
Field | Type | Description |
---|---|---|
id | ID | Poll address |
proposal | String | IPFS multihash for the proposal |
endBlock | BigInt | Block at which the poll ends and votes can no longer be submitted |
quorum | BigInt | Minimum amount of participation (total stake including inactive stake) required for a poll to pass |
quota | BigInt | Minimum amount of yes votes required for a poll to pass |
tally | PollTally | Poll tally |
votes | [Vote] | Votes belonging to a poll |
Stake weighted tally associated with a poll
Field | Type | Description |
---|---|---|
id | ID | Poll address |
yes | BigDecimal | Stake voted yes |
no | BigDecimal | Stake voted no |
Vote data
Field | Type | Description |
---|---|---|
id | ID | Voter address + poll address |
voter | String | Vote caster |
voteStake | BigDecimal | Stake weighted vote |
nonVoteStake | BigDecimal | This will be non-zero if voter is an transcoder and any of the its delegators voted |
choiceID | PollChoice | Vote choice |
poll | Poll | Poll associated with this vote |
registeredTranscoder | Boolean | True if the voter was a registered transcoder during the poll period |
Protocol data accumulated and condensed into day stats
Field | Type | Description |
---|---|---|
id | ID | Timestamp rounded to current day by dividing by 86400 |
date | Int | The date beginning at 12:00am UTC |
volumeETH | BigDecimal | Fees generated this day in ETH |
volumeUSD | BigDecimal | Fees generated this day in USD |
totalActiveStake | BigDecimal | Total active stake during the day |
totalSupply | BigDecimal | Total Livepeer token supply during the day |
participationRate | BigDecimal | Participation rate during the day (totalActiveStake/totalSupply) |
Transcoder data accumulated and condensed into day stats
Field | Type | Description |
---|---|---|
id | ID | Combination of the transcoder address and the timestamp rounded to current day by dividing by 86400 |
date | Int | The date beginning at 12:00am UTC |
volumeETH | BigDecimal | Fees generated this day in ETH |
volumeUSD | BigDecimal | Fees generated this day in USD |
transcoder | Transcoder | Transcoder associated with the day |
Transaction entities are created for each Ethereum transaction that contains an interaction within Livepeer contracts.
Field | Type | Description |
---|---|---|
id | ID | Ethereum transaction hash |
blockNumber | BigInt | Block transaction was mined in |
timestamp | Int | Timestamp for transaction |
gasUsed | BigInt | Amount of gas used in the transaction |
gasPrice | BigInt | Cost per unit of gas specified for the transaction |
from | String | The sending party of the transaction |
to | String | The receiving party of the transaction |
events | [Event] | The events emitted within this transaction |
BondEvent entities are created for every emitted Bond event.
Field | Type | Description |
---|---|---|
id | ID | Ethereum transaction hash + event log index |
transaction | Transaction | Reference to the transaction the event was included in |
timestamp | Int | Timestamp of the transaction the event was included in, used to sort |
round | Round | Reference to the round the event occured in |
bondedAmount | BigDecimal | Delegator's current total bonded amount |
additionalAmount | BigDecimal | Additional amount added to bonded amount |
newDelegate | Transcoder | Reference to the Delegator's new delegate |
oldDelegate | Transcoder | Reference to the Delegator's old delegate |
delegator | Delegator | Reference to the Delegator that bonded |
UnbondEvent entities are created for every emitted Unbond event.
Field | Type | Description |
---|---|---|
id | ID | Ethereum transaction hash + event log index |
transaction | Transaction | Reference to the transaction the event was included in |
timestamp | Int | Timestamp of the transaction the event was included in |
round | Round | Reference to the round the event occured in |
amount | BigDecimal | Amount unbonded in the transaction |
withdrawRound | BigInt | The future round in which the Delegator may withdraw its unbonded stake |
unbondingLockId | Int | The unbonding lock ID associated with this transaction, used to optionally rebond the amount |
delegate | Transcoder | Reference to the delegate unbonded from |
delegator | Delegator | Reference to the Delegator that unbonded |
RebondEvent entities are created for every emitted Rebond event.
Field | Type | Description |
---|---|---|
id | ID | Ethereum transaction hash + event log index |
transaction | Transaction | Reference to the transaction the event was included in |
timestamp | Int | Timestamp of the transaction the event was included in |
round | Round | Reference to the round the event occured in |
delegator | Delegator | Reference to the delegator that rebonded |
delegate | Transcoder | |
amount | BigDecimal | |
unbondingLockId | Int |
RewardEvent entities are created for every emitted Reward event.
Field | Type | Description |
---|---|---|
id | ID | Ethereum transaction hash + event log index |
transaction | Transaction | Reference to the transaction the event was included in |
timestamp | Int | Timestamp of the transaction the event was included in |
round | Round | Reference to the round the event occured in |
rewardTokens | BigDecimal | Amount of inflationary token rewards claimed |
delegate | Transcoder | Reference to the delegate that claimed its inflationary token reward |
TranscoderActivatedEvent entities are created for every emitted TranscoderActivated event.
Field | Type | Description |
---|---|---|
id | ID | Ethereum transaction hash + event log index |
transaction | Transaction | Reference to the transaction the event was included in |
timestamp | Int | Timestamp of the transaction the event was included in |
round | Round | Reference to the round the event occured in |
delegate | Transcoder | Reference to the delegate that will be active |
activationRound | BigInt | Future round in which the delegate will become active |
TranscoderDeactivatedEvent entities are created for every emitted TranscoderDeactivated event.
Field | Type | Description |
---|---|---|
id | ID | Ethereum transaction hash + event log index |
transaction | Transaction | Reference to the transaction the event was included in |
timestamp | Int | Timestamp of the transaction the event was included in |
round | Round | Reference to the round the event occured in |
delegate | Transcoder | Reference to the delegate that will become deactive |
deactivationRound | BigInt | Future round in which the delegate will become deactive |
EarningsClaimedEvent entities are created for every emitted EarningsClaimed event.
Field | Type | Description |
---|---|---|
id | ID | Ethereum transaction hash + event log index |
transaction | Transaction | Reference to the transaction the event was included in |
timestamp | Int | Timestamp of the transaction the event was included in |
round | Round | Reference to the round the event occured in |
delegator | Delegator | Reference to the delegator that claimed its earnings |
delegate | Transcoder | Reference to the delegator's delegate |
startRound | BigInt | First round that the delegator's pending stake was computed from |
endRound | Round | Last round that the delegator's pending stake was computed from |
rewardTokens | BigDecimal | Reward tokens claimed by the delegator |
fees | BigDecimal | Fees claimed by the delegator |
TranscoderUpdateEvent entities are created for every emitted TranscoderUpdate event.
Field | Type | Description |
---|---|---|
id | ID | Ethereum transaction hash + event log index |
transaction | Transaction | Reference to the transaction the event was included in |
timestamp | Int | Timestamp of the transaction the event was included in |
round | Round | Reference to the round the event occured in |
delegate | Transcoder | Reference to the delegate that was updated |
rewardCut | BigInt | Delegate's updated reward cut |
feeShare | BigInt | Delegate's updated fee share |
TranscoderSlashedEvent entities are created for every emitted TranscoderSlashed event.
Field | Type | Description |
---|---|---|
id | ID | Ethereum transaction hash + event log index |
transaction | Transaction | Reference to the transaction the event was included in |
timestamp | Int | Timestamp of the transaction the event was included in |
round | Round | Reference to the round the event occured in |
delegate | Transcoder | Reference to the delegate that was slashed |
finder | Bytes | Finder that proved a transcoder violated a slashing condition. Null address if there is no finder |
penalty | BigDecimal | Percentage of transcoder bond to be slashed |
finderReward | BigInt | Percentage of penalty awarded to finder. Zero if there is no finder |
WithdrawStakeEvent entities are created for every emitted WithdrawStake event.
Field | Type | Description |
---|---|---|
id | ID | Ethereum transaction hash + event log index |
transaction | Transaction | Reference to the transaction the event was included in |
timestamp | Int | Timestamp of the transaction the event was included in |
round | Round | Reference to the round the event occured in |
delegator | Delegator | Reference to the delegator that withdraw its stake |
unbondingLockId | Int | Unbonding lock ID that was deleted upon withdrawal |
amount | BigDecimal | Amount of stake withdrawn |
WithdrawFeesEvent entities are created for every emitted WithdrawFees event.
Field | Type | Description |
---|---|---|
id | ID | Ethereum transaction hash + event log index |
transaction | Transaction | Reference to the transaction the event was included in |
timestamp | Int | Timestamp of the transaction the event was included in |
round | Round | Reference to the round the event occured in |
delegator | Delegator | Reference to the delegator that withdraw its fees |
amount | BigDecimal | Amount of fees withdrawn |
NewRoundEvent entities are created for every emitted NewRound event.
Field | Type | Description |
---|---|---|
id | ID | Ethereum transaction hash + event log index |
transaction | Transaction | Reference to the transaction the event was included in |
timestamp | Int | Timestamp of the transaction the event was included in |
round | Round | Reference to the round the event occured in |
blockHash | String | Block hash for the round |
WinningTicketRedeemedEvent entities are created for every emitted WinningTicketRedeemed event.
Field | Type | Description |
---|---|---|
id | ID | Ethereum transaction hash + event log index |
transaction | Transaction | Reference to the transaction the event was included in |
timestamp | Int | Timestamp of the transaction the event was included in |
round | Round | Reference to the round the event occured in |
sender | Broadcaster | Reference to the broadcaster who sent the fees |
recipient | Transcoder | Reference to the recipient of the broadcaster fees |
faceValue | BigDecimal | Face value of ticket paid to recipient |
faceValueUSD | BigDecimal | Amount of fees the winning ticket was redeemed for in in USD |
winProb | BigInt | The winning probability of the ticket |
senderNonce | BigInt | Sender's monotonically increasing counter for each ticket |
recipientRand | BigInt | keccak256 hash commitment to recipient's random value |
auxData | Bytes | Auxilary data included in ticket used for additional validation |
DepositFundedEvent entities are created for every emitted DepositFunded event.
Field | Type | Description |
---|---|---|
id | ID | Ethereum transaction hash + event log index |
transaction | Transaction | Reference to the transaction the event was included in |
timestamp | Int | Timestamp of the transaction the event was included in |
round | Round | Reference to the round the event occured in |
sender | Broadcaster | Reference to the broadcaster that deposited the broadcasting fees |
amount | BigDecimal | Amount of broadcasting fees deposited |
ReserveFundedEvent entities are created for every emitted ReserveFunded event.
Field | Type | Description |
---|---|---|
id | ID | Ethereum transaction hash + event log index |
transaction | Transaction | Reference to the transaction the event was included in |
timestamp | Int | Timestamp of the transaction the event was included in |
round | Round | Reference to the round the event occured in |
reserveHolder | Broadcaster | Reference to reserve holder |
amount | BigDecimal | Amount of funds added to reserve |
ReserveClaimedEvent entities are created for every emitted ReserveClaimed event.
Field | Type | Description |
---|---|---|
id | ID | Ethereum transaction hash + event log index |
transaction | Transaction | Reference to the transaction the event was included in |
timestamp | Int | Timestamp of the transaction the event was included in |
round | Round | Reference to the round the event occured in |
reserveHolder | Broadcaster | Reference to the reserve holder |
claimant | Transcoder | Reference to the claimant |
amount | BigDecimal | Amount of funds claimed by claimant from the reserve for the reserve holder |
WithdrawalEvent entities are created for every emitted Withdrawal event.
Field | Type | Description |
---|---|---|
id | ID | Ethereum transaction hash + event log index |
transaction | Transaction | Reference to the transaction the event was included in |
timestamp | Int | Timestamp of the transaction the event was included in |
round | Round | Reference to the round the event occured in |
sender | Broadcaster | Reference to the broadcaster withdrawing its deposit and reserve |
deposit | BigDecimal | Deposit amount withdrawn |
reserve | BigDecimal | Reserve amount withdrawn |
SetCurrentRewardTokensEvent entities are created for every emitted SetCurrentRewardTokens event.
Field | Type | Description |
---|---|---|
id | ID | Ethereum transaction hash + event log index |
transaction | Transaction | Reference to the transaction the event was included in |
timestamp | Int | Timestamp of the transaction the event was included in |
round | Round | Reference to the round the event occured in |
currentMintableTokens | BigDecimal | Number of mintable tokens for the round |
currentInflation | BigInt | Current inflation during the round |
PauseEvent entities are created for every emitted Pause event.
Field | Type | Description |
---|---|---|
id | ID | Ethereum transaction hash + event log index |
transaction | Transaction | Reference to the transaction the event was included in |
timestamp | Int | Timestamp of the transaction the event was included in |
round | Round | Reference to the round the event occured in |
UnpauseEvent entities are created for every emitted Unpause event.
Field | Type | Description |
---|---|---|
id | ID | Ethereum transaction hash + event log index |
transaction | Transaction | Reference to the transaction the event was included in |
timestamp | Int | Timestamp of the transaction the event was included in |
round | Round | Reference to the round the event occured in |
ParameterUpdateEvent entities are created for every emitted ParameterUpdate event.
Field | Type | Description |
---|---|---|
id | ID | Ethereum transaction hash + event log index |
transaction | Transaction | Reference to the transaction the event was included in |
timestamp | Int | Timestamp of the transaction the event was included in |
round | Round | Reference to the round the event occured in |
param | String | Parameter that was updated |
VoteEvent entities are created for every emitted Vote event.
Field | Type | Description |
---|---|---|
id | ID | Ethereum transaction hash + event log index |
transaction | Transaction | Reference to the transaction the event was included in |
timestamp | Int | Timestamp of the transaction the event was included in |
round | Round | Reference to the round the event occured in |
voter | String | Address belonging to the voter |
choiceID | BigInt | Voter choice. Zero means yes and one means no |
poll | Poll | Reference to the poll this vote was casted in |
PollCreatedEvent entities are created for every emitted PollCreated event.
Field | Type | Description |
---|---|---|
id | ID | Ethereum transaction hash + event log index |
transaction | Transaction | Reference to the transaction the event was included in |
timestamp | Int | Timestamp of the transaction the event was included in |
round | Round | Reference to the round the event occured in |
poll | Poll | Reference to the poll that was created |
proposal | Bytes | IPFS content hash representing proposal |
endBlock | BigInt | Ethereum block in which this poll ends |
quorum | BigInt | The minimum amount of stake-weighted votes for this poll's outcome to be considered valid |
quota | BigInt | The minimum amount of stake-weighted 'yes' votes needed for the poll to pass |
ServiceURIUpdateEvent entities are created for every emitted ServiceURIUpdate event.
Field | Type | Description |
---|---|---|
id | ID | Ethereum transaction hash + event log index |
transaction | Transaction | Reference to the transaction the event was included in |
timestamp | Int | Timestamp of the transaction the event was included in |
round | Round | Reference to the round the event occured in |
addr | String | Address of sender |
serviceURI | String | Service URI endpoint for the caller |
MintEvent entities are created for every emitted Mint event.
Field | Type | Description |
---|---|---|
id | ID | Ethereum transaction hash + event log index |
transaction | Transaction | Reference to the transaction the event was included in |
timestamp | Int | Timestamp of the transaction the event was included in |
round | Round | Reference to the round the event occured in |
to | String | Token smart contract address |
amount | BigDecimal | Amount of tokens minted |
BurnEvent entities are created for every emitted Burn event.
Field | Type | Description |
---|---|---|
id | ID | Ethereum transaction hash + event log index |
transaction | Transaction | Reference to the transaction the event was included in |
timestamp | Int | Timestamp of the transaction the event was included in |
round | Round | Reference to the round the event occured in |
value | BigDecimal | Amount of tokens burned |