Livepeer 区块链合约
Livepeer 使用一个全面的以太坊智能合约系统,以无许可方式治理其去中心化网络。 当前,Livepeer 协议已部署在 Arbitrum One 上,并使用一系列以太坊智能合约进行治理:- LivepeerToken (LPT) 所有权和委托
- 活跃转码器运营商(编排者)的质押和选择
- 向参与者分配通胀奖励和费用
- 协议通过轮次实现基于时间的进展
- 通过概率微支付系统进行支付处理
- 核心协议合约
- 代币系统
- 治理
合约交互架构
以下是这些合约相互交互的方式: FIX THIS DIAGRAM - unreadable
核心协议合约
核心协议合约是 Livepeer 协议的支柱。 它们管理编排者的质押、委托和奖励分配。 它们还通过轮次管理协议的基于时间的进程,并通过概率微支付系统处理付款。 Controller 充当中心注册表,通过更新实现地址来实现升级 Maybe put in tab view for better layout
Controller: Contract Registry
The Controller 是所有协议合约的中心注册表。 所有协议合约都会向 Controller 查询它们需要交互的其他合约的地址。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 ArbiscanPurpose:
- Central address registry for all protocol contracts
- Enables contract upgrades while maintaining a stable entry point
- Provides pause functionality for emergency situations
getContract()- Get address of a contract by namesetContract()- Set address of a contract by namepause()/unpause()- Emergency pause for critical situations

BondingManager: Staking & Delegation
The BondingManager 是管理质押经济、协调器注册和奖励分配的最关键合约。BondingManager
BondingManager
Address:See on ArbiscanPurpose:
- 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
Bond()- Delegate stake to an orchestratorTranscoder()- Register as an orchestrator with reward/fee parametersUnbond()- Start withdrawal process (with lock period)Reward()- Called by orchestrators to mint inflationary rewardsClaimEarnings()- Claim accumulated rewards and fees
TicketBroker: Probabilistic Micropayments
The TicketBroker 管理离线支付系统,使用概率微支付进行广播者到编排者的付款。TicketBroker
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
FundDepositAndReserve()- Broadcaster deposits funds for paymentsRedeemWinningTicket()- Orchestrator redeems a winning ticketUnlock()- Start withdrawal processWithdraw()- Complete withdrawal after unlock period
RoundsManager: Protocol Time Management
该RoundsManager 管理协议的基于时间的轮次系统,每个轮次都有固定的区块长度。RoundsManager
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
InitializeRound()- Initialize new roundCurrentRound()- Get current round numberBlockHashForRound()- Get L1 block hash for ticket validation
Minter: Token Inflation
该 铸造者 控制代币供应通胀,以奖励活跃的 orchestrators.Minter
Minter
Purpose:
- Manages LPT token inflation schedule
- Calculates mintable tokens per round
- Adjusts inflation based on target bonding rate
- Called by BondingManager during reward distribution
CurrentMintableTokens()- Calculate tokens to mint for rewardsInflation(),InflationChange()- Query inflation parameters
服务注册表: Orchestrator Discovery
该 服务注册表 将以太坊地址映射到服务 URI,以进行 orchestrator 发现.ServiceRegistry
ServiceRegistry
Purpose:
- Allows orchestrators to advertise their network endpoints
- Enables broadcasters to discover and connect to orchestrators
- Stores URI strings on-chain
SetServiceURI()- Orchestrator registers their endpointGetServiceURI()- Query orchestrator’s service URL
MerkleSnapshot
MerkleSnapshot 创建在给定轮次的 staking pool 快照,并生成用于可验证委托的 merkle root.MerkleSnapshot
MerkleSnapshot
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
CreateSnapshot()- Create snapshot at current roundMerkleRoot()- Get merkle root for a round
代币与实用合约
LivepeerToken (LPT): ERC20 Token
Ethereum Mainnet Only The LivepeerToken 是用于质押、支付和治理的原生协议代币,基于ERC-20 标准。LivepeerToken
LivepeerToken
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
Transfer(),BalanceOf(),TotalSupply()- Standard ERC20 operationsApprove()- Required before bonding or funding deposits
BridgeMinter: Token Bridge
Ethereum Mainnet Only 该 BridgeMinter 是一个铸造合约,当它收到来自 Ethereum 主网的有效存款时,会在 Arbitrum One 网络上铸造 LPT 代币。BridgeMinter
BridgeMinter
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 代币。LivepeerTokenFaucet
LivepeerTokenFaucet
Purpose:
- Provides test tokens on testnets
- Rate-limited token requests
- Development and testing support
治理合约
治理者: Contract Upgrades
治理者 通过多步骤的交易提案和执行过程来处理协议升级。Governor
Governor
Purpose:
- Handles protocol upgrades through a multi-step transaction proposal and execution process
Propose()- Submit a new proposalQueue()- Queue a proposal for executionExecute()- Execute a queued proposal
LivepeerGovernor: Protocol Governance
The LivepeerGovernor 实现链上治理,以进行协议升级和参数更改。LivepeerGovernor
LivepeerGovernor
Purpose:
- On-chain voting on protocol proposals
- Weighted by bonded stake
- Implements governance mechanisms
CastVote()- Vote on governance proposalsCastVoteWithReason()- Vote with explanation
国库: On-chain Treasury Management
国库 管理链上国库,用于资助和会计。Treasury
Treasury
Purpose:
- Manages protocol treasury for funding
- Tracks allocations and expenditures
- Funds Special Purpose Entities (SPEs)
Deposit()- Add funds to the treasuryWithdraw()- Allocate funds to recipients