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

FIP 003: Lowering the staking requirements. #3

Open
bejavu opened this issue Jan 2, 2020 · 21 comments
Open

FIP 003: Lowering the staking requirements. #3

bejavu opened this issue Jan 2, 2020 · 21 comments
Labels
done Deployed on Fuse mainnet

Comments

@bejavu
Copy link
Contributor

bejavu commented Jan 2, 2020

FIP 003: Lowering the staking requirements.

Motivation

We want to give the validator a way to actually benefit from having a lot of delegators. But for this to happen FIP4 needs to be implemented and it can take some time. FIP2 is just around the corner and it will reduce the massive rewards that validators are getting by splitting them with its delegators. So in the meantime, we want to lower the minimum staking requirements to 100K from 3M so validators won’t need delegations to stake and validate.

Suggestion

As mentioned already, lowering the staking requirements to 100K FUSE tokens exactly (no more no less). It can still be split between validator its delegates.
To do so, we need to strictly limit the number of validators to 100, and to choose randomly each cycle up to 100 validators from the eligible validators. Also, we need to keep in mind that if someone has more than 200K FUSE tokens and he wants to validate more, he needs to set up two or more validator machines by himself with a different address. This will be solved in FIP4.

Examples

  • If someone has 100K FUSE tokens he can start to self validate by setting up a node and delegate to himself.
  • If someone has 350K FUSE tokens he can setup 3 nodes with 3 different accounts and delegate each of them 100K FUSE tokens. If he will get 50K FUSE tokens more, he can start a fourth validator node.
  • If there are 20 valid stakers (each has a different account and exactly 100K FUSE tokens stake delegated to him), then the validator set should be compounded of the 20 of them for the next cycle.
  • If there are 120 valid stakers, then each cycle 100 validators will randomly be chosen between that list to be the current cycle validator set. This means that each 100K stake has about 83.33% chance to validate each cycle.
@fileflume
Copy link

  1. Is the maximum tokens for a node still set at 3M?
  2. "then each cycle 100 validators will randomly be chosen" - is there any benefit in having more than 100K (the staking amount) of tokens as more tokens on a node doesn't mean more validating.
  3. How long does a cycle last.
  4. Why 100 validators per cycle - just seems a sensible number?
  5. Does each validator get the same reward - i.e. 1/100th of that cycle's reward. Does having more tokens in the node mean more inflation reward or transaction processing opportunites?

@bejavu
Copy link
Contributor Author

bejavu commented Jan 2, 2020

  1. Is the maximum tokens for a node still set at 3M?

No, the maximum will be also 100K. This is until FIP4.

  1. "then each cycle 100 validators will randomly be chosen" - is there any benefit in having more than 100K (the staking amount) of tokens as more tokens on a node doesn't mean more validating.

See answer 1, no, there is no benefit because you cannot stake more than 100K, That is untill FIP4.

  1. How long does a cycle last.

24 hours

  1. Why 100 validators per cycle - just seems a sensible number?

There is a limit on how many validators we can run since we have to iterate over them in the solidity code is several places and it uses gas. Although gas is free for the validators who runs the code, there is a maximum gas limit per block enforced by parity.

  1. Does each validator get the same reward - i.e. 1/100th of that cycle's reward. Does having more tokens in the node mean more inflation reward or transaction processing opportunites?

Each circle a set of validators is chosen, if there is less than a 100 validators all of them get to be chosen to the validator set of the next cycle, if there is more, a random 100 are chosen to the validator set of the next cycle.
Each cycle validators get to validate blocks in a round robin way. So if there are 50 validator, each one of them will get to validate 1/50 blocks.
If a validator fails to validate its block for 5 seconds (due to a failor in his validator machine), then then his turn is passes to next validator in the validator set.
Each validators receive the block reward and the fees of the blocks its validate.

@fileflume
Copy link

fileflume commented Jan 2, 2020

Each validators receive the block reward and the fees of the blocks its validate.

So I'm understanding this as:

  1. To be an active validator, each node has to have 100k tokens.***
  2. 100 validators are chosen at random from the set of all active validators to validate that 24 hour cycle.
  3. Inflation rewards are shared equally between all validators in that cycle (currently 41000 tokens). If there all the full 100 validators they can expect 410 tokens each. If there are only 50, they can expcet 820 tokens each.
  4. If a validator node contains staked and delegated tokens, the reward is split between them as per FIP 002.

*** Each node can only have 100k - no more, no less. If more tokens added, there is no benefit.

@fileflume
Copy link

No, the maximum will be also 100K. This is until FIP4.

What will happen to nodes that already have more than 100k staked/delegated? i.e. current nodes have 3M tokens. 2.9M delegated by Fuse. Will Fuse remove this delegation as it is not required anymore?

See answer 1, no, there is no benefit because you cannot stake more than 100K, That is untill FIP4.

Am I correct in my understanding that this means you can still only stake 100k per node, but can run multiple nodes via the 'validator account' idea, and there is no limit to how many validators one can run?

@LiorRabin
Copy link
Contributor

fuseio/fuse-network#10

@CrackerHax
Copy link

CrackerHax commented Jan 7, 2020

To do so, we need to strictly limit the number of validators to 100, and to choose randomly each cycle up to 100 validators from the eligible validators.

Doesn't seem all that random to me if you need 100 validators and there are only 100 validator nodes.

@LiorRabin
Copy link
Contributor

@CrackerHax we select 100 max each cycle, but there can be more. See examples on the FIP description

@CrackerHax
Copy link

CrackerHax commented Jan 7, 2020

To do so, we need to strictly limit the number of validators to 100

This sounds like there will only ever be 100 validators all together in the fuse network.

@bejavu
Copy link
Contributor Author

bejavu commented Jan 7, 2020

To do so, we need to strictly limit the number of validators to 100

This sounds like there will only ever be 100 validators all together in the fuse network.

Yes, there will be only 100 validators.
No, they will be chosen each cycle (day) so they will be replaced.

@CrackerHax
Copy link

Yes, there will be only 100 validators.

See I don't think that is what he is saying. I think there will be unlimited amounts of validators but only 100 will be used each cycle.

@bejavu
Copy link
Contributor Author

bejavu commented Jan 7, 2020

Each validators receive the block reward and the fees of the blocks its validate.

So I'm understanding this as:

  1. To be an active validator, each node has to have 100k tokens.***
  2. 100 validators are chosen at random from the set of all active validators to validate that 24 hour cycle.
  3. Inflation rewards are shared equally between all validators in that cycle (currently 41000 tokens). If there all the full 100 validators they can expect 410 tokens each. If there are only 50, they can expcet 820 tokens each.
  4. If a validator node contains staked and delegated tokens, the reward is split between them as per FIP 002.

*** Each node can only have 100k - no more, no less. If more tokens added, there is no benefit.

Yes, that sounds about right.

@bejavu
Copy link
Contributor Author

bejavu commented Jan 7, 2020

Yes, there will be only 100 validators.

See I don't think that is what he is saying. I think there will be unlimited amounts of validators but only 100 will be used each cycle.

This is what I also am saying...

@CrackerHax
Copy link

My point is if we are voting on a FIPS it needs to be written to be 100% clear and leave nothing to interpretation.

@bejavu
Copy link
Contributor Author

bejavu commented Jan 7, 2020

No, the maximum will be also 100K. This is until FIP4.

What will happen to nodes that already have more than 100k staked/delegated? i.e. current nodes have 3M tokens. 2.9M delegated by Fuse. Will Fuse remove this delegation as it is not required anymore?

We will pull our delegations after FIP3 so there not supposed to be a more than 100K delegation node, if there are, the consensus contract will see them as a 100K stake node.

See answer 1, no, there is no benefit because you cannot stake more than 100K, That is untill FIP4.

Am I correct in my understanding that this means you can still only stake 100k per node, but can run multiple nodes via the 'validator account' idea, and there is no limit to how many validators one can run?

This is FIP4 that you are talking about, and yes, you will be able to retake and basically create multiple 100K nodes.

@fileflume
Copy link

We will pull our delegations after FIP3 so there not supposed to be a more than 100K delegation node, if there are, the consensus contract will see them as a 100K stake node.

I'm not clear on what this means.

  1. I understand that Fuse will pull delegation. That's fine.
  2. Are you saying that the largest amount of tokens either staked or delegated becomes the primary delegator? Ie if Fuse didn't remove their delegation, they would become the 'staker' as they have the largest amount of tokens? If so, this is a security risk.
    Could you clarify with some examples.

@LiorRabin
Copy link
Contributor

@fileflume no, the staker is who sends tokens to the contract (delegates to himself).
Even if the staker delegates 10k to himself and 90k is delegated by others he is still the "staker".
However, according to FIP-2, the block rewards will be distributed appropriately.

@fileflume
Copy link

@fileflume no, the staker is who sends tokens to the contract (delegates to himself).
Even if the staker delegates 10k to himself and 90k is delegated by others he is still the "staker".
However, according to FIP-2, the block rewards will be distributed appropriately.

@LiorRabin OK - the staker remains the staker, thats good. I'm not sure what this means.

there not supposed to be a more than 100K delegation node, if there are, the consensus contract will see them as a 100K stake node.

@LiorRabin
Copy link
Contributor

That means that even if we don't pull the delegation, nodes with more than 100k total stake will be considered as 100k nodes.

@fileflume
Copy link

That means that even if we don't pull the delegation, nodes with more than 100k total stake will be considered as 100k nodes.

Ah, ok, I understand. Consensus contract has a max limit of 100k, so extra tokens just sit there doing nothing.

As an example validator node:
Staker - 50k tokens
Delegator - 100k tokens

Reward is split:
Staker: 50% + fee (based on 50k tokens)
Delegator: 50% -fee (based on 50K tokens)

The 'extra' 50k tokens from the delegator don't count for anything.

@LiorRabin
Copy link
Contributor

This should be the case, but only in the current situation which is a special one because we a higher min stake amount. After FIP-3 deployed there won't even be such an option because trying to stake/delegate over 100k will make the transaction fail.

@fileflume
Copy link

OK - that's clearer. Thanks.

@LiorRabin LiorRabin added testnet Deployed on Fuse testnet done Deployed on Fuse mainnet and removed testnet Deployed on Fuse testnet labels Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done Deployed on Fuse mainnet
Projects
None yet
Development

No branches or pull requests

4 participants