跳转到主要内容

Livepeer 区块链合约

Livepeer 使用一个全面的以太坊智能合约系统,以无许可方式治理其去中心化网络。 当前,Livepeer 协议已部署在 Arbitrum One 上,并使用一系列以太坊智能合约进行治理:
  • LivepeerToken (LPT) 所有权和委托
  • 活跃转码器运营商(编排者)的质押和选择
  • 向参与者分配通胀奖励和费用
  • 协议通过轮次实现基于时间的进展
  • 通过概率微支付系统进行支付处理
在 Livepeer 协议中,合约有 3 项核心功能:
  1. 核心协议合约
  2. 代币系统
  3. 治理
它们由 10 个智能合约 共同协作,以管理质押、支付、治理和服务发现:

合约交互架构

以下是这些合约相互交互的方式:
FIX THIS DIAGRAM - unreadable

核心协议合约

核心协议合约是 Livepeer 协议的支柱。 它们管理编排者的质押、委托和奖励分配。 它们还通过轮次管理协议的基于时间的进程,并通过概率微支付系统处理付款。 Controller 充当中心注册表,通过更新实现地址来实现升级
Maybe put in tab view for better layout

Controller: Contract Registry

The Controller 是所有协议合约的中心注册表。 所有协议合约都会向 Controller 查询它们需要交互的其他合约的地址。
The Controller acts as the central registry for all other contract addresses in the protocol.It maintains a mapping of contract IDs to their addresses, enabling protocol upgrades by updating the registered implementation addresses. It uses Keccak256 hashes of contract names as keys to store their addresses, enabling upgradeable architecture without changing the Controller address itself.Address:See on Arbiscan
0xD8E8328501E9645d16Cf49539efC04f734606ee4
Purpose:
  • Central address registry for all protocol contracts
  • Enables contract upgrades while maintaining a stable entry point
  • Provides pause functionality for emergency situations
Key Operations:
  • getContract() - Get address of a contract by name
  • setContract() - Set address of a contract by name
  • pause()/unpause() - Emergency pause for critical situations
Controller

BondingManager: Staking & Delegation

The BondingManager 是管理质押经济、协调器注册和奖励分配的最关键合约。
Address:See on Arbiscan
0x0000000000000000000000000000000000000000
Purpose:
  • Manages the transcoder (orchestrator) pool as a sorted linked list
  • Handles bonding (staking) and delegation to orchestrators
  • Distributes inflationary rewards and fees
  • Manages unbonding periods and withdrawals
  • Tracks earnings and claims
Key Operations:
  • Bond() - Delegate stake to an orchestrator
  • Transcoder() - Register as an orchestrator with reward/fee parameters
  • Unbond() - Start withdrawal process (with lock period)
  • Reward() - Called by orchestrators to mint inflationary rewards
  • ClaimEarnings() - Claim accumulated rewards and fees

TicketBroker: Probabilistic Micropayments

The TicketBroker 管理离线支付系统,使用概率微支付进行广播者到编排者的付款。
Purpose:
  • Holds broadcaster deposits and reserves for micropayments
  • Validates and settles winning payment tickets
  • Manages unlock/withdrawal periods for broadcasters
  • Tracks claimed reserves per orchestrator
Key Operations:
  • FundDepositAndReserve() - Broadcaster deposits funds for payments
  • RedeemWinningTicket() - Orchestrator redeems a winning ticket
  • Unlock() - Start withdrawal process
  • Withdraw() - Complete withdrawal after unlock period

RoundsManager: Protocol Time Management

RoundsManager 管理协议的基于时间的轮次系统,每个轮次都有固定的区块长度。
Purpose:
  • Defines protocol rounds (epochs) of fixed block length
  • Tracks round initialization and locking
  • Provides block hashes for ticket validation
  • Coordinates time-based protocol operations
Key Operations:
  • InitializeRound() - Initialize new round
  • CurrentRound() - Get current round number
  • BlockHashForRound() - Get L1 block hash for ticket validation

Minter: Token Inflation

