Skip to main content
logo

incentives

The incentives module facilitates the incentivisation of staking on Mars Hub. Incentivisation is defined via linear unlocking schedules. Tokens associated with a schedule are sourced from the community pool and therefore incentives can only be launched after a successful governance action. It should be noted that a schedule can consist of multiple tokens, not only MARS.

Links

Proposal Types

CreateIncentivesScheduleProposal

CreateIncentivesScheduleProposal defines a governance proposal for starting a new incentives schedule.

proposals.proto
Copy

_31
message CreateIncentivesScheduleProposal {
_31
option (gogoproto.equal) = false;
_31
option (gogoproto.goproto_getters) = false;
_31
option (gogoproto.goproto_stringer) = false;
_31
_31
// Title is the title of the proposal
_31
string title = 1;
_31
_31
// Description is the description of the proposal
_31
string description = 2;
_31
_31
// StartTime is the UNIX timestamp of which this incentives schedule shall begin
_31
google.protobuf.Timestamp start_time = 3 [
_31
(gogoproto.stdtime) = true,
_31
(gogoproto.nullable) = false,
_31
(gogoproto.moretags) = "yaml:\"start_time\""
_31
];
_31
_31
// EndTime is the UNIX timestamp of which this incentives schedule shall finish
_31
google.protobuf.Timestamp end_time = 4 [
_31
(gogoproto.stdtime) = true,
_31
(gogoproto.nullable) = false,
_31
(gogoproto.moretags) = "yaml:\"end_time\""
_31
];
_31
_31
// Amount is the total amount of coins that shall be released to stakers throughout the span of this incentives schedule
_31
repeated cosmos.base.v1beta1.Coin amount = 5 [
_31
(gogoproto.nullable) = false,
_31
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
_31
];
_31
}

TerminateIncentivesSchedulesProposal

TerminateIncentivesSchedulesProposal defines a governance proposal for pre-mature ending of one or more incentives schedules.

proposals.proto
Copy

_14
message TerminateIncentivesSchedulesProposal {
_14
option (gogoproto.equal) = false;
_14
option (gogoproto.goproto_getters) = false;
_14
option (gogoproto.goproto_stringer) = false;
_14
_14
// Title is the title of the proposal
_14
string title = 1;
_14
_14
// Description is the description of the proposal
_14
string description = 2;
_14
_14
// Ids is the array of identifiers of the incentives schedules which are to be terminated
_14
repeated uint64 ids = 3;
_14
}

Queries

Query defines the gRPC querier service for the incentives module.

query.proto
Copy

_11
service Query {
_11
// Schedule queries an incentives schedule by identifier
_11
rpc Schedule(QueryScheduleRequest) returns (QueryScheduleResponse) {
_11
option (google.api.http).get = "/mars/incentives/v1beta1/schedule/{id}";
_11
}
_11
_11
// Schedules queries all incentives schedules
_11
rpc Schedules(QuerySchedulesRequest) returns (QuerySchedulesResponse) {
_11
option (google.api.http).get = "/mars/incentives/v1beta1/schedules";
_11
}
_11
}

QueryScheduleRequest

QueryScheduleRequest is the request type for the Query/Schedule RPC method.

query.proto
Copy

_7
message QueryScheduleRequest {
_7
option (gogoproto.equal) = false;
_7
option (gogoproto.goproto_getters) = false;
_7
_7
// ID is the identifier of the incentives schedule to be queried
_7
uint64 id = 1;
_7
}

QueryScheduleResponse

QueryScheduleResponse is the response type for the Query/Schedule RPC method.

query.proto
Copy

_4
message QueryScheduleResponse {
_4
// Schedule is the parameters of the incentives schedule
_4
Schedule schedule = 1 [(gogoproto.nullable) = false];
_4
}

QuerySchedulesRequest

QuerySchedulesRequest is the request type for the Query/Schedules RPC method.

query.proto
Copy

_7
message QuerySchedulesRequest {
_7
option (gogoproto.equal) = false;
_7
option (gogoproto.goproto_getters) = false;
_7
_7
// Pagination defines an optional pagination for the request
_7
cosmos.base.query.v1beta1.PageRequest pagination = 1;
_7
}

QuerySchedulesResponse

QuerySchedulesResponse is the response type for the Query/Schedules RPC method.

query.proto
Copy

_7
message QuerySchedulesResponse {
_7
// Schedule is the parameters of the incentives schedule
_7
repeated Schedule schedules = 1 [(gogoproto.nullable) = false];
_7
_7
// Pagination defines the pagination in the response
_7
cosmos.base.query.v1beta1.PageResponse pagination = 2;
_7
}