Skip to content

feat: XDC Network Protocol Upgrade Proposal - Reward Mechanism & Node Tiers#36

Open
AnilChinchawale wants to merge 3 commits intomainfrom
feature/proposal-reward-mechanism-upgrade
Open

feat: XDC Network Protocol Upgrade Proposal - Reward Mechanism & Node Tiers#36
AnilChinchawale wants to merge 3 commits intomainfrom
feature/proposal-reward-mechanism-upgrade

Conversation

@AnilChinchawale
Copy link
Member

@AnilChinchawale AnilChinchawale commented Feb 19, 2026

Summary

This PR adds a comprehensive proposal for XDC Network Protocol Upgrade including:

New Features

  • Three-tier node system: Master Nodes (108), Protector Nodes (216), Observer Nodes (1000)
  • Unlimited staking with fixed per-node rewards
  • Fee burning mechanism (30% of base gas fees)
  • Enhanced gas model with redistribution to Protector/Observer nodes

Technical Changes

  • New V2Config struct with reward parameters
  • Implementation steps for epoch-based reward distribution
  • Penalty mechanism for inactive nodes
  • Gas limit enhancements

Files Changed

  • (NEW)

References


Status: Draft - Ready for community review

Summary by CodeRabbit

  • Documentation
    • Added new documentation detailing a proposed XDC Network governance protocol upgrade. Covers the introduction of a three-tier node system architecture with differentiated rewards per node type, enhanced fee burning mechanisms, updated gas redistribution model, implementation procedures, technical specifications, security considerations, risk mitigation strategies, and a comprehensive deployment timeline.

- Three-tier node system (Master, Protector, Observer)
- Unlimited staking with fixed per-node rewards
- Fee burning mechanism (30% base fee)
- Gas redistribution model
- Technical V2Config implementation
- Timeline and security considerations

Author: Community Proposal
Date: February 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 19, 2026

Warning

Rate limit exceeded

@AnilChinchawale has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 18 minutes and 37 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📝 Walkthrough

Walkthrough

A comprehensive protocol upgrade proposal document is added for the XDC Network, detailing a three-tier node system with staking mechanisms, fee distribution models, implementation specifications, and deployment timeline.

Changes

Cohort / File(s) Summary
Protocol Upgrade Documentation
docs/xdcchain/governance/proposal-reward-mechanism-upgrade.md
New documentation file introducing XDC Network protocol upgrade with three-tier node architecture (Master, Protector, Observer), unlimited staking with fixed per-node rewards, enhanced fee burning, gas redistribution models, V2Config implementation details, security considerations, and mainnet activation timeline.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A governance dream takes shape today,
Three tiers of nodes in noble array,
Master, Protector, Observer so wise,
Rewards redistribute 'neath digital skies,
The protocol blooms with upgraded delight! 📜✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: a comprehensive protocol upgrade proposal introducing reward mechanism changes and a three-tier node system for the XDC Network.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/proposal-reward-mechanism-upgrade

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://XinFinOrg.github.io/Docs/pr-preview/pr-36/

Built to branch gh-pages at 2026-02-19 18:24 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (1)
docs/xdcchain/governance/proposal-reward-mechanism-upgrade.md (1)

56-62: Proposal does not address the ~7.8× increase in annual token issuance.

Under the new model, total annual block rewards are:

Tier Nodes Annual/Node Annual Total
Master 108 1,000,000 XDC 108,000,000 XDC
Protector 216 800,000 XDC 172,800,000 XDC
Observer 1,000 400,000 XDC 400,000,000 XDC
Total ~680,800,000 XDC/year

Current annual issuance (5,000 XDC/epoch × ~17,532 epochs/year) is approximately 87,700,000 XDC/year. The proposal would increase block-reward emissions by approximately 7.8×. The 30% base-fee burn provides only partial offset and is volume-dependent. The Conclusion section lists "sustainable reward model" as a benefit without any quantitative justification. A tokenomics section quantifying net inflation, total supply trajectory, and the break-even burn volume required for net-deflationary operation is necessary for community governance review.

