Skip to content
This repository was archived by the owner on Jun 18, 2025. It is now read-only.
This repository was archived by the owner on Jun 18, 2025. It is now read-only.

Making mint module universal #895

@lumtis

Description

@lumtis

Many self-sovereign blockchains have their own tokenomics that can influence the block rewards:

  • Rewards for incentivization pools (incentivized liquidity pools for ex)
  • Rewards for community pools
  • Rewards for predefined addresses
  • Rewards for insurance funds
  • etc....

The current methodology for a project is to fork one of these customized mint module and change it for the logic of the chain since the SDK mint module doesn't allow for flexibility.
As opened here #852, customized open sourced mint found in the space also include very few tests for such an important and sensitive component.

The same as the claim module, the idea of this issue is to make mint module under this repo universal and reusable for any other project with minimal changes. Developers can integrate the module with extensive test and plug it into other module for usage of rewards.

Proposed solution

Include as part of the module params:

  • Weight for staking rewards
  • Weight for community pool
  • Generic list of weighted addresses, where a description can be associated with each address
  • Generic list of... let's say "pipes" for customized rewards redirection
{
  StakingWeight sdk.Int
  CommunityPoolWeight sdk.Int
  FundedAddressesWeight sdk.Int
  PipesWeight sdk.Int
}
FundedAddresses []{
  Address string
  Description string
  Weight sdk.Int
}
Pipes []{
  PipeID uint64
  Description string
  Weight sdk.Int
}

The pipe is a generic way to represent a redirection of the block rewards.

In app.go modules can register for a pipe with the following method:

func (MintKeeper) SubscribePipe(pipeID uint64, func (blockRewards sdk.Coins)) error

The method panic is a pipe is subscribed twice.

Example: usage:

// keeper initialization....
//...

app.MintKeeper.SubscribePipe(LiquidityIncentivePipeID, app.LiquidityKeeper.ProvideLiquidityIncentives)
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    mintRelated to mint module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions