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

Add Economic Model #1716

Closed
wants to merge 53 commits into from
Closed

Conversation

Tommo-L
Copy link
Contributor

@Tommo-L Tommo-L commented Jun 20, 2020

Close #1617 Close #285

The additional GAS allocation is as follows:

  • 10% will be distributed to all NEO holders according to the weight of NEO.
  • 5% divided equally among 21 members.
  • 85% will be allocated to the voters who voted for the top 21 nodes. The voters who voted for a consensus node are assigned 2/28 of this part according to the voting weight, and the voters who voted for a committee member (non-consensus node) are assigned 1/28 of this part according to the voting weight.

The implementation method was originally proposed by @vang1ong7ang and optimized by @Tommo-L @erikzhang

How to test and verify the impact of these changes?

Case 1: claim GAS for neo holders, committee and voters.
Case 2: claim GAS for users across different committee cycles.

Where in the software does this update applies to?

  • Ledger

@Tommo-L Tommo-L marked this pull request as ready for review June 28, 2020 06:58
@vncoelho
Copy link
Member

Great to see this moving forwarding, great insights @vang1ong7ang.
Thus, in the current formula we are going to have M + C = 21, where Mare the number of Validators (CN) and C the cardinality of the Committee.
In this this sense, 85% of GAS inflationary generation will be allocated to the votes, in which, 2/(C+N)% will go to the ones who voted for Validators and , 1/(C+N)% for those who elected a committee member.

It is a continuous election, right? Thus, as soon as NEO is transferred it is interested that the new owner should vote for some Validators in order to maximize his rewards, right?

// Keep track of incremental gains of committee voters

UInt160 committeeAddr = Contract.CreateSignatureContract(committeeVotes[i].Item1).ScriptHash;
BigInteger voterRewardPerCommittee = (i < validatorNumber ? 2 : 1) * voterRewardPerBlock * 10000L / committeeVotes[i].Item2;
Copy link
Member

Choose a reason for hiding this comment

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

Is it distributed equally or the number of votes of each committee will affect? If true maybe we need to update description.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The number of votes of each committee will affect, I'll update description.

Copy link
Member

@vncoelho vncoelho Jun 28, 2020

Choose a reason for hiding this comment

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

Good, @Tommo-L,

What I am thinking, @vang1ong7ang, is that voters will change vote quick in order to maximize their gains, no?

Copy link
Member

Choose a reason for hiding this comment

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

We are considering a multiplier 2 if you vote for CN instead of non-CN in the Committee.
If you vote for someone out of the Committee then you will soon change as well, right?

Copy link
Member

Choose a reason for hiding this comment

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

Did you update the description, @Tommo-L ?

Copy link
Contributor Author

@Tommo-L Tommo-L Jul 28, 2020

Choose a reason for hiding this comment

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

We are considering a multiplier 2 if you vote for CN instead of non-CN in the Committee.

Yes

If you vote for someone out of the Committee then you will soon change as well, right?

Yes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Did you update the description, @Tommo-L ?

Done.

@Tommo-L
Copy link
Contributor Author

Tommo-L commented Jun 28, 2020

It is a continuous election, right? Thus, as soon as NEO is transferred it is interested that the new owner should vote for some Validators in order to maximize his rewards, right?

Yes, it's a continuous election. If NEO transferred, I think in most cases, there is no need to re-vote because the interest gap will not be too large.

@shargon
Copy link
Member

shargon commented Jul 2, 2020

@Tommo-L conflicts

// Keep track of incremental gains for each committee's voters

UInt160 committeeAddr = Contract.CreateSignatureContract(committeeVotes[i].Item1).ScriptHash;
if (committeeVotes[i].Item2 > 0)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

StandbyCommittee will initially have no votes. I'm not sure if it is ok. (After confirmed, I will fix UT)

@erikzhang
Copy link
Member

@Tommo-L Conflicts.

@erikzhang
Copy link
Member

@Tommo-L Can you combine NeoToken.Economic.cs, NeoToken.Governance.cs and NeoToken.cs into one single file? Or separate them in the master branch first. Otherwise it is hard to review.

@Tommo-L
Copy link
Contributor Author

Tommo-L commented Aug 11, 2020

ok, I'll combine them.

@Tommo-L
Copy link
Contributor Author

Tommo-L commented Aug 11, 2020

@Tommo-L Can you combine NeoToken.Economic.cs, NeoToken.Governance.cs and NeoToken.cs into one single file? Or separate them in the master branch first. Otherwise it is hard to review.

Done

@erikzhang
Copy link
Member

  • 10% will be distributed to all NEO holders according to the weight of NEO.
  • 5% divided equally among 21 members.
  • 85% will be allocated to the voters who voted for the top 21 nodes. The voters who voted for a consensus node are assigned 2/28 of this part according to the voting weight, and the voters who voted for a committee member (non-consensus node) are assigned 1/28 of this part according to the voting weight.

@Tommo-L The code looks good. Can you divide this PR into 3, and then I will review them one by one.

@Tommo-L
Copy link
Contributor Author

Tommo-L commented Aug 17, 2020

  • 10% will be distributed to all NEO holders according to the weight of NEO.
  • 5% divided equally among 21 members.
  • 85% will be allocated to the voters who voted for the top 21 nodes. The voters who voted for a consensus node are assigned 2/28 of this part according to the voting weight, and the voters who voted for a committee member (non-consensus node) are assigned 1/28 of this part according to the voting weight.

@Tommo-L The code looks good. Can you divide this PR into 3, and then I will review them one by one.

Ok, I'll split it.

@Tommo-L
Copy link
Contributor Author

Tommo-L commented Aug 19, 2020

Related to #1845 #1847 #1848

@Tommo-L Tommo-L closed this Aug 19, 2020
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.

[Governance] Design and discussion Adjusting the economic model
4 participants