Skip to main content

Rewards Dispatcher

The Rewards Dispatcher contract accumulates the rewards from Hub's delegations and manages the rewards.

All rewards from stLuna tokens (the share of all rewards proportional to the amount of stLuna tokens minted) are converted to Luna and are re-delegated back to the validators pool.

All rewards from bLuna (the share of all rewards proportional to the amount of bLuna tokens minted) are sent to the Reward Contract and handled the old way.

Config#

KeyTypeDescription
ownerCanonicalAddrOwner of the contract
hub_contractCanonicalAddrContract address of Hub
bluna_reward_contractCanonicalAddrContract address of bLuna Reward
stluna_reward_denomStringNative token denomination for distributed stLuna rewards
bluna_reward_denomStringNative token denomination for distributed bLuna rewards
lido_fee_addressCanonicalAddrAddress for fee distribution
lido_fee_rateDecimalAmount of fees which goes to Lido Fee Address
{  "owner": "terra1...",  "hub_contract": "terra1...",  "bluna_reward_contract": "terra1...",  "stluna_reward_denom": "uluna",  "bluna_reward_denom": "uusd",  "lido_fee_address": "terra1...",  "lido_fee_rate": "0.005"}

InitMsg#

pub struct InstantiateMsg {    pub hub_contract: String,    pub bluna_reward_contract: String,    pub stluna_reward_denom: String,    pub bluna_reward_denom: String,    pub lido_fee_address: String,    pub lido_fee_rate: Decimal,}
{  "hub_contract": "terra1...",  "bluna_reward_contract": "terra1...",  "stluna_reward_denom": "uluna",  "bluna_reward_denom": "uusd",  "lido_fee_address": "terra1...",  "lido_fee_rate": "0.005" }
KeyTypeDescription
hub_contractCanonicalAddrContract address of Hub
bluna_reward_contractCanonicalAddrContract address of bLuna Reward
stluna_reward_denomStringNative token denomination for distributed stLuna rewards
bluna_reward_denomStringNative token denomination for distributed bLuna rewards
lido_fee_addressCanonicalAddrAddress for fee distribution
lido_fee_rateDecimalAmount of fees which goes to Lido Fee Address

ExecuteMsg#

UpdateConfig#

Updates the dispatcher's configuration. Can only be executed by the owner.

pub enum ExecuteMsg{    UpdateConfig {        owner: Option<String>,        hub_contract: Option<String>,        bluna_reward_contract: Option<String>,        stluna_reward_denom: Option<String>,        bluna_reward_denom: Option<String>,        lido_fee_address: Option<String>,        lido_fee_rate: Option<Decimal>,    },}
{  "owner": "terra1...",  "hub_contract": "terra1...",  "bluna_reward_contract": "terra1...",  "stluna_reward_denom": "uluna",  "bluna_reward_denom": "uusd",  "lido_fee_address": "terra1...",  "lido_fee_rate": "0.005" }
KeyTypeDescription
owner*CanonicalAddrNew owner of the contract
hub_contract*CanonicalAddrNew contract address of Hub
bluna_reward_contract*CanonicalAddrNew contract address of bLuna Reward
stluna_reward_denom*StringNew native token denomination for distributed stLuna rewards
bluna_reward_denom*StringNew native token denomination for distributed bLuna rewards
lido_fee_address*CanonicalAddrNew address for fee distribution
lido_fee_rate*DecimalNew amount of fees which goes to Lido Fee Address

* = optional

[Internal] SwapToRewardDenom#

Swaps all native tokens on his balance to Luna and Terra USD proportional to the minted stLuna and bLuna amount.

Can only be executed by the Hub.

pub enum ExecuteMsg {    SwapToRewardDenom {        bluna_total_bond_amount: Uint128,        stluna_total_bond_amount: Uint128,    }}
{  "bluna_total_bond_amount": "100000",  "stluna_total_bond_amount": "2000000"}
KeyTypeDescription
bluna_total_bond_amountUint128Total amount of minted bLuna
stluna_total_bond_amountUint128Total amount of minted stLuna

[Internal] DispatchRewards#

Re-stakes the stLuna rewards (with subtracted Lido Fee) and sends the bLuna rewards to the old bLuna Rewards contract (with subtracted Lido Fee).

Can only be executed by the Hub.

pub enum ExecuteMsg {    DispatchRewards {}}
{  "dispatch_rewards": {}}

QueryMsg#

Config#

Returns the current configuration of the contract.

pub enum QueryMsg {    Config {},}
{  "config": {}}

Returns Config struct.