incentives

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: GPL-3.0 Imports: 18 Imported by: 0

README

Incentives

The incentives module manages incentivization for MARS stakers. Not to be confused with incentives for lending/borrowing activities, which are managed by a wasm contract deployed at each Outpost.

The release of incentives are defined by Schedules. Each incentives schedule consists three (3) parameters:

  • StartTime
  • EndTime
  • TotalAmount

Between the timespan defined by StartTime and EndTime, coins specified by TotalAmount will be released as staking rewards linearly, in the BeginBlocker of each block. Each validator who have signed the previous block gets a portion of the block reward pro-rata according to their voting power.

A new schedule can be created upon a successful CreateIncentivesScheduleProposal. The incentives module will withdraw the coins corresponding to TotalAmount from the community pool to its module account. Conversely, an active schedule can be cancelled upon a successful TerminateIncentivesScheduleProposal. All coins yet to be distributed will be returned to the community pool.

There can be multiple schedules active at the same time, each identified by a uint64. Each schedule can release multiple coins, not limited to the MARS token.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeginBlocker

func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, k keeper.Keeper)

BeginBlocker distributes block rewards to validators who have signed the previous block.

Types

type AppModule

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

AppModule implements an application module for the safety fund module

func NewAppModule

func NewAppModule(keeper keeper.Keeper) AppModule

NewAppModule creates a new AppModule object

func (AppModule) BeginBlock

func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock)

func (AppModule) ConsensusVersion

func (AppModule) ConsensusVersion() uint64

func (AppModule) EndBlock

func (AppModule) ExportGenesis

func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage

func (AppModule) InitGenesis

func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate

func (AppModule) LegacyQuerierHandler

func (AppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier

deprecated

func (AppModule) QuerierRoute

func (AppModule) QuerierRoute() string

deprecated

func (AppModule) RegisterInvariants

func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry)

func (AppModule) RegisterServices

func (am AppModule) RegisterServices(cfg module.Configurator)

func (AppModule) Route

func (AppModule) Route() sdk.Route

deprecated

type AppModuleBasic

type AppModuleBasic struct{}

AppModuleBasic defines the basic application module used by the module

func (AppModuleBasic) DefaultGenesis

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

func (AppModuleBasic) GetQueryCmd

func (AppModuleBasic) GetQueryCmd() *cobra.Command

func (AppModuleBasic) GetTxCmd

func (AppModuleBasic) GetTxCmd() *cobra.Command

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

func (AppModuleBasic) RegisterGRPCGatewayRoutes

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

func (AppModuleBasic) RegisterInterfaces

func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry)

func (AppModuleBasic) RegisterLegacyAminoCodec

func (AppModuleBasic) RegisterLegacyAminoCodec(_ *codec.LegacyAmino)

deprecated

func (AppModuleBasic) RegisterRESTRoutes

func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router)

deprecated

func (AppModuleBasic) ValidateGenesis

Directories

Path Synopsis
client
cli
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