Also applies to: 172-180

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/xdcchain/governance/proposal-reward-mechanism-upgrade.md` around lines
56 - 62, The proposal must explicitly quantify the ~7.8× increase in annual
issuance and show net-token effects: add a new "Tokenomics" subsection
(referencing the existing "2.2 Proposed Per-Epoch Rewards" table and the
Conclusion section) that (1) computes total annual block rewards by tier (use
the Master/Protector/Observer counts and per-node annual rewards shown), (2)
compares that to current annual issuance (5,000 XDC/epoch × ~17,532 epochs/year)
to show the multiplication factor, (3) models net inflation under the proposed
30% base-fee burn (show required burn volume to reach break-even and include a
supply trajectory table/graph over a multi-year horizon), and (4) include the
same quantitative analysis for the other referenced lines (172–180) so the
proposal provides a clear, numeric justification for the claim of a "sustainable
reward model."
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/xdcchain/governance/proposal-reward-mechanism-upgrade.md`:
- Around line 116-120: The "3.3 Penalty & Inactivity" section uses vague terms
("Serve few epochs before starting rewards") and lacks concrete slashing rules;
replace that text with precise, implementable parameters: specify an exact
number of warm-up epochs (e.g., N epochs) before rewards begin for a node,
define "inactive" quantitatively (e.g., contribution threshold T per epoch),
enumerate clear malicious-behavior criteria for slashing (e.g., double-signing,
equivocation, prolonged downtime > M consecutive epochs, or incorrect state
submissions), state exact slashing percentages for each offense category (e.g.,
X% bond for minor offenses, Y% + temporary ban for major offenses), define
recovery/appeal mechanics (how to submit appeals, evidence window in epochs,
conditions for partial/full bond restoration and unstaking delay), and include
the authoritative labels used in the implementation (reference the section
header "3.3 Penalty & Inactivity", the phrase "Serve few epochs before starting
rewards", and "Slashing mechanism") so authors can replace placeholders with
these concrete thresholds, percentages, and procedural steps for the hard-fork
spec.
- Around line 107-114: Step 6 in the "Implementation Steps" list contradicts the
three-tier fixed per-node reward model described in Section 2.2; update the
"Apply 90/10 split with Foundation Wallet" line in the Implementation Steps (the
numbered list under "3.2 Implementation Steps") to either remove it entirely or
replace it with an explicit statement of the Foundation Wallet treatment under
the new scheme (e.g., "No additional Foundation Wallet split; rewards are fixed
per-node across Master/Protector/Observer tiers as defined in Section 2.2" or an
explicit percent if intended), and ensure the revised line clearly references
the three-tier distribution so readers see it does not stack with the per-node
rewards.
- Around line 95-104: The V2Config struct uses float64 for monetary fields which
is unsafe; change MasternodeReward, ProtectorReward, ObserverReward, FeeBurnRate
(and MinStakeAmount if representing token amounts) to integer/fixed-point types
used elsewhere (e.g., *big.Int for token amounts via math/big, and an integer
scaled unit for FeeBurnRate such as parts-per-billion or basis points) to ensure
exact arithmetic and consensus safety; also add the missing MaxMasternodeNodes
int field (to represent the 108-node cap) alongside MaxProtectorNodes and
MaxObserverNodes. Ensure constructors/JSON (un)marshalling logic and any code
using V2Config (references to V2Config, MasternodeReward, ProtectorReward,
ObserverReward, FeeBurnRate, MinStakeAmount, MaxProtectorNodes,
MaxObserverNodes) are updated to handle the new types and scaling convention.
- Around line 185-189: Update the three broken internal markdown links in the
listed bullet items: change "../whitepaper.md" to "../../whitepaper.md", change
"xdpos.md" to "../xdpos.md", and change "../learn/xdc-architecture.md" to
"../../learn/xdc-architecture.md" so the links in the block containing "[XDC
Whitepaper]", "[XDPoS Documentation]", and "[XDC Architecture]" resolve to the
correct files.

---

