Skip to content

Commit 72b12eb

Browse files
committed
SIMD-0123: Block Fee Distribution
1 parent 9347aec commit 72b12eb

File tree

1 file changed

+144
-0
lines changed

1 file changed

+144
-0
lines changed
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
---
2+
simd: '0123'
3+
title: Block Fee Distribution
4+
authors: Justin Starry (Anza)
5+
category: Standard
6+
type: Core
7+
status: Draft
8+
created: 2024-03-10
9+
feature: (fill in with feature tracking issues once accepted)
10+
---
11+
12+
## Summary
13+
14+
A new mechanism for distributing block fees to delegated stake accounts is
15+
proposed to allow validators to share block fee revenue with their delegators.
16+
Validators will be able to specify a commission rate for block fees and the
17+
protocol will automatically distribute the remaining fees to delegated stake
18+
accounts at the end of each epoch.
19+
20+
## Motivation
21+
22+
Delegated stake directly increases the number of blocks that a validator is allocated
23+
in an epoch leader schedule but the core protocol doesn't support diverting any of
24+
that extra revenue to stake delegators.
25+
26+
## Alternatives Considered
27+
28+
Due to the lack of core protocol support for this feature, validators have
29+
developed independent ways to distribute block revenue which is not enforced by
30+
the core protocol. For example, the Cogent validator diverts part of its fee
31+
revenue to NFT holders. But it's up the NFT holders to audit and hold Cogent
32+
accountable to promised commission.
33+
34+
Another alternative is Jito's mechanism for block "tips" (not fees, but the idea
35+
is similar). Jito's validator implementation includes a tip distribution program
36+
which it instructs validator operators to divert all of their tips to but cannot
37+
enforce perfect compliance. It's up to stakers and the Jito team to audit
38+
compliance by validator operators. This mechanism requires trusting a
39+
third-party (in this case Jito) to calculate reward distribution in an accurate
40+
and fair mannger. It also relies on using a merkle tree to distribute fees to
41+
all stake accounts and the distributed fees are not automatically staked in
42+
recipient stake accounts.
43+
44+
## New Terminology
45+
46+
- validator fee program: New core program which supports diverting a portion of
47+
block fees to stake delegators
48+
49+
- validator fee account: New account type which supports setting a commission
50+
for collected block fees
51+
52+
## Detailed Design
53+
54+
Currently, all block fees, including both transaction base fees and priority fees,
55+
are collected into a validator's node id account. As of SIMD 85, the validator id account
56+
must be both system-owned and rent-exempt to receive collected fees.
57+
58+
In order to allow validators to set a block fee commission rate, a new validator
59+
fee program and validator fee distribution account is proposed below. Note that
60+
vote accounts cannot be used because there isn't a guaranteed 1:1 mapping from
61+
validator node id addresses to vote accounts.
62+
63+
Since validator node id's are not easily changed and are predominantly used for
64+
paying vote transaction fees, this proposal introduces new fee distribution
65+
accounts whose addresses are derived from validator node ids at a derivation
66+
path proposed below.
67+
68+
### Block Fee Collection
69+
70+
After all transactions are processed in a block for a given leader, rather than
71+
collecting fees into the validator node id account, the protocol REQUIRES
72+
checking the existence of an initialized validator fee account derived from the
73+
leader's node id address. If no account is found at that path or the account has
74+
not been initialized, fees MUST continue being collected into the validator node
75+
id account balance in adherence to SIMD 85 fee collector constraints. If an
76+
initialized account is found, the account MUST be loaded and deserialized to
77+
determine the leader's fee commission. Then the protocol REQUIRES that collected
78+
fees are first split at the determined commission rate and then the commission
79+
fee MUST be transferred to the validator node id account and the leftover fees
80+
MUST be transferred to the validator fee account.
81+
82+
### Block Fee Reward Calculation
83+
84+
At the end of an epoch, validator fee accounts MUST be derived for all validator
85+
node id's in the epoch leader schedule. The protocol REQUIRES checking if an
86+
initialized validator fee account exists and has a lamport surplus above its
87+
rent-exempt balance. For every validator fee account with a lamport surplus,
88+
the lamport surplus is divided evenly by delegated stake weight across all vote
89+
accounts.
90+
91+
TODO: Prevent vote accounts from changing node id?
92+
TODO: Prevent multiple vote accounts for one node?
93+
94+
### Block Fee Reward Distribution
95+
96+
Each fee reward calculated for a delegated stake account will be included into a
97+
list of reward entries which MUST be partitioned and distributed according to
98+
SIMD 118.
99+
100+
101+
### Validator Fee Program
102+
103+
Created as an enshrined SVM program..
104+
105+
TODO
106+
107+
- `InitFeeAccount`
108+
- `UpdateFeeCommission`
109+
110+
### Validator Fee Account
111+
112+
TODO
113+
114+
- `account_type`
115+
- `version`
116+
- `commission`
117+
118+
### Validator Fee Derived Address
119+
120+
TODO
121+
122+
1. `"VALIDATOR_FEE"`
123+
2. Validator node id address
124+
125+
## Impact
126+
127+
Validators will need to initialize and set commissions for their new validator
128+
fee accounts.
129+
130+
Stake delegators will receive additional stake reward income when delegating to
131+
validators who adopt this new feature.
132+
133+
## Security Considerations
134+
135+
TODO
136+
137+
## Drawbacks *(Optional)*
138+
139+
Why should we not do this?
140+
141+
## Backwards Compatibility *(Optional)*
142+
143+
Does the feature introduce any breaking changes? All incompatibilities and
144+
consequences should be listed.

0 commit comments

Comments
 (0)