-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raise stake minimum delegation #22559
Comments
A few comments on this proposal:
Note that this calculation assumes perfect validator performance, but thankfully almost all non-delinquent validators land a very high percentage of votes. I hope it helps!
You can only move lamports out of a stake account with a |
I ran some queries using the postgres accounts db plugin:
So stake accounts already have a minimum balance requirement of 0.0022 sol, which is greater than the 0.001 minimum for stake pools, thus superseding that minimum, yes? @joncinque If 1 sol is too high, what about bumping the minimum to 0.1 sol? |
Sorry, I should have been clearer on this. The 0.001 minimum for stake accounts in stake pools is on top of the rent-exemption, so it would be more like ~0.00328288 SOL. A minimum of 0.1 SOL will still be pretty tough for stake pools that want to include 1k validators, but maybe that's fine, and they'll just take longer to add of all those stakes. And then for rebalancing, they'll have to be sure to respect that minimum. I'm not a huge fan of the solution, but if 20% fewer stake accounts makes a difference, it'll have to be done, right? Funny story, right before seeing this issue, I coincidentally created a stake with 0.01 SOL 😬 |
Oh gotcha! Yes, I missed this earlier.
Is it beneficial for a pool to spread a very small amount of SOL across a lot of validators? I'm not sure if that's better than delegating to a smaller number of validators with more SOL each, right? Esp if the goal is to increase decentralization and increase the superminority. Then, as you said, add more validators over time. Even 1 SOL seems quite reasonable to me still.
Yah.
I don't think the number of stake accounts is the concern, but rather the ability to create lots of new accounts cheaply. Which ties back to #21348 and #21604. |
@joncinque can you elaborate on what's so difficult about bootstrapping pools with this change? It seems like you're suggesting pools should be allowed to create many small stake accounts which I think is a bad thing. They are "pools" which means they pool together assets so why wouldn't the pool be able to meet the same threshold of X SOL that every individual has to reach? |
@joncinque how much stake per validator do the top pools delegate currently? |
I would like to see us push up >= 10 SOL minimum, 1 SOL is still too low of a barrier to create many stake accounts |
If that's the case, then shouldn't rent be increased? With millions of token accounts, and 500k stake accounts, seems like that would better serve the issue all at once.
We have to change up the design for adding / removing validators. Currently, the manager fronts that amount and gets nothing in return, which is fine for small amounts. We'll make it come from the reserve instead. We were thinking about making the stake pool program non-upgradeable, so it would be best to get this change in sooner to update the program. Or maybe we punt it to v2.
It's quite a range, especially for Marinade. Looks like most stake pools would be ok even with a 10 SOL minimum. Note that https://solanacompass.com/stake-pools is pretty fun to poke around! The current foundation pool is only doing 1-3 SOL per validator, but that's because most of the funds are still in the old system. It's too bad to force people with small amounts of SOL to go through a stake pool with the smart contract / manager risk, but liveness of the chain is certainly more important. |
Yes, I agree. However, increasing rent is harder than increasing the minimum stake. See the discussion in #21348 for more information.
Agreed. |
The absolute number of stake accounts is definitely a concern |
Would this need a governance vote too? If yes, how does that process work? |
Yeah definitely. We haven't done a real one. The closest thing was enabling inflation, which was basically unanimous |
Probably with this: https://spl.solana.com/feature-proposal Instead of a core contributor holding the private key for a feature activation, we can use a PDA from the feature proposal program. |
You are proposing that people who have less than $1,400 (at the time of writing) don’t get to stake directly — they don’t get to make an independent choice of what validator they stake with? That sounds like it would be bad for censorship-resistance to me. Of course it would be good for stake pools — indeed the high barrier to direct staking is one of the reasons that Lido is successful on Ethereum — but I think it’s important that users can make an independent choice if they want to. |
IMO there should be some governance process before engineering resources are dedicated to the effort |
Any limit can be reduced as code is improved to safely support more stake accounts |
Why? I think we can dedicate eng resources as needed for features to improve the scalability of the protocol. If it doesn't get accepted we revise and try again. We do need some form of this in the short / medium term until we lazily compute stake rewards |
Should the |
For the governance vote, my understanding is that since this basically is to activate a feature, whatever change is voted on needs to be within code that is feature-aware. Specifically, a constant would not work. Is that right? The minimum stake delegation is currently a constant here: solana/sdk/program/src/stake/mod.rs Line 12 in bb9f9c8
In order to have a governance vote to change this value, what would be the right/best way to do enable that?
Or is it possible to have a governance vote, and then change the constant after the fact? (I'm assuming 'no', but want to verify.) |
It's certainly possible but that's not great. The stake program can check whether the feature is enabled itself actually, the bank doesn't need to tell it. Such a feature could be enabled by the workflow that the feature-proposal program provides |
I was talking with @joncinque yesterday about Sysvar stuffs, to try and figure out if that's the best way forward. One pro is that stake pools can query the Sysvar and proactively update their apps to support raising the minimum stake delegation. However, I don't understand all the interactions that Sysvars have with the rest of the system, esp the history/gotchas, so he recommended I get input from @mvines @t-nelson @jackcmay. Wdyt about the Sysvar route? |
A sysvar would be useful for programs (like stake pool programs) so they can read the current minimum balance from the cluster instead of hard coding it |
sysvar sgtm. i'd suggest that we avoid some of the pains of the past and think forward. assume we'll extend it in the future, so wrap it in a versioned |
Sysvar make sense, and one that is not supported by account passing, just |
@t-nelson Is there an existing versioned struct somewhere already that I can look at/use as reference? |
@jackcmay Does that mean not implementing |
Nonce and vote accounts are both versioned |
Yeah, I would implement |
Yeah... there's lots of places that assume the sysvars implement |
Ok! I've gone a deep way into the rabbit hole of Sysvars. I've put up a PR with my work so far. As you can see, it touches a lot of stuff, and it's not complete (the PR calls out the known remaining work). It's also likely that the PR can be split up into smaller PRs. Ultimately, the work on this PR has made me want to check in and ask is this worth it? Adding the sysvar is a means-to-an-end: enabling a governance vote to rase the minimum delegation amount. The sysvar, in general, would also be nice to have for programs to query, but it's not desperately needed at the moment. And going down the sysvar-route, implementing it not as an account is new and also not strictly necessary. I'm wondering where to drawn the line on the amount of work/feature creep for this. How valuable—is it really—to raise the minimum delegation amount? How valuable is a true governance vote w.r.t. handling the raise? How valuable is a new-style sysvar (one that's not in an account)? Hoping to get some guidance on this. Thanks in advance! @jstarry @joncinque @mvines @jackcmay @t-nelson |
As far as I understand from the original comment, it’s a hack to try to reduce the accounts data size, but stake accounts are only a tiny fraction of the accounts, and adding a minimum delegation amount has severe downsides, so to me it does not seem worth changing. |
I know you're already taken the sysvar approach but what about making use of the new return value feature instead to get the minimum value? The stake program could have a
It's valuable because it gives validators a way to limit the amount of epoch boundary calculations they need to do to deliver rewards to stakers (#20384). I'm less worried about the account data size because rent fee adjustments can be made if account data gets too large. We just don't have any knobs to turn if the number of stake delegations grows large at the moment.
Valuable because it's up to the network to decide how staking economics change. Why do you bring this up? Implementation can make use of the feature proposal program as you've already outlined in the issue tasks.
In my opinion, not too valuable. I'd prefer we move quicker to add the ability for the cluster to counteract excessive stake delegations without blocking on new runtime functionality like account-less sysvars. |
Love it! Yes, this sounds like a better approach. I'll switch over to this.
Great! I was wondering if this was also an issue, so good to know.
This was to explore how direct the vote needed to be. On one side is the sysvar, where the vote would feature gate an update to the sysvar's state, and therefor the value for the minimum stake delegation. On the other side is a vote that does not touch a sysvar and instead the minimum stake delegation constant is updated after the fact. I am not endorsing this approach; rather I wanted to make sure I understood the spectrum of options.
💯 |
Running some queries with Geyser:
Number of stake accounts with lamports < 1 SOL = 537,899 |
Sorry the CLI isn't very clear on this in its help text -- if a split-stake operation is done, does it have to be to a new stake account? Or can it be into a stake account in the same state (active/not active) and delegation (either both not delegated, or both delegated to the same validator)? If it must be a new stake account, then a minimum of 1 SOL in a stake account would mean that it's not possible to split-stake off less than 1 SOL. I think this would be a big issue, because users who want to profit-take on their own schedule would be unable to do so. |
The destination of a split instruction must be solana/programs/stake/src/stake_state.rs Lines 665 to 667 in 348fe9e
As per my answer in the feature-gate issue: #24357 (comment) For non-delegated accounts, this is possible. For delegated accounts, there was a discussion on Discord on how to handle this case. Here's a link to the end of that discussion: |
Your numbers don't add up. Your data shows 151k below 1 SOL, not sure how you then get 537k. From my own analysis today of all accounts owned by the Stake Program there are now 587k total stake accounts of which 185k have a balance below 1 SOL and 225k have an active stake below 1 SOL. That's in the 30% range. |
From my data
total stake accounts are 587,000 Setting a stake delegation of 0.1 SOL or even 0.01 SOL would also achieve a significant reduction with less of a burden on small users and be more future compatible for changes in the SOL price affecting people's ability to create accounts meeting the min delegation. 1 SOL is arbitrary, as are all numbers, but sub-1 SOL accounts account for 38.3% of stakes, while sub 0.1 SOL accounts account for 23.5% of stakes, while being a 10x reduction in min delegation amount. At the same time the underlying issue of rewards computation shouldn't depend on us having to continuously artificially reduce the number of stake accounts somehow. My vote is for 0.1 SOL = 100m lamports. (Edited to add more data: Everstake has 51k stakes with active stake <1 SOL, might be worth reaching out to Exodus about how they prompt users on stake creation. Chorus and and stake.systems have 45k accounts between them which have an average active stake of < 0.05 SOL in aggregate. For Chorus the avg stake of these accounts is incredibly low at 0.029 SOL. The top 4 validators by delegated stakes <1 SOL account for 113,500 stake accounts, or over 50% of all stakes below 1 SOL. Top 50 validators sorted by no of accounts delegated with active stake < 1 SOL attached. All numbers are on active (delegated) stake, and exclude rent exempt reserve and deactivated stake accounts. For anyone wishing to parse the data themselves,
/end more data) |
Thanks for double checking these numbers. Yes, the first set of data showed 151k accounts with a balance below 1 SOL. The second query returned a count of 537k accounts with a balance below 1 SOL. I'll need to investigate why the second query returned such a different value. |
a question that came up from a wallet team regarding what happens to existing stake accounts that are below the minimum stake threshold, recording here for posterity: from @brooksprumo:
|
Problem
Stake accounts have a very low minimum delegation requirement (just 1 lamport, on top of being rent exempt). This may cause the number of stake accounts to be higher than necessary, which affects both #20384 and #21604.
Proposed Solution
Raise the minimum delegation for stake accounts. Right now the minimum delegation is 1 lamport. I feel the minimum delegation should be much higher (i.e. >= 1 SOL).
Details
Minimum Balance and Rent
Currently, stake accounts must be rent exempt. At the moment, this amount cannot be staked, so an additional 1 lamport is required for new accounts. For the sake of this proposal, the rent exempt reserve concept shall not be changed, just the additional balance. This means that the minimum delegation is currently 1 lamport, and I'm proposing increasing that to 1 SOL.
Creating Accounts
No changes needed.
Delegating
The minimum delegation amount will increase from 1 lamport. A new error
StakeError::InsufficientDelegation
will indicate if the requested delegation amount is below the minimum.Split/Withdraw
Stake accounts' balance shall stay at-or-above the minimum balance, similar to creating stake accounts. With the one exception of withdrawing all lamports/closing the account.
If the stake account is already delegated, then both the source and destination accounts must retain a delegation amount at least the minimum delegation.
Querying the Minimum Delegation Amount
As to not change the stake account's data structure, new functions/instructions will be added to query the minimum delegation for stake accounts.
Governance/Voting
Voting/approving this proposal will use the feature proposal program to handle the governance.
Related
Other Protocols
Ethereum
Eth 2 requires 32 ETH to stake to be a validator. Smaller amounts of eth can be staked in stake pools. link
Avalanche
The minimum amount required to stake to a delegator is 25 AVAX (not counting pools), and 2000 AVAX to be a validator. link
Polkadot
From what I can tell, nominating has a minimum of 80 DOT (about to be 120 DOT), which I believe is like staking to a delegator. link
Fantom
Staking on Fantom has a 1 FTM minimum. link
Tasks
Features
The text was updated successfully, but these errors were encountered: