AIP-2: Availability-Weighted Reward Mechanism#2
Conversation
WalkthroughAdds a new AIP draft describing an availability-weighted validator reward mechanism, updates README's MD lint example to reference Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant BP as BlockProducer
participant VS as ValidatorSet
participant AS as AvailabilityScoring
participant RD as RewardDistributor
BP->>VS: propose block (includes base rewards)
VS->>AS: request availability scores for validators
AS-->>VS: return scores (0.0–1.0)
Note over VS,AS: threshold τ = 2/3 (≈0.666667)
alt score < τ
VS->>RD: mark validator excluded → reward = 0
else score ≥ τ
VS->>RD: send base_reward & score
RD->>RD: compute reward = base_reward × (α + (1−α) × score)
end
RD-->>VS: finalized per-validator rewards
VS-->>BP: commit distribution mapping
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
AIPs/aip-2.md (1)
68-70: Reassess “Backwards Compatibility” statementExcluding validators below a threshold materially changes reward distribution and committee composition. Clarify the impact and any migration/rollout plan.
Proposed wording:
- “This change updates the reward distribution formula and introduces an exclusion threshold τ. While protocol data structures remain compatible, validator eligibility and per-block payouts change. Rollout should include an announcement period and staged activation (e.g., activate τ after N epochs).”
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- MCP integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
AIPs/aip-2.md(1 hunks)README.md(1 hunks)_includes/head.html(1 hunks)
🔇 Additional comments (1)
README.md (1)
52-52: Update README: config present — fix mdl link
- config/.mdlrc.rb — Found (no action needed).
- README.md (line 52): replace the DavidAnson/markdownlint (Node) link with markdownlint/markdownlint (the Ruby
mdlrepo) to avoid confusion.
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (1)
AIPs/aip-2.md (1)
6-6: Automerge policy: Author header must include username/email in angle bracketsCurrent value won’t pass the bot check. Use
<@username>or your public GitHub email in<...>.-author: Javad Rajabzadeh (@ja7ad) +author: Javad Rajabzadeh <@ja7ad>
🧹 Nitpick comments (4)
_includes/head.html (2)
15-15: Use rel="icon" (drop “alternate”) for broader compatibility
rel="alternate icon"is legacy; simplify torel="icon".- <link rel="alternate icon" type="image/x-icon" href="{{ '/assets/favicons/favicon.ico' | relative_url }}"> + <link rel="icon" type="image/x-icon" href="{{ '/assets/favicons/favicon.ico' | relative_url }}">
12-16: Optional: add Safari pinned tab (mask-icon) backIf you want pinned tab support in Safari, restore mask-icon.
<link rel="manifest" href="{{ '/assets/favicons/site.webmanifest' | relative_url }}"> + <link rel="mask-icon" href="{{ '/assets/favicons/safari-pinned-tab.svg' | relative_url }}" color="#5bbad5">AIPs/aip-2.md (2)
52-55: Clarify α’s applicabilityAs written, “minimum reward floor” suggests everyone gets the floor. Clarify that α applies only when eligible (i.e., not excluded).
- - Where: - - $α$ = fixed proportion (e.g., 0.5) ensuring a minimum reward floor. - - $score$ = availability score of the validator (0.0 ≤ score ≤ 1.0). + - Where: + - $α$ = fixed proportion (e.g., 0.5) ensuring a minimum reward floor for eligible validators ($score \\ge \\tau$). + - $score$ = availability score of the validator ($0.0 \\le score \\le 1.0$).
36-36: markdownlint (MD007): fix list indentation to 2-space steps (and 4 for sub-items)Adjust indentation to satisfy the project’s mdl config.
Example fixes:
- - A value between $0.0$ and $1.0$ representing the validator's recent + - A value between $0.0$ and $1.0$ representing the validator's recent @@ - - $α$ = fixed proportion (e.g., 0.5) ensuring a minimum reward floor. - - $score$ = availability score of the validator (0.0 ≤ score ≤ 1.0). + - $α$ = fixed proportion (e.g., 0.5) ensuring a minimum reward floor for eligible validators. + - $score$ = availability score of the validator (0.0 ≤ score ≤ 1.0). @@ - - $score = 1.0$ → $reward = 0.7 AUM$ + - $score = 1.0$ → $reward = 0.7 AUM$Run markdownlint to catch the rest.
Also applies to: 38-38, 40-40, 43-43, 46-46, 52-52, 53-53, 54-54, 57-57, 58-58, 59-59, 60-60
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- MCP integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
AIPs/aip-2.md(1 hunks)_includes/head.html(1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
AIPs/aip-2.md
36-36: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
38-38: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
40-40: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
43-43: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
46-46: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
52-52: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
53-53: Unordered list indentation
Expected: 4; Actual: 6
(MD007, ul-indent)
54-54: Unordered list indentation
Expected: 4; Actual: 6
(MD007, ul-indent)
57-57: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
58-58: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
59-59: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
60-60: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
🔇 Additional comments (1)
_includes/head.html (1)
12-16: Good fix: favicon paths now robust via relative_urlUsing Jekyll’s relative_url and adding SVG/ICO variants resolves nested-path 404s. Nice.
There was a problem hiding this comment.
Actionable comments posted: 0
♻️ Duplicate comments (1)
AIPs/aip-2.md (1)
6-6: Automerge blocker: Author header must include username/email in angle bracketsPer the repo’s automerge policy, include your GitHub handle or your public email in
< >. Example fix:-author: Javad Rajabzadeh (@ja7ad) +author: Javad Rajabzadeh <@ja7ad>
🧹 Nitpick comments (7)
AIPs/aip-2.md (7)
35-41: Fix list indentation (MD007) and reference τ consistently
- Align sub-list items to 2-space indent to satisfy markdownlint.
- Use τ in both bullets to avoid mixing τ with a raw numeric.
- - **Availability Score**: - - A value between $0.0$ and $1.0$ representing the validator's recent - performance and uptime. - - Scores below $\tau = \frac{2}{3}\;(\approx 0.666667)$ result in temporary - exclusion from the committee (no rewards). - - Scores $≥ 0.666667$ are eligible for scaled rewards. +- **Availability Score**: + - A value between $0.0$ and $1.0$ representing the validator's recent performance and uptime. + - Define $\tau = \tfrac{2}{3}\;(\approx 0.666667)$. + - Scores $< \tau$ result in temporary exclusion from the committee (no rewards). + - Scores $\ge \tau$ are eligible for scaled rewards.
43-55: Normalize math notation and fix sub-list indentation (MD007)
- Keep 2-space indents.
- Use LaTeX symbols consistently.
- Clarify the floor applies to eligible validators.
- - **Reward Scaling Formula**: - - Let $base\\_reward$ be the validator's share of the block reward (e.g., if - the protocol allocates 70% of each block reward to validators and 30% to - the foundation, then $base\\_reward$ = 0.7 AUM). - - The adjusted reward is calculated as: - - $$ - reward = base\\_reward × (α + (1 − α) × score) - $$ - - - Where: - - $α$ = fixed proportion (e.g., 0.5) ensuring a minimum reward floor. - - $score$ = availability score of the validator (0.0 ≤ score ≤ 1.0). +- **Reward Scaling Formula**: + - Let $base\\_reward$ be the validator's share of the block reward (e.g., if the protocol allocates 70% of each block reward to validators and 30% to the foundation, then $base\\_reward = 0.7$ AUM). + - The adjusted reward is calculated as: + + $$ + reward = base\\_reward \\times (\\alpha + (1 - \\alpha) \\times score) + $$ + + - Where: + - $\\alpha$ = fixed proportion (e.g., 0.5) ensuring a minimum reward floor for eligible validators ($score \\ge \\tau$). + - $score$ = availability score of the validator ($0.0 \\le score \\le 1.0$).
56-61: Add boundary example at τ and fix list indentation (MD007)- - **Examples** (with $base\\_reward = 0.7$, $α = 0.5$): - - $score = 1.0$ → $reward = 0.7 AUM$ - - $score = 0.98$ → $reward = 0.693 AUM$ - - $score = 0.6$ (below $\tau$) → excluded → $reward = 0$ - - $score = 0.0$ (below $\tau$) → excluded → $reward = 0$ +- **Examples** (with $base\\_reward = 0.7$, $\\alpha = 0.5$): + - $score = 1.0$ → $reward = 0.7\\,\\mathrm{AUM}$ + - $score = 0.98$ → $reward \\approx 0.693\\,\\mathrm{AUM}$ + - $score = 0.666667 \\approx \\tau$ → $reward \\approx 0.5833\\,\\mathrm{AUM}$ + - $score = 0.6$ (below $\\tau$) → excluded → $reward = 0$ + - $score = 0.0$ (below $\\tau$) → excluded → $reward = 0$
73-78: Mirror the τ boundary in Test Cases and keep consistent notation-- Validator $score = 1.0$, $reward = 0.7$ -- Validator $score = 0.98$, $reward ≈ 0.693$ -- Validator $score = 0.6$ (below $\tau$), $reward = 0$ -- Validator $score = 0.0$ (below $\tau$), $reward = 0$ -- Validator $score < 0.666667$ and excluded from committee → $reward = 0$ +- Validator $score = 1.0$, $reward = 0.7$ +- Validator $score = 0.98$, $reward \\approx 0.693$ +- Validator $score = 0.666667 \\approx \\tau$, $reward \\approx 0.5833$ +- Validator $score = 0.6$ (below $\\tau$), $reward = 0$ +- Validator $score = 0.0$ (below $\\tau$), $reward = 0$ +- Validator $score < 0.666667$ and excluded from committee → $reward = 0$
86-87: Reword “Fairness” to reflect exclusion below τCurrent text suggests avoiding harsh penalties, but below-τ exclusion is zero-reward. Suggest:
- - **Fairness**: Ensures consistent uptime is rewarded but prevents harsh - penalties that could discourage participation. + - **Fairness**: Rewards consistent uptime; below-$\\tau$ exclusion should include clear re-entry rules to avoid overly harsh, prolonged penalties.
45-46: Define “AUM” on first useReaders may not know the unit. Add a brief parenthetical definition at first mention.
48-51: Math rendering checkEnsure the site/build pipeline renders LaTeX (
$$ ... $$) and inline math. If not, provide an ASCII fallback formula in a code block.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- MCP integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
AIPs/aip-2.md(1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
AIPs/aip-2.md
36-36: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
38-38: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
40-40: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
43-43: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
46-46: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
52-52: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
53-53: Unordered list indentation
Expected: 4; Actual: 6
(MD007, ul-indent)
54-54: Unordered list indentation
Expected: 4; Actual: 6
(MD007, ul-indent)
57-57: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
58-58: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
59-59: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
60-60: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
🔇 Additional comments (1)
AIPs/aip-2.md (1)
10-11: Confirm discussion referencePlease verify that
discussion-no: 3points to the intended public discussion thread/issue and matches project conventions.
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
AIPs/aip-2.md (1)
6-6: Automerge blocker: Author header must contain username/email in angle bracketsPer the repo’s automerge policy, wrap the GitHub handle or public email in
< >. This was flagged earlier and still needs updating.-author: Javad Rajabzadeh (@ja7ad) +author: Javad Rajabzadeh <@ja7ad>
🧹 Nitpick comments (5)
AIPs/aip-2.md (2)
4-5: Make description a folded scalar to avoid YAML/front-matter line-break quirksEnsures a single-line meta description in templates.
-description: Adjust validator rewards proportionally to their availability score to - incentivize consistent uptime and reliable participation. +description: >- + Adjust validator rewards proportionally to their availability score to incentivize + consistent uptime and reliable participation.
41-54: Define the reward unit once (what is “AUM”?)If “AUM” is a chain-specific unit, add a short parenthetical or footnote defining it on first use to avoid ambiguity.
_includes/head.html (3)
7-7: Use rel="icon" instead of "alternate icon" for broader UA supportMinor compatibility/consistency tweak.
- <link rel="alternate icon" type="image/x-icon" href="{{ '/assets/favicons/favicon.ico' | relative_url }}"> + <link rel="icon" type="image/x-icon" href="{{ '/assets/favicons/favicon.ico' | relative_url }}">
4-9: Make theme-color/msapplication meta unconditional (match favicon placement)They’re currently only in the
elsebranch, so AIP pages miss them. Move near the favicon block and remove fromelse.<meta name="viewport" content="width=device-width, initial-scale=1" /> + <meta name="msapplication-TileColor" content="#da532c"> + <meta name="theme-color" content="#ffffff"> @@ - <meta name="msapplication-TileColor" content="#da532c"> - <meta name="theme-color" content="#ffffff">Also applies to: 18-19
8-8: Optional: add Safari pinned tab icon if asset existsImproves macOS/iOS Safari integration.
<link rel="manifest" href="{{ '/assets/favicons/site.webmanifest' | relative_url }}"> + <link rel="mask-icon" href="{{ '/assets/favicons/safari-pinned-tab.svg' | relative_url }}" color="#5bbad5">
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- MCP integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
AIPs/aip-2.md(1 hunks)_includes/head.html(1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
AIPs/aip-2.md
36-36: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
37-37: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
38-38: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
39-39: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
42-42: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
45-45: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
51-51: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
52-52: Unordered list indentation
Expected: 4; Actual: 6
(MD007, ul-indent)
53-53: Unordered list indentation
Expected: 4; Actual: 6
(MD007, ul-indent)
56-56: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
57-57: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
58-58: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
59-59: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
60-60: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
🔇 Additional comments (2)
AIPs/aip-2.md (1)
68-70: Re-check “No backward compatibility issues” claimThe spec introduces temporary committee exclusion for scores < τ. If committee membership logic changes, this can be consensus-affecting. Confirm whether exclusion already exists and this AIP only changes reward scaling, or update this section to note consensus implications and rollout.
_includes/head.html (1)
4-9: Unconditional, root-relative favicons: LGTMUsing
relative_urland moving the block above the layout conditional fixes broken paths on nested pages and ensures icons load everywhere.
Pull Request
We have a GitHub bot that automatically merges certain PRs. Your PR will be merged immediately if it meets the following criteria:
Authorheader of all affected PRs, inside<triangular brackets>.PR Checklist
Please confirm that your PR meets the following requirements:
Thank you for contributing to Aerium Improvement Proposals! 🚀
Summary by CodeRabbit
Documentation
Bug Fixes