multistaking

package
v0.0.0-...-3a28d7b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

README

MultiTokenStaking

Introduction

In traditional Proof-of-Stake (POS) systems, only the native token can be used for staking. However, with the development and progress of AppChains, it becomes challenging for nascent AppChains to ensure the security of POS solely relying on the native token. To increase the total staked value in the POS system, introducing non-native tokens as staking assets is an optional approach. MultiTokenStaking is a module built on this concept. It extends the classic Cosmos SDK staking module, enabling AppChains to support staking with multiple tokens.

In the Cosmos SDK, the native token total supply and the boned amount will affect inflation. Since MultiTokenStaking affects the supply and bonded amount of the native token, it means that if an AppChain directly uses the Cosmos SDK's bank and mint modules to control token inflation, the token inflation will become unpredictable. However, typically, Cosmos SDK-based chains customize their inflation (economic) models based on the bank and mint modules. In a custom inflation module, mitigating the impact of MultiTokenStaking would be straightforward. It simply involves excluding the portion contributed by MultiTokenStaking from the total supply and total bonded amount.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProviderProposalHandler

func NewProviderProposalHandler(k keeper.Keeper) govtypes.Handler

Types

type AppModule

type AppModule struct {
	AppModuleBasic
	// contains filtered or unexported fields
}

func NewAppModule

func NewAppModule(cdc codec.Codec, keeper keeper.Keeper) AppModule

func (AppModule) BeginBlock

BeginBlock implements module.BeginBlockAppModule

func (AppModule) ConsensusVersion

func (AppModule) ConsensusVersion() uint64

ConsensusVersion implements module.AppModule

func (AppModule) EndBlock

EndBlock implements module.EndBlockAppModule

func (AppModule) ExportGenesis

ExportGenesis implements module.AppModule

func (AppModule) InitGenesis

InitGenesis implements module.AppModule

func (AppModule) LegacyQuerierHandler

func (AppModule) LegacyQuerierHandler(*codec.LegacyAmino) func(ctx sdk.Context, path []string, req abci.RequestQuery) ([]byte, error)

LegacyQuerierHandler implements module.AppModule

func (AppModule) QuerierRoute

func (AppModule) QuerierRoute() string

QuerierRoute implements module.AppModule

func (AppModule) RegisterInvariants

func (AppModule) RegisterInvariants(sdk.InvariantRegistry)

RegisterInvariants implements module.AppModule

func (AppModule) RegisterServices

func (AppModule) RegisterServices(module.Configurator)

RegisterServices implements module.AppModule

type AppModuleBasic

type AppModuleBasic struct {
	// contains filtered or unexported fields
}

func NewAppModuleBasic

func NewAppModuleBasic(cdc codec.Codec) AppModuleBasic

func (AppModuleBasic) DefaultGenesis

func (AppModuleBasic) DefaultGenesis(codec.JSONCodec) json.RawMessage

DefaultGenesis implements module.AppModuleBasic

func (AppModuleBasic) GetQueryCmd

func (AppModuleBasic) GetQueryCmd() *cobra.Command

GetQueryCmd implements module.AppModuleBasic

func (AppModuleBasic) GetTxCmd

func (AppModuleBasic) GetTxCmd() *cobra.Command

GetTxCmd implements module.AppModuleBasic

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

Name implements module.AppModuleBasic

func (AppModuleBasic) RegisterGRPCGatewayRoutes

func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux)

RegisterGRPCGatewayRoutes implements module.AppModuleBasic

func (AppModuleBasic) RegisterInterfaces

func (AppModuleBasic) RegisterInterfaces(reg codectypes.InterfaceRegistry)

RegisterInterfaces implements module.AppModuleBasic

func (AppModuleBasic) RegisterLegacyAminoCodec

func (AppModuleBasic) RegisterLegacyAminoCodec(*codec.LegacyAmino)

RegisterLegacyAminoCodec implements module.AppModuleBasic

func (AppModuleBasic) ValidateGenesis

ValidateGenesis implements module.AppModuleBasic

Directories

Path Synopsis
Package types is a reverse proxy.
Package types is a reverse proxy.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL