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

feat: Municipal Inflation #162

Merged
merged 11 commits into from Aug 12, 2023
Merged

feat: Municipal Inflation #162

merged 11 commits into from Aug 12, 2023

Conversation

Jonathansumner
Copy link
Member

@Jonathansumner Jonathansumner commented Aug 7, 2023

Implements the Municipal Inflation mechanism.

Municipal(= Local) GOVERNANCE of distribution
The defining feature is the governance of the tokens generated(minted) by Municipal Inflation - tokens are minted on to predefined target address, and whoever controls access to that adress (e.g. it can be related private key, multisig wallet, contract, or possibly address of cosmos-sdk module) fully controls dictribution of tokens generated by the municipal inflation at that target address - hence the "Municipal" name (as opposed to trully decentralised governance distribution model(e.g. distrubution based on proportionality of users stake agains over all staked amount)).

If required, the Decentralisation can be achieved by using contract (which implements decentralised distribution of the inflated tokens) and setting address of such contract in to target_address. This will “convert” Municipal distribution governance do Decentralised one, so to speak.

CONFIGURATION
Municipal inflation is configured in genesis.json located in the mint.minter.municipal_inflation node - see below the example.

  • IMMUTABILITY: The configuration node is intentionally located under the min.minter node in order to make the configuartion immutable = by design, it is NOT possible to change configuration of Municipal Inflation while network is running (e.g. via governance proposal). The only way how to change the configuration of Municipal Inflation is to restart the network.
  • Value Represesentation: The value represents ANNUAL value of inflation in [1] unit ([%] = 100x[1]), what means that "value": 0.03 equals to 3% annual inflation
  • MULTI-Denomination support: the Municipal Inflation can be configured for multiple denominations individually = each configured denomination has its own insulated stup (target address & inflation value)
"municipal_inflation": [
  {
    "denom": "denomA",
    "inflation": {
      "target_address": "fetch123...abc",
      "value": "0.03"
      }
  },
  {
    "denom": "denomB",
    "inflation": {
      "target_address": "fetch234...bcd",
      "value": "0.05"
      }
  },
  {
    "denom": "denomC",
    "inflation": {
      "target_address": "fetch345...cde",
      "value": "0.1"
      }
  }
]

@codecov-commenter
Copy link

codecov-commenter commented Aug 7, 2023

Codecov Report

Merging #162 (49044fc) into main (1d996e8) will increase coverage by 0.05%.
The diff coverage is 61.31%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #162      +/-   ##
==========================================
+ Coverage   60.45%   60.51%   +0.05%     
==========================================
  Files         600      599       -1     
  Lines       38791    38885      +94     
==========================================
+ Hits        23452    23530      +78     
- Misses      13366    13374       +8     
- Partials     1973     1981       +8     
Files Changed Coverage Δ
x/mint/abci.go 0.00% <0.00%> (ø)
x/mint/keeper/grpc_query.go 56.25% <0.00%> (-43.75%) ⬇️
x/mint/keeper/querier.go 59.37% <0.00%> (-16.63%) ⬇️
x/mint/module.go 55.55% <0.00%> (-1.59%) ⬇️
x/mint/keeper/keeper.go 64.51% <33.33%> (ø)
x/mint/types/minter.go 71.42% <57.14%> (-0.80%) ⬇️
x/mint/types/inflations.go 79.31% <79.31%> (ø)
x/mint/client/testutil/suite.go 100.00% <100.00%> (ø)
x/mint/genesis.go 57.14% <100.00%> (+7.14%) ⬆️

... and 5 files with indirect coverage changes

@pbukva pbukva changed the title Feat: municipal inflation feat: Municipal Inflation Aug 8, 2023
Copy link
Contributor

@pbukva pbukva left a comment

Choose a reason for hiding this comment

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

LGTM

@pbukva pbukva merged commit 43f6e51 into main Aug 12, 2023
25 checks passed
@pbukva pbukva deleted the feat/municipal-inflation branch August 12, 2023 10:29
@pbukva pbukva restored the feat/municipal-inflation branch August 12, 2023 10:44
@liton650
Copy link

@@ Coverage Diff @@

main #162 +/-

==========================================

  • Coverage 60.45% 60.51% +0.05%
    ==========================================
    Files 600 599 -1
    Lines 38791 38885 +94
    ==========================================
  • Hits 23452 23530 +78
  • Misses 13366 13374 +8
  • Partials 1973 1981 +8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants