Skip to content
126 changes: 126 additions & 0 deletions src/sydney-testnet/tokenomics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# Tokenomics [DRAFT]

## Initial Total Supply

`1 Billion GGX`

`1 GGX ~= 0.05 USD`
Copy link
Copy Markdown
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
Copy Markdown
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


`18 decimals`

All amounts in this document are in GGX.

## APY

Schedule of APY will be next:

| Date | Yearly APY** |
| -----|-----------------------|
| 2023 | 14.93% |
| 2024 | 13.93% |
| ... | ... |
| 2028 | 11.31% |
| ... | ... |
| 2043| 4% |
| ... | ... |
| 2053 | 2% |
| 2054 | 2% |

** decreases by 6.7% per year

After 30 years the APY stabilizes at 2%

### Current State

* Initial total supply is distributed to active nodes for now.
Copy link
Copy Markdown
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

* 18 decimals is done. (configured by MILLIGGX)
* APY configured to 16%. (configured by runtime/mainnet/src/pos/currency.rs InflationPercent)
* APY decrease ladder scheduled for the runtime.
* APY decrease happens every 365.25 days to address leap years. (configured by runtime/mainnet/src/pos/currency.rs InflationPercentDecay)

## Staking

Each new validators when enters `PoS` with `200 thousands` staked for `1 year`.
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

| ------------| -------| ------------------
| Consensus Offline | 0.01% to 44% * Stake | starting from 10% validators offline linear increase |
| Consensus Equivocation for Blocks (Double Sign) | 0.01% * Stake | TBD |
| MPC Signature (Wrong message) | 0.01% * Stake | TBD |
| MPC Key Generation (Failure to Participate) | 0.001% * Stake | TBD |
| Early Unstake | 10% * Stake | TBD |
| ...TBD... | ...TBD... |

Slashed amounts are sent to treasury.

### Nominations

| Account | Part | Type |
| ------- | ---- | ---- |
| Validator** | 5% | Fixed comission |
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

| Nominator + Validator** | 95% | Shared between nominators and validator |

** 10% of validators rewards go to Treasury
| Account | Part |
| --------- | ---- |
| Validator | 90% |
| Treasury | 10% |

### Current state

* 1 year withdrawal lock is implemented.
* Session period is 4 hours. Era period is quarter.
Copy link
Copy Markdown
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.

(configured by `EpochDurationInBlocks`, `SessionsPerEra`).
* Payout at the end of the session. Configured by runtime/mainnet/src/pos/session_payout/mod.rs
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Link to github?

* Median commission to nominators from validator preferences calculated each session.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

True.

Static commission can be enabled by referenda. Configured by runtime/mainnet/src/pos/session_payout/mod.rs
* 10% Treasury comission is implemented. (configured by runtime/mainnet/src/pos/currency.rs `TreasuryCommission`)

## Rewards

### From Transaction Fees

| Account | Part |
| -------- | ----- |
| Treasury | 100% |
| Validator (block producer) | 0% |
| Burn | 0% |

Fees are distributed each block.

### From transaction tips

| Account | Part |
| -------- | ----- |
| Treasury | 25% |
| Validator(block producer) | 75% |
| Burn | 0% |

### Current state

* Done

## Fees
Copy link
Copy Markdown
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)


| Category | Type | Amount |
|------|--------|-----------|
|Transaction | 1 second of execution(or equivalent prove size)| 10000 |
|Transaction | MPC signatrue | 100 |
|Storage | ED for account | 0.1 |

Proper fees to be defined.

## Parameters configuration

Parameters can be changed by OpenGov.

### Current state

* Implemented most of it.