Skip to content
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

Tracking issue for fixing minimal required stake #11953

Closed
Longarithm opened this issue Aug 15, 2024 · 2 comments
Closed

Tracking issue for fixing minimal required stake #11953

Longarithm opened this issue Aug 15, 2024 · 2 comments
Labels
A-chain Area: Chain, client & related C-housekeeping Category: Refactoring, cleanups, code quality

Comments

@Longarithm
Copy link
Member

Longarithm commented Aug 15, 2024

We should consider simpler configuration for minimal required stake. For the current one, we missed accidental increase to 100K NEAR for 2.0.0 release.
Some lower boundary must exist, e.g. 1 staked NEAR causes more chain overhead than gives benefit. We probably should just set boundary explicitly, e.g. by saying that proposal is ignored only if stake < 10K NEAR. But some dependency on total stake must exist as well because inflation exists.

See https://near.zulipchat.com/#narrow/stream/308695-nearone.2Fprivate/topic/2.2E0.2E0/near/462393447 for more details.

#11947 was the temporary fix for mainnet setting min stake ratio to 1/62500 which is ~10K NEAR as of 2024-08-15.

@Longarithm Longarithm added C-housekeeping Category: Refactoring, cleanups, code quality A-chain Area: Chain, client & related labels Aug 16, 2024
@foxreymann
Copy link

@Longarithm So 1/62500 * x = ~10k NEAR. What is x in this equation? Please explain.

@Longarithm
Copy link
Member Author

The protocol iterates over stake proposals in non-increasing order and adds account to the validator list if this condition is met: https://github.com/near/nearcore/blob/master/chain/epoch-manager/src/validator_selection.rs#L400-L409

account_stake / (total_current_validator_stake + account_stake) > 1 / 62500

So roughly account stake must be at least total_validator_stake / 62500. Now total validator stake is 610887913 NEAR, so threshold will be ~= 9774 NEAR. In other words, x is total validator stake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-chain Area: Chain, client & related C-housekeeping Category: Refactoring, cleanups, code quality
Projects
None yet
Development

No branches or pull requests

2 participants