Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed Mar 2, 2024
1 parent b782409 commit f3038b9
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/manifest/v1/genesis.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/manifest/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ message StakeHolders {
int32 percentage = 2;
}

// Inflation is the automatic inflation and distribution coins to the stake holders
// Inflation is the distribution coins to the stake holders
message Inflation {
option (gogoproto.equal) = true;
// if automatic inflation is enabled for distribution
Expand Down
37 changes: 37 additions & 0 deletions x/manifest/spec/01_concepts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!--
order: 1
-->

# Concepts

## Manifest

The Manifest module allows the chain admin(s) to set stakeholders and their percent of network rewards. These rewards can be made automatically on a set fixed amount per block, or manually if auto inflation is toggled off.

## Update Stakeholders and Inflation

**NOTE** This can only be run from the chain's PoA admin(s) addresses.

```bash
# address_pairs is a comma delimited list of address and percent pairs in the micro format
# - `address:1_000_000,address2:99_000_000` = 2 addresses at 100%.
#
# inflation_per_year_coin is the amount of coins to give per year for automatic inflation
# - `5000000umfx`
#
manifestd tx manifest update-params [address_pairs] [automatic_inflation_enabled] [inflation_per_year_coin]
```

## Payout Stakeholders Manually

**NOTE** This can only be run from the chain's PoA admin(s) addresses.
**NOTE** This may only be run when automatic inflation is off. If it is on, this transaction will always error out on execution.

```bash
# coin_amount is the amount of coins to distribute to all stakeholders. This is then split up based off their split of the network distribution.
# - `5000000umfx`
#
# If you wish to payout to a different group than what current stakeholders are set, use a multi-message transaction to update-params, perform the payout, and update-params back to the original state. This can be done in 1 transaction.
# -https://docs.junonetwork.io/developer-guides/miscellaneous/multi-message-transaction
manifestd tx manifest stakeholder-payout [coin_amount]
```
53 changes: 53 additions & 0 deletions x/manifest/spec/02_state.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!--
order: 2
-->

# State

## State Objects

The `x/manifest` module only manages the following object in state: Params. This object holds all the required information for the module to operate. For automatic inflation, the x/mint modules `Params` is used to take the per year reward coins and divide it by the number of blocks per year, resulting in the per block reward amount.

```proto
message Params {
option (amino.name) = "manifest/params";
option (gogoproto.equal) = true;
option (gogoproto.goproto_stringer) = false;
repeated StakeHolders stake_holders = 1;
Inflation inflation = 2;
}
// StakeHolders is the list of addresses and their percentage of the inflation distribution
message StakeHolders {
option (gogoproto.equal) = true;
// manifest address that receives the distribution
string address = 1;
// percentage is the micro denom % of tokens this address gets on a distribution.
// 100% = 100000000 total. so 1000000 = 1%.
int32 percentage = 2;
}
// Inflation is the distribution coins to the stake holders
message Inflation {
option (gogoproto.equal) = true;
// if auto payouts are done per block
bool automatic_enabled = 1;
// amount of umfx tokens distributed per year
uint64 yearly_amount = 2;
// the token to distribute (i.e. 'umfx')
string mint_denom = 3;
}
```

## State Transitions

The following state transitions are possible:

- Update params for stakeholders percent, and inflation values (denom, and automatic)
18 changes: 18 additions & 0 deletions x/manifest/spec/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# `manifest`

## Abstract

This document specifies the internal `x/manifest` module of The Lifted Initiative, Manifest Ledger.

The `x/manifest` module provides the following abilities:
- Setting a group of stakeholders that receive a set % of inflation
- Toggling Inflation from automatic and manual modes

This inflation is not tied to a standard bonded ratio like typical proof-of-stake (PoS) systems, Instead it is up to chain admin(s) to decide given the nature of a proof-of-authority (PoA) chain.

By using this module, token distributions can be delivered to select stakeholders within the bounds of certain set parameters

## Contents

1. **[Concepts](01_concepts.md)**
2. **[State](02_state.md)**
2 changes: 1 addition & 1 deletion x/manifest/types/genesis.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f3038b9

Please sign in to comment.