Nitpick comments:
In `@docs/xdcchain/governance/proposal-reward-mechanism-upgrade.md`:
- Around line 56-62: The proposal must explicitly quantify the ~7.8× increase in
annual issuance and show net-token effects: add a new "Tokenomics" subsection
(referencing the existing "2.2 Proposed Per-Epoch Rewards" table and the
Conclusion section) that (1) computes total annual block rewards by tier (use
the Master/Protector/Observer counts and per-node annual rewards shown), (2)
compares that to current annual issuance (5,000 XDC/epoch × ~17,532 epochs/year)
to show the multiplication factor, (3) models net inflation under the proposed
30% base-fee burn (show required burn volume to reach break-even and include a
supply trajectory table/graph over a multi-year horizon), and (4) include the
same quantitative analysis for the other referenced lines (172–180) so the
proposal provides a clear, numeric justification for the claim of a "sustainable
reward model."

Comment on lines +76 to +88
### 2.4 Fee Burning & Gas Enhancement

#### Base Fee Burning (EIP-1559 Style)

- A portion of gas fees is burned from each transaction
- Base fee varies based on network congestion
- Burn rate: 30% of base fee

#### Priority Fee Redistribution

- 70% of priority fees go to the block proposer
- 30% distributed to Protector and Observer nodes

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Fee model is internally inconsistent between Section 2.4 and Section 4.1.

Two separate issues:

  1. Disposition of the non-burned base fee is never specified. Section 2.4 states 30% of the base fee is burned. Section 4.1's table echoes this. Neither explains what happens to the remaining 70% of the base fee (burned entirely? returned to validators? added to the network fee pool?).

  2. "Network Fee" in the Section 4.1 table appears to be a third, distinct fee component, but Section 2.4 describes only two fee types (base fee + priority fee). The 30% figure in the "Network Fee" row matches the 30% priority-fee redistribution from Section 2.4, but presenting it as a separate row in a table alongside "Base Fee" and "Priority Fee" implies it is an additional charge, inflating the perceived total fee burden and misleading implementers.

The table should be restructured to clearly show that the 30% "Network Fee" is a subset of the priority fee, not an additive component, and the fate of the 70% of base fee that is not burned must be specified.

🔧 Suggested restructured fee table for Section 4.1
-| Component | Description |
-|-----------|-------------|
-| Base Fee | Dynamic, burned (30%) |
-| Priority Fee | Goes to validator (70%) |
-| Network Fee | Distributed to Protector/Observer nodes (30%) |
+| Component      | Split           | Destination                                  |
+|----------------|-----------------|----------------------------------------------|
+| Base Fee (30%) | Burned          | Deflationary burn                            |
+| Base Fee (70%) | [TBD]           | [Specify: e.g., burned, treasury, validator] |
+| Priority Fee   | 70% / 30%       | Block proposer / Protector + Observer nodes  |

Also applies to: 128-132

