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

Token Allocation at the genesis block initiatlization. #20177

Open
Shaan-cybernext opened this issue Apr 24, 2024 · 1 comment
Open

Token Allocation at the genesis block initiatlization. #20177

Shaan-cybernext opened this issue Apr 24, 2024 · 1 comment
Assignees

Comments

@Shaan-cybernext
Copy link

I am trying to understand how tokenomics works for cosmos SDK on an industry standard. I have a few questions related to token allocation and account types in Cosmos SDK-based blockchains in general about what the industry standard is:

  1. Token Allocation:
  • When distributing an initial token supply across multiple accounts, is it necessary to split the tokens into separate accounts? How does the industry work?

  • For example, if there is a total of 10 million tokens to be allocated to three accounts (A, B, and C) with distribution percentages of 40%, 50%, and 10% respectively, should the tokens be explicitly split among these accounts? Or can this be done in another way?

  1. Account Types:
  • If the tokens allocation requires separate accounts, can it be a normal account with a mnemonic? or special accounts such as clawback Vesting Accounts, or Normal Vesting Accounts?
  1. Implementation:
  • Is it preferable to implement this token allocation through a shell script, or is it better to use a Go-based approach like genAccounts.go?
  • If there is a specific method recommended by the Cosmos SDK community for this kind of setup, could you please share some examples?
  1. Governance and Proposals:
  • Does adding new accounts or modifying existing ones in genesis.json require a governance proposal?
  • If so, could you explain the process for getting such changes approved through governance?

If you could guide us with the help of any documentation/material regarding tokenomics would be appreciated.

@github-actions github-actions bot added the needs-triage Issue that needs to be triaged label Apr 24, 2024
@tac0turtle tac0turtle added T:question and removed needs-triage Issue that needs to be triaged labels Apr 24, 2024
@samricotta
Copy link
Collaborator

samricotta commented May 15, 2024

Question: When distributing an initial token supply across multiple accounts, is it necessary to split the tokens into separate accounts? How does the industry work?

The decision is more about the project and governance preferences of the chain itself.

There is no prerequisite to manage and allocate tokens in a specific way offering flexibility.

Question: If the tokens allocation requires separate accounts, can it be a normal account with a mnemonic? or special accounts such as clawback Vesting Accounts, or Normal Vesting Accounts?

As mentioned above it is dependant on the projects specifications but there are the following accounts:

Normal accounts are typical user-controlled wallets that use a mnemonic phrase for recovery.
Vesting accounts such as clawback vesting accounts or normal vesting accounts are used when tokens need to be locked for a period and released under certain conditions.

Question: Is it preferable to implement this token allocation through a shell script, or is it better to use a Go-based approach like genAccounts.go? If there is a specific method recommended by the Cosmos SDK community for this kind of setup, could you please share some examples.

  • Use genesis.json and add or modify app_state as below
  • Ensure modules such as bank have also been configured correctly with denom
    Example of genesis.json
{
  "app_state": {
    "bank": {
      "balances": [
        {
          "address": "cosmos1...",
          "coins": [
            {"denom": "mytoken", "amount": "1000000"}
          ]
        }
      ]
    }
  }
}

Ensure that during the blockchain initialisation process, the genesis.go file correctly parses and loads these configurations.

Example of genesis.go

package app

import (
    "encoding/json"
    "github.com/cosmos/cosmos-sdk/types/module"
    sdk "github.com/cosmos/cosmos-sdk/types"
)

//initialising state from genesis file.
func (app *App) InitGenesis(ctx sdk.Context, appState json.RawMessage) error {
    var genesisState map[string]json.RawMessage
    if err := json.Unmarshal(appState, &genesisState); err != nil {
        return err
    }

}

Question: Does adding new accounts or modifying existing ones in genesis.json require a governance proposal?If so, could you explain the process for getting such changes approved through governance?

Adding new accounts or modifying existing ones in the genesis.json file does not typically require a governance proposal if these changes are made before the blockchain network is launched. The genesis.json file is used to set the initial state at the genesis block (the first block), and changes are decided by the network's initial setup team or community consensus before launch.

However, once the blockchain is live, modifying the state of accounts (like balances, permissions, etc.) through direct changes to the genesis.json is not possible. Instead, any significant changes to the network, such as updates to the protocol, token allocations, or changes that affect the network's operation, would require a governance proposal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📋 Backlog
Development

No branches or pull requests

3 participants