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

chore: documentation #18

Merged
merged 21 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Contributing to Manifest Ledger

All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution.

## Table of Contents

- [I Have a Question](#i-have-a-question)
- [I Want To Contribute](#i-want-to-contribute)
- [I Want To Open A Pull Request](#i-want-to-open-a-pull-request)
- [Reporting Bugs](#reporting-bugs)

## I Have a Question

> If you want to ask a question, we assume that you have read the available [Documentation](./README.md).

Before you ask a question, it is best to search for existing [Issues](/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first.

If you then still feel the need to ask a question and need clarification, we recommend the following:

- Open an [Issue](/issues/new).
- Select a template and stick to its guidelines.
- Provide as much context as you can about what you're running into.
- Provide project and platform versions (os, arch, go, etc.), depending on what seems relevant.

## I Want To Contribute

### Legal Notice

When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license.

### Reporting Bugs

#### Before Submitting a Bug Report

Please complete the following steps in advance to help us fix any potential bug as fast as possible.

- Make sure that you are using the latest version.
- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](./README.md). If you are looking for support, you might want to check [this section](#i-have-a-question)).
- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or issue.
- Collect information about the bug:
- Stack trace (Traceback)
- OS, Platform and Version (Windows, Linux, macOS, x86, ARM)
- Version of the interpreter, compiler, SDK, runtime environment, package manager, depending on what seems relevant.
- Can you reliably reproduce the issue? And can you also reproduce it with older versions?

#### How Do I Submit a Good Bug Report?

> You must never report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to <[email protected]>. See [SECURITY.md](SECURITY.md) for further details.

We use GitHub issues to track bugs and errors. If you run into an issue with the project:

- Open an [Issue](/issues/new).
- Explain the behavior you would expect and the actual behavior.
- Please provide as much context as possible and describe the _reproduction steps_ that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case.
- Provide the information you collected in the previous section.

## I Want To Open A Pull Request

Before opening a pull request, please make sure to read the [Contributing Guidelines](CONTRIBUTING.md) and the [Code of Conduct](CODE_OF_CONDUCT.md).

We are using the [GitHub Flow](https://guides.github.com/introduction/flow/index.html) for our development process. This means that you should fork this repository and create a branch for your changes. After you are done with your changes, open a pull request to the `main` branch of this repository.

Any PR's created without the PR template will be ignored and closed. Please follow the template as best as you can, removing any irrelevant sections and filling in the rest to the best of your ability.
263 changes: 263 additions & 0 deletions MODULE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,263 @@
# Modules

## Table of Contents

- [Modules](#modules)
- [Manifest Module](#manifest-module)
- [Module Functionality](#module-functionality)
- [Asset Issuance](#asset-issuance)
- [Commands](#commands)
- [Update Parameters (update-params)](#update-parameters-update-params)
- [Stakeholder Payout (stakeholder-payout)](#stakeholder-payout-stakeholder-payout)
- [Proof of Authority Module](#proof-of-authority-module)
- [Module Functionality](#module-functionality-1)
- [Validator Management](#validator-management)
- [Staking Parameters Update](#staking-parameters-update)
- [Administrative Rights](#administrative-rights)
- [Commands](#commands-1)
- [Update Parameters (update-params)](#update-parameters-update-params-1)
- [Update Staking Parameters (update-staking-params)](#update-staking-parameters-update-staking-params)
- [Set Voting Power (set-power)](#set-voting-power-set-power)
- [Remove Pending Validator (remove-pending)](#remove-pending-validator-remove-pending)
- [Remove Validator (remove)](#remove-validator-remove)
- [Token Factory Module](#token-factory-module)
- [Module Functionality](#module-functionality-2)
- [Token Minting](#token-minting)
- [Token Burning](#token-burning)
- [Token Administration](#token-administration)
- [Metadata Management](#metadata-management)
- [Commands](#commands-2)
- [Burn (burn)](#burn-burn)
- [Burn From (burn-from)](#burn-from-burn-from)
- [Mint (mint)](#mint-mint)
- [Change Admin (change-admin)](#change-admin-change-admin)
- [Create Denom (create-denom)](#create-denom-create-denom)
- [Force Transfer (force-transfer)](#force-transfer-force-transfer)
- [Modify Metadata (modify-metadata)](#modify-metadata-modify-metadata)

## Manifest Module

The Manifest module is responsible for handling inflation and manual minting events. Below is a structured breakdown of its components and functionalities:

### Module Functionality

Stakeholder Management: Allows the PoA admin to designate stakeholders, who can be one or multiple manifest wallet addresses. These stakeholders are eligible to receive assets issued by the PoA admin.

#### Asset Issuance:

- Manual Issuance: The PoA admin can manually mint and disburse a specified amount of tokens to the stakeholders.

- Automatic Inflation: When enabled, umfx tokens are minted every block as set in the module parameters, aiming for a predetermined total amount of tokens over a year.

#### Commands

##### Update Parameters (update-params):

- Syntax: `manifestd tx manifest update-params [address:percent_share,address2:percent_share2] [inflation_on_off] [annual_total_mint]`

- Parameters:
- `address:percent_share`: Specifies the destination wallet address and its percent share of the total rewards (to the sixth exponent).
- `inflation_on_off`: A boolean value (true or false) to toggle automatic inflation.
- `annual_total_mint`: The total amount of tokens to be minted annually (used only if automatic inflation is enabled).

**Example:** `manifestd tx manifest update-params manifest1hj5fveer5cjtn4wd6wstzugjfdxzl0xp8ws9ct:100_000_000 false 0umfx`

##### Stakeholder Payout (stakeholder-payout):

- Syntax: `manifestd tx manifest stakeholder-payout [amount]`
Reecepbcups marked this conversation as resolved.
Show resolved Hide resolved

- Parameters:

- `amount`: The amount of tokens to mint from the yearly allocated inflation.

This command will fail if automatic inflation is enabled.

**Example:** `manifestd tx manifest stakeholder-payout 777umfx`

## Proof of Authority Module

The PoA module is responsible for handling admin actions like adding and removing other administrators, setting the staking parameters of the chain, controlling voting power, and allowing/blocking validators. Below is a structured breakdown of its components and functionalities:

### Module Functionality

The PoA admin has several capabilities for managing the chain and its validators:

#### Validator Management:

- Remove validators from the active set.
- Remove validators pending addition to the active set.
- Specify the voting power for each validator.
- Approve the addition of new validators.

#### Administrative Rights:

- Assign or revoke administrative privileges.
- Determine if validators have the ability to self-revoke.

#### Commands

##### Update Parameters (update-params):

Add more chain administrators to the module and change the ability for validators to self-exit the set gracefully.

- Syntax: `manifestd tx poa update-params [admin1,admin2,admin3,...] [allow-validator-self-exit-bool]`

- Parameters:
- `admin1,admin2,admin3,...`: A list of admin addresses which can be multisig addresses.
- `allow-validator-self-exit-bool`: A boolean value (true or false) to allow validators to self-exit.

**Example:** `manifestd tx poa update-params manifest1hj5fveer5cjtn4wd6wstzugjfdxzl0xp8ws9ct,manifest1hj5fveer5cjtn4wd6wstzugjfdxzl0xp8ws9ct false`

##### Update Staking Parameters (update-staking-params):
fmorency marked this conversation as resolved.
Show resolved Hide resolved

Updates the defaults of the staking module from the PoA admin. For most cases, this should never be touched when using PoA.

- Syntax: `manifestd tx poa update-staking-params [unbondingTime] [maxVals] [maxEntries] [historicalEntries] [bondDenom] [minCommissionRate]`

- Parameters:

- `unbondingTime`: The time period for tokens to move from a bonded to released state. Not applicable for Proof of Authority.
- `maxVals`: The maximum number of validators in the active set who can sign blocks. Default is 100
- `maxEntries`: The maximum number of unbonding entries a delegator can have during the unbonding time. Not applicable for Proof of Authority.
- `historicalEntries`: The number of historical staking entries to account for. Not applicable for Proof of Authority.
- `bondDenom`: The denomination for bonding and staking. Not applicable for Proof of Authority.
- `minCommissionRate`: The minimum commission rate for validators to get a percent cut of fees generated. Not applicable for Proof of Authority.

**Example:** `manifestd tx poa update-staking-params 1814400 100 7 1000 umfx 0.01`

##### Set Voting Power (set-power):

Update a validators vote power weighting in the network. A higher vote power results in more blocks being signed. This also accepts pending validators into the active set as an approval from the PoA admin.

- Syntax: `manifestd tx poa set-power [validator] [power] [--unsafe]`

- Parameters:

- `validator`: The validator's operator address.
- `power`: The voting power to give the validator. This is relative to the total current power of all PoA validators on the network. Uses 10^6 exponent.

**Example:** `manifestd tx poa set-power manifestvaloper1hj5fveer5cjtn4wd6wstzugjfdxzl0xp8ws9ct 1000000`

**NOTE**: A network of 2 validators each with 1_000_000 power will have a total power of 2_000_000. So each have 50% of the network. If one validator increases, then the others network percentage decreases, but remains at the same fixed 1_000_000 power as before.

##### Remove Pending Validator (remove-pending):
Reecepbcups marked this conversation as resolved.
Show resolved Hide resolved

In PoA networks, any user (validator) can submit to the chain a transaction to signal intent of becoming a chain validator. Since the PoA admin has the final say on who becomes a validator, they can remove any pending validators from the list who they wish not to add. This command is used to remove a pending validator from the list.

- Syntax: `manifestd tx poa remove-pending [validator]`

- Parameters:

- `validator`: The validator's operator address.

**Example:** `manifestd tx poa remove-pending manifestvaloper1hj5fveer5cjtn4wd6wstzugjfdxzl0xp8ws9ct`

##### Remove Validator (remove):
Reecepbcups marked this conversation as resolved.
Show resolved Hide resolved

If the PoA admin decides they no longer wish for a validator to be signing blocks on the network, they can forcably remove them from the active set for signing blocks. This command removes the validator from signing blocks.

- Syntax: `manifestd tx poa remove [validator]`

- Parameters:

- `validator`: The validator's operator address.

**Example:** `manifestd tx poa remove manifestvaloper1hj5fveer5cjtn4wd6wstzugjfdxzl0xp8ws9ct`

## Token Factory Module

The Token Factory module as it is implemented on the Manifest Network, allows any user to have granular control over the creation and management of tokens on the Manifest Network. The creator can mint, burn, edit, and transfer tokens to other accounts from any account.

### Module Functionality

#### Token Minting:

- Create a token with a specific denom
- Mint a token with a specific amount and denom to your account
- Mint a token with a specific amount and denom to another account
chalabi2 marked this conversation as resolved.
Show resolved Hide resolved

#### Token Burning:

- Burn a token with a specific amount and denom from your account
- Burn a token with a specific amount and denom from another account

#### Token Administration:

- Change the admin address for a factory-created denom
- Force transfer tokens from one address to another address

#### Metadata Management:

- Change the base metadata for a factory-created denom

#### Commands

##### Burn (burn):

- Syntax: `manifestd tx token-factory burn [amount]`

- Parameters:
- `amount`: The amount and denom of the token you would like to burn from your account.

**Example:** `manifestd tx tokenfactory burn 1<denom>`

##### Burn From (burn-from):

- Syntax: `manifestd tx token-factory burn-from [address] [amount]`

- Parameters:
- `address`: The address of the account you would like to burn the tokens from.
- `amount`: The amount and denom of the token you would like to burn.

**Example:** `manifestd tx tokenfactory burn-from manifest1hj5fveer5cjtn4wd6wstzugjfdxzl0xp8ws9ct 1<denom>`

##### Mint (mint):

- Syntax: `manifestd tx token-factory mint [amount]`

- Parameters:
- `amount`: The amount and denom of the token you would like to mint to your account.

**Example:** `manifestd tx tokenfactory mint 1<denom>`

##### Change Admin (change-admin):
chalabi2 marked this conversation as resolved.
Show resolved Hide resolved

- Syntax: `manifestd tx token-factory change-admin [denom] [new-admin-address]`

- Parameters:
- `denom`: The denom of the token that you would like to change the admin for.
- `new-admin-address`: The new admin's wallet address.

**Example:** `manifestd tx tokenfactory change-admin <denom> manifest1hj5fveer5cjtn4wd6wstzugjfdxzl0xp8ws9ct`

##### Create Denom (create-denom):
chalabi2 marked this conversation as resolved.
Show resolved Hide resolved

- Syntax: `manifestd tx token-factory create-denom [subdenom]`
fmorency marked this conversation as resolved.
Show resolved Hide resolved

- Parameters:
- `subdenom`: The smallest denomination for your token e.g. udenom.

**Example:** `manifestd tx tokenfactory create-denom <subdenom>`

##### Force Transfer (force-transfer):
Reecepbcups marked this conversation as resolved.
Show resolved Hide resolved

- Syntax: `manifestd tx token-factory force-transfer [amount] [transfer-from-address] [transfer-to-address]`

- Parameters:
- `amount`: The amount and denom of the token you would like to transfer.
- `transfer-from-address`: The address of the account you would like to transfer the tokens from.
- `transfer-to-address`: The address of the account you would like to transfer the tokens to.

**Example:** `manifestd tx tokenfactory force-transfer 1<denom> manifest1hj5fveer5cjtn4wd6wstzugjfdxzl0xp8ws9ct manifest1hj5fveer5cjtn4wd6wstzugjfdxzl0xp8ws9ct`

##### Modify Metadata (modify-metadata):
Reecepbcups marked this conversation as resolved.
Show resolved Hide resolved

- Syntax: `manifestd tx token-factory modify-metadata [denom] [ticker-symbol] [description] [exponent]`

- Parameters:
- `denom`: The denom of the token you are modifying.
- `ticker-symbol`: The ticker symbol for the token.
- `description`: A description of the token.
- `exponent`: The exponent for the token e.g. how many zeros.
chalabi2 marked this conversation as resolved.
Show resolved Hide resolved

**Example:** `manifestd tx tokenfactory modify-metadata utoken TOKEN "A token" 6`
Loading
Loading