铸造者 控制代币供应通胀,以奖励活跃的 orchestrators.
Purpose:
  • Manages LPT token inflation schedule
  • Calculates mintable tokens per round
  • Adjusts inflation based on target bonding rate
  • Called by BondingManager during reward distribution
Key Operations:
  • CurrentMintableTokens() - Calculate tokens to mint for rewards
  • Inflation(), InflationChange() - Query inflation parameters

服务注册表: Orchestrator Discovery

服务注册表 将以太坊地址映射到服务 URI,以进行 orchestrator 发现.
Purpose:
  • Allows orchestrators to advertise their network endpoints
  • Enables broadcasters to discover and connect to orchestrators
  • Stores URI strings on-chain
Key Operations:
  • SetServiceURI() - Orchestrator registers their endpoint
  • GetServiceURI() - Query orchestrator’s service URL

MerkleSnapshot

MerkleSnapshot 创建在给定轮次的 staking pool 快照,并生成用于可验证委托的 merkle root.
Purpose:
  • Creates a snapshot of the staking pool at a given round
  • Generates a merkle root for verifiable delegation
  • Used for delegator rewards and governance
Key Operations:
  • CreateSnapshot() - Create snapshot at current round
  • MerkleRoot() - Get merkle root for a round
/snippets/assets/logos/Livepeer-Logo-Symbol-Theme.svg
/snippets/assets/logos/Livepeer-Logo-Symbol-Theme.svg

代币与实用合约

Livepeer moved from the Ethereum mainnet to the Arbitrum One network in 2022 to increase transaction throughput and reduce fees.
On Ethereum mainnet, only the LivepeerToken and BridgeMinter contracts remain operational; all other contracts have migrated to Arbitrum One.This ensures the token has the higher security of the Ethereum mainnet while the network enjoys the higher throughput and lower fees of Arbitrum.

LivepeerToken (LPT): ERC20 Token

Ethereum Mainnet Only The LivepeerToken 是用于质押、支付和治理的原生协议代币,基于ERC-20 标准。
Purpose:
  • ERC20 token for all economic activity in the network
  • Used for bonding/staking to orchestrators
  • Required for broadcaster deposits and payments
  • Governance voting weight
Key Operations:
  • Transfer(), BalanceOf(), TotalSupply() - Standard ERC20 operations
  • Approve() - Required before bonding or funding deposits

BridgeMinter: Token Bridge

Ethereum Mainnet Only BridgeMinter 是一个铸造合约,当它收到来自 Ethereum 主网的有效存款时,会在 Arbitrum One 网络上铸造 LPT 代币。
Purpose:
  • Mints LPT tokens on Arbitrum One when it receives a valid deposit from the Ethereum mainnet

LivepeerTokenFaucet: Test Token Distribution

Testnets Only LivepeerTokenFaucet 用于测试网,分发测试 LPT 代币。
Purpose:
  • Provides test tokens on testnets
  • Rate-limited token requests
  • Development and testing support
/snippets/assets/logos/Livepeer-Logo-Symbol-Theme.svg
/snippets/assets/logos/Livepeer-Logo-Symbol-Theme.svg

治理合约

治理者: Contract Upgrades

治理者 通过多步骤的交易提案和执行过程来处理协议升级。
Purpose:
  • Handles protocol upgrades through a multi-step transaction proposal and execution process
Key Operations:
  • Propose() - Submit a new proposal
  • Queue() - Queue a proposal for execution
  • Execute() - Execute a queued proposal

LivepeerGovernor: Protocol Governance

The LivepeerGovernor 实现链上治理,以进行协议升级和参数更改。
Purpose:
  • On-chain voting on protocol proposals
  • Weighted by bonded stake
  • Implements governance mechanisms
Key Operations:
  • CastVote() - Vote on governance proposals
  • CastVoteWithReason() - Vote with explanation

国库: On-chain Treasury Management

国库 管理链上国库,用于资助和会计。
Purpose:
  • Manages protocol treasury for funding
  • Tracks allocations and expenditures
  • Funds Special Purpose Entities (SPEs)
Key Operations:
  • Deposit() - Add funds to the treasury
  • Withdraw() - Allocate funds to recipients
Last modified on March 1, 2026