Comment on lines +95 to +104
```go
type V2Config struct {
MasternodeReward float64 `json:"masternodeReward"`
ProtectorReward float64 `json:"protectorReward"`
ObserverReward float64 `json:"observerReward"`
MaxProtectorNodes int `json:"maxProtectorNodes"`
MaxObserverNodes int `json:"maxObserverNodes"`
FeeBurnRate float64 `json:"feeBurnRate"`
MinStakeAmount uint64 `json:"minStakeAmount"`
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

float64 is unsafe for token reward amounts — use integer/fixed-point types.

Blockchain financial values must be represented with exact arithmetic. float64 fields for MasternodeReward, ProtectorReward, ObserverReward, and FeeBurnRate introduce floating-point rounding errors that will produce non-deterministic results across nodes, causing consensus failures. The XDC codebase already uses *big.Int (via the Go math/big package) for all token denominations. Additionally, there is no MaxMasternodeNodes field for the 108-node cap, while MaxProtectorNodes and MaxObserverNodes are both present.

🔧 Proposed fix for V2Config struct
 type V2Config struct {
-    MasternodeReward   float64 `json:"masternodeReward"`
-    ProtectorReward   float64 `json:"protectorReward"`
-    ObserverReward    float64 `json:"observerReward"`
-    MaxProtectorNodes int     `json:"maxProtectorNodes"`
-    MaxObserverNodes  int     `json:"maxObserverNodes"`
-    FeeBurnRate      float64 `json:"feeBurnRate"`
-    MinStakeAmount   uint64  `json:"minStakeAmount"`
+    MasternodeReward   *big.Int `json:"masternodeReward"`
+    ProtectorReward    *big.Int `json:"protectorReward"`
+    ObserverReward     *big.Int `json:"observerReward"`
+    MaxMasternodeNodes int      `json:"maxMasternodeNodes"`
+    MaxProtectorNodes  int      `json:"maxProtectorNodes"`
+    MaxObserverNodes   int      `json:"maxObserverNodes"`
+    // FeeBurnRate stored as basis points (e.g., 3000 = 30%)
+    FeeBurnRate        uint64   `json:"feeBurnRate"`
+    MinStakeAmount     *big.Int `json:"minStakeAmount"`
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/xdcchain/governance/proposal-reward-mechanism-upgrade.md` around lines
95 - 104, The V2Config struct uses float64 for monetary fields which is unsafe;
change MasternodeReward, ProtectorReward, ObserverReward, FeeBurnRate (and
MinStakeAmount if representing token amounts) to integer/fixed-point types used
elsewhere (e.g., *big.Int for token amounts via math/big, and an integer scaled
unit for FeeBurnRate such as parts-per-billion or basis points) to ensure exact
arithmetic and consensus safety; also add the missing MaxMasternodeNodes int
field (to represent the 108-node cap) alongside MaxProtectorNodes and
MaxObserverNodes. Ensure constructors/JSON (un)marshalling logic and any code
using V2Config (references to V2Config, MasternodeReward, ProtectorReward,
ObserverReward, FeeBurnRate, MinStakeAmount, MaxProtectorNodes,
MaxObserverNodes) are updated to handle the new types and scaling convention.

Comment on lines +107 to +114
### 3.2 Implementation Steps

1. Pull candidates from parent state of epoch switch block
2. Rank by Candidate Cap (stake from owner + voters)
3. Assign roles (Master, Protector, Observer)
4. Calculate fixed rewards per contributing node
5. Distribute rewards to node owners
6. Apply 90/10 split with Foundation Wallet
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Step 6 ("Apply 90/10 split with Foundation Wallet") contradicts the proposed new reward model.

The new model replaces the flat 90/10 split with fixed per-node rewards across three tiers. Retaining Step 6 verbatim implies the Foundation Wallet split is applied on top of the three-tier distribution, which conflicts with the reward table in Section 2.2. This needs to either be removed or replaced with an explicit statement of what — if anything — the Foundation Wallet receives under the new scheme.

🔧 Suggested replacement for Step 6
-6. Apply 90/10 split with Foundation Wallet
+6. Distribute remaining epoch emissions: [specify Foundation Wallet allocation under new model,
+   e.g., fixed allocation, percentage of total, or zero]
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/xdcchain/governance/proposal-reward-mechanism-upgrade.md` around lines
107 - 114, Step 6 in the "Implementation Steps" list contradicts the three-tier
fixed per-node reward model described in Section 2.2; update the "Apply 90/10
split with Foundation Wallet" line in the Implementation Steps (the numbered
list under "3.2 Implementation Steps") to either remove it entirely or replace
it with an explicit statement of the Foundation Wallet treatment under the new
scheme (e.g., "No additional Foundation Wallet split; rewards are fixed per-node
across Master/Protector/Observer tiers as defined in Section 2.2" or an explicit
percent if intended), and ensure the revised line clearly references the
three-tier distribution so readers see it does not stack with the per-node
rewards.

Comment on lines +116 to +120
### 3.3 Penalty & Inactivity

- Inactive nodes (no contribution during epoch) receive no rewards
- Penalty provision: Serve few epochs before starting rewards
- Slashing mechanism for malicious behavior
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Penalty mechanism lacks quantitative specifics.

"Serve few epochs before starting rewards" is not actionable for implementation — "few" is undefined. Similarly, the slashing mechanism has no stated criteria (what constitutes malicious behavior?), no slashing percentage, and no appeal/recovery process. For a governance proposal that will drive a hard-fork implementation, these must be precisely specified.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/xdcchain/governance/proposal-reward-mechanism-upgrade.md` around lines
116 - 120, The "3.3 Penalty & Inactivity" section uses vague terms ("Serve few
epochs before starting rewards") and lacks concrete slashing rules; replace that
text with precise, implementable parameters: specify an exact number of warm-up
epochs (e.g., N epochs) before rewards begin for a node, define "inactive"
quantitatively (e.g., contribution threshold T per epoch), enumerate clear
malicious-behavior criteria for slashing (e.g., double-signing, equivocation,
prolonged downtime > M consecutive epochs, or incorrect state submissions),
state exact slashing percentages for each offense category (e.g., X% bond for
minor offenses, Y% + temporary ban for major offenses), define recovery/appeal
mechanics (how to submit appeals, evidence window in epochs, conditions for
partial/full bond restoration and unstaking delay), and include the
authoritative labels used in the implementation (reference the section header
"3.3 Penalty & Inactivity", the phrase "Serve few epochs before starting
rewards", and "Slashing mechanism") so authors can replace placeholders with
these concrete thresholds, percentages, and procedural steps for the hard-fork
spec.

Comment on lines +185 to +189

- [Original Proposal](https://www.xdc.dev/gary/proposal-xdc-network-reward-mechanism-upgrade-3kkc)
- [XDC Whitepaper](../whitepaper.md)
- [XDPoS Documentation](xdpos.md)
- [XDC Architecture](../learn/xdc-architecture.md)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# First, locate the proposal file to confirm its directory
echo "=== Locating proposal file ==="
fd -t f "proposal-reward-mechanism-upgrade.md"

echo ""
echo "=== Checking for whitepaper.md ==="
fd -t f "whitepaper.md"

echo ""
echo "=== Checking for xdpos.md ==="
fd -t f "xdpos.md"

echo ""
echo "=== Checking for xdc-architecture.md ==="
fd -t f "xdc-architecture.md"

echo ""
echo "=== Listing docs/xdcchain directory structure ==="
tree -L 2 docs/xdcchain/ 2>/dev/null || find docs/xdcchain -type f -name "*.md" | head -20

Repository: XinFinOrg/Docs

Length of output: 1439


🌐 Web query:

site:xdc.dev proposal-xdc-network-reward-mechanism-upgrade

💡 Result:

The query matches this XDC Developers Forum post:

  • “Proposal: XDC Network Reward Mechanism Upgrade” (Gary) — posted Apr 21, 2025; updated Apr 25, 2025. It proposes changing XDC’s epoch-based rewards (epoch = 900 blocks/rounds; fixed 5000 XDC/epoch in the current config) into a tiered, fixed per-node reward model across Master (1–108), Protector (109–324), and Observer (325–1324) nodes, with distribution still described as 90% to contributing node owners / 10% to the Foundation wallet, and notes the upgrade would require a hard fork and an activation block parameter. [1]

Fix broken internal documentation links.

All three internal links have incorrect relative paths and will not resolve:

  • ../whitepaper.md should be ../../whitepaper.md (file is at docs/whitepaper.md, not docs/xdcchain/whitepaper.md)
  • xdpos.md should be ../xdpos.md (file is at docs/xdcchain/xdpos.md, not docs/xdcchain/governance/xdpos.md)
  • ../learn/xdc-architecture.md should be ../../learn/xdc-architecture.md (file is at docs/learn/xdc-architecture.md, not docs/xdcchain/learn/xdc-architecture.md)

The external link to the XDC Developers Forum post is live and accessible.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/xdcchain/governance/proposal-reward-mechanism-upgrade.md` around lines
185 - 189, Update the three broken internal markdown links in the listed bullet
items: change "../whitepaper.md" to "../../whitepaper.md", change "xdpos.md" to
"../xdpos.md", and change "../learn/xdc-architecture.md" to
"../../learn/xdc-architecture.md" so the links in the block containing "[XDC
Whitepaper]", "[XDPoS Documentation]", and "[XDC Architecture]" resolve to the
correct files.

- Add proposal to Governance nav section
- Update proposal with proper metadata

PR: #36
- Add upcoming protocol upgrades section
- Link to new reward mechanism proposal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant