MixinReserve.claimableReserve() mid-round accounting mismatch when transcoder pool size and current-round active set diverge
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 20/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 静か
- 技術スタック
- solidity
- 領域
- blockchain, security
調査の方向性
contracts/pm/mixins/MixinReserve.sol から始め、次に MixinTicketBrokerCore.redeemWinningTicket() と BondingManager.resignTranscoder() または tryToJoinActiveSet() を追ってください。この issue は文書化されたスコープ外の会計上の不一致について説明しており、コード変更や受け入れテストを指定していないため、具体的な完了条件は提示されていません。
索引モデルが issue の本文から書いたものです。
説明
Summary
MixinReserve.claimableReserve() reads two data structures that can fall out of sync within one round. Claimant eligibility is gated on bondingManager().isActiveTranscoder(_claimant) (a current-round snapshot), while the reserve allocation is divided by bondingManager().getTranscoderPoolSize() (the live pending transcoder pool counter). When the pending pool shrinks or grows mid-round (e.g. via resignTranscoder() or tryToJoinActiveSet()), the eligible active set and the divisor diverge, causing the per-claimant reserve cap to deviate from the fair R / N allocation in either direction.
Root cause
isActiveTranscoder() is gated on activationRound <= currentRound < deactivationRound, which is a round-level snapshot. getTranscoderPoolSize() returns the live size of the transcoderPool linked list, which is mutated immediately by bonds, unbonds, evictions, and resignations.
When an active transcoder fully unbonds in round r:
resignTranscoder()removes them fromtranscoderPoolimmediately, sogetTranscoderPoolSize()returnsN - 1.- It sets
deactivationRound = currentRound + 1, soisActiveTranscoder()still returnstruefor the remainder of roundr.
The set of eligible claimants has size N, but the divisor is N - 1. Every eligible share is inflated by N / (N - 1). The symmetric case (new transcoder joining via tryToJoinActiveSet() when a slot is free) deflates the cap in the same way.
Why it's not an issue
- No theft. The redeemed amount is bounded by the ticket's
faceValueand can never exceed the face value the broadcaster explicitly signed. No funds are created beyond what the broadcaster committed. - Grief is temporary.
claimFromReserveis explicitly designed to paymin(shortfall, claimableReserve), not the full face value. Partial reserve payment for a valid ticket is normal protocol behavior. After a revert,usedTickets[hash]remains false and the ticket can be retried in a later round (subject toticketValidityPeriod). - Restrictive preconditions. The attack requires (1) a valid pre-signed winning ticket where
faceValue - deposit > R / N, (2) the attacker accepting the opportunity cost of fully unbonding (or coordinating with a separate pool-shrinker), and (3) no other transcoder bonding into the freed slot between the pool shrink and the redeem call. Splitting the pool-shrinker and the overclaimer into separate accounts reintroduces a race: the pool shrink and the redemption can no longer be bundled into one transaction, so any transcoder bonding into the free slot between the two steps restores the pool size and cancels the inflation. - Protocol spec acknowledges the behavior. The Livepeer technical spec documents a scenario where an orchestrator sets their ticket's face value to
R / N, but by the time they redeem, the active set has grown toN + 1, dropping the cap toR / (N + 1). This is treated as a known limitation of the reserve mechanism. The invariantclaimableReserve == R / active_set_size at all timesis not guaranteed by the spec.
Out of scope for bug bounty
Reports targeting the claimableReserve accounting mismatch in MixinReserve.sol, and the associated griefing/payment-disruption paths through MixinTicketBrokerCore.redeemWinningTicket(), BondingManager.resignTranscoder(), or BondingManager.tryToJoinActiveSet(), are closed as known issues and not eligible for rewards under the Livepeer Immunefi bug bounty program.
References
- Source:
contracts/pm/mixins/MixinReserve.sol - Related:
contracts/pm/mixins/MixinTicketBrokerCore.sol,contracts/bonding/BondingManager.sol - Deployed TicketBroker (Arbitrum):
0xa8bB618B1520E284046F3dFc448851A1Ff26e41B
- 主要言語
- JavaScript
- スター
- 155
- フォーク
- 50
- 平均マージ
- 9日 22時間
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
livepeer/protocol のほかの issue
-
known-issue
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
-
Winning tickets can settle for less than their face value once the recipient’s reserve is exhaustedオープンknown-issue
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
-
blockchain enhancement pm
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
known-issue
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
livepeer/protocol の issue をすべて見る
似ている issue
-
Language MVP task
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
saayam-for-all/webapp#1914 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] Dev image build fails: `npm install` in the root Dockerfile runs out of memory (exit 134)対応中かも @andest01 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
good first issue hacktoberfest help wanted
難易度 2/5 1時間未満 初心者へのやさしさ 76/100
pacocartones/free-llm-api-hub#262 ·
メンテナーはふだん 1 日以内に返信
-
agent-task risk:low
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
guyellis/http-status-check#512 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
microsoft/playwright#43327 ·
メンテナーはふだん 1 日以内に返信