Skip to content

Conversation

@uchu
Copy link
Contributor

@uchu uchu commented Sep 1, 2023

@xcthulhu @akorchyn This is just a draft to discuss and verify if the parameters are still correct.

@uchu
Copy link
Contributor Author

uchu commented Sep 4, 2023

@xcthulhu @akorchyn We need to make sure that this document is correct. Maybe also having some values in spreadsheet with constants might also help. Let's use this PR as a place for the discussion.

https://docs.google.com/spreadsheets/d/1pddzlDWNVRUTeYzg8e6V-n0ZxCgp2HeIlAVG7oHOm4U/edit?usp=sharing

@uchu uchu requested a review from obsessed-cake September 4, 2023 09:45

### Current state

* Initial total supply is distributed to active nodes for now.
Copy link
Contributor

Choose a reason for hiding this comment

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

to single node wrpapped by multisig


## Staking

Each new validators when enters `PoS` with `200 thousands` staked for `1 year`.
Copy link
Contributor

Choose a reason for hiding this comment

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

1100 GGX

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, bond withdrawal takes a year.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@akorchyn Is 1 year is something we have defined in chainspec?

Copy link
Contributor

Choose a reason for hiding this comment

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

nope, in runtime

Staking rewards are distributed each session.

`Session period = 4 hours`
`Election period = quarter`
Copy link
Contributor

Choose a reason for hiding this comment

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

for sydney is 24hours


### Slashing

| Misbehavior | Amount | Parameters |
Copy link
Contributor

Choose a reason for hiding this comment

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

This section wasn't really defined clearly. It just random values as TBD, that never happened.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@akorchyn What we can do with it, any suggestions? Just to remove the section completely or we can somehow defined these values?

Copy link
Contributor

Choose a reason for hiding this comment

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

Up to you. I guess it's better to define it, but we can ignore this section for now.
Basically, we need to go over substrate docs and check their default values

Copy link
Contributor

Choose a reason for hiding this comment

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

current implementation in code is 16-17% for slashing upon validators for both Brooklyn and Sydney
runtime/Brooklyn/src/pos.rs
runtime/Sydney/src/pos.rs


| Account | Part | Type |
| ------- | ---- | ---- |
| Validator** | 5% | Fixed comission |
Copy link
Contributor

Choose a reason for hiding this comment

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

It is not fixed anymore and is defined as the median value from validators' preferences.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Any suggestions how better to write it then?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can put a *** symbol and put this text below:

Validators have a commission that is substituted from the nominators' reward. The commission is calculated as the median value for validators' preferences.

### Current state

* 1 year withdrawal lock is implemented
* Session period is 4 hours. Era period is quarter.
Copy link
Contributor

Choose a reason for hiding this comment

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

Era period is a day.

* Session period is 4 hours. Era period is quarter.
(configured by EpochDurationInBlocks, SessionsPerEra).
* Payout at the end of the session. Configured by runtime/mainnet/src/pos/session_payout/mod.rs
* Median commission to nominators from validator preferences calculated each session.
Copy link
Contributor

Choose a reason for hiding this comment

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

True.


* Done

## Fees
Copy link
Contributor

Choose a reason for hiding this comment

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

Fees are also not defined properly. To be honest, somebody needs to benchmark runtime on our preferred node configuration (CPU, RAM, etc)

@akorchyn
Copy link
Contributor

akorchyn commented Sep 4, 2023

Reviewed both. Added info about each added field to spreadsheet. Also left some comments.

@uchu please take a look for ??? in field names. I couldn't understand what is it.

@uchu uchu changed the base branch from main to staging October 13, 2023 13:13
@uchu uchu marked this pull request as ready for review October 13, 2023 13:14

`1 Billion GGX`

`1 GGX ~= 0.05 USD`
Copy link
Contributor

Choose a reason for hiding this comment

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

We probably can't ensure this...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lets remove it maybe

* 1 year withdrawal lock is implemented
* Session period is 4 hours. Era period is quarter.
(configured by EpochDurationInBlocks, SessionsPerEra).
* Payout at the end of the session. Configured by runtime/mainnet/src/pos/session_payout/mod.rs
Copy link
Contributor

Choose a reason for hiding this comment

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

Link to github?

Copy link
Contributor

@xcthulhu xcthulhu left a comment

Choose a reason for hiding this comment

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

LGTM, mostly nit-picks

uchu and others added 5 commits October 18, 2023 15:40
Co-authored-by: Matthew Doty <matt@w-d.org>
Co-authored-by: Matthew Doty <matt@w-d.org>
Co-authored-by: Matthew Doty <matt@w-d.org>
Co-authored-by: Matthew Doty <matt@w-d.org>
Co-authored-by: Matthew Doty <matt@w-d.org>
uchu and others added 6 commits October 18, 2023 15:42
Co-authored-by: Matthew Doty <matt@w-d.org>
Co-authored-by: Matthew Doty <matt@w-d.org>
Co-authored-by: Matthew Doty <matt@w-d.org>
Co-authored-by: Matthew Doty <matt@w-d.org>
Co-authored-by: Matthew Doty <matt@w-d.org>
Co-authored-by: Matthew Doty <matt@w-d.org>
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.

5 participants