The Rewards Dispatcher contract accumulates the rewards from Hub's delegations and manages the rewards.
All rewards from stSei tokens (the share of all rewards proportional to the amount of stSei tokens minted) are converted to Luna and are re-delegated back to the validators pool.
All rewards from bSei (the share of all rewards proportional to the amount of bSei tokens minted) are sent to the Reward Contract and handled the old way.
Config
Copy #[derive( Serialize , Deserialize , Clone , Debug , PartialEq , JsonSchema )]
pub struct Config {
pub owner : CanonicalAddr ,
pub hub_contract : CanonicalAddr ,
pub bsei_reward_contract : CanonicalAddr ,
pub stsei_reward_denom : String ,
pub bsei_reward_denom : String ,
pub krp_keeper_address : CanonicalAddr ,
pub krp_keeper_rate : Decimal ,
pub swap_contract : CanonicalAddr ,
pub swap_denoms : Vec < String >,
pub oracle_contract : CanonicalAddr ,
}
InitMsg
Copy #[derive( Serialize , Deserialize , Clone , Debug , PartialEq , JsonSchema )]
pub struct InstantiateMsg {
pub hub_contract : String ,
pub bsei_reward_contract : String ,
pub stsei_reward_denom : String ,
pub bsei_reward_denom : String ,
pub krp_keeper_address : String ,
pub krp_keeper_rate : Decimal ,
pub swap_contract : String ,
pub swap_denoms : Vec < String >,
pub oracle_contract : String ,
}
ExecuteMsg
[Internal] SwapToRewardDenom
Swaps all native tokens on his balance to Sei and kUSD proportional to the minted stSei and bSei amount.
Can only be executed by the Hub .
Copy #[derive( Serialize , Deserialize , Clone , Debug , PartialEq , JsonSchema )]
#[serde(rename_all = "snake_case" )]
pub enum ExecuteMsg {
SwapToRewardDenom {
bsei_total_bonded : Uint128 ,
stsei_total_bonded : Uint128 ,
},
}
[Internal] DispatchRewards
Re-stakes the stSei rewards (with subtracted Fee) and sends the bSei rewards to the old bSei Rewards contract (with subtracted Fee).
Can only be executed by the Hub .
Copy #[derive( Serialize , Deserialize , Clone , Debug , PartialEq , JsonSchema )]
#[serde(rename_all = "snake_case" )]
pub enum ExecuteMsg {
DispatchRewards {},
}
UpdateConfig
Updates the dispatcher's configuration. Can only be executed by the owner.
Copy #[derive( Serialize , Deserialize , Clone , Debug , PartialEq , JsonSchema )]
#[serde(rename_all = "snake_case" )]
pub enum ExecuteMsg {
UpdateConfig {
hub_contract : Option < String >,
bsei_reward_contract : Option < String >,
stsei_reward_denom : Option < String >,
bsei_reward_denom : Option < String >,
krp_keeper_address : Option < String >,
krp_keeper_rate : Option < Decimal >,
},
}
SetOwner
Transfer ownership permissions to a new owner address.
Copy #[derive( Serialize , Deserialize , Clone , Debug , PartialEq , JsonSchema )]
#[serde(rename_all = "snake_case" )]
pub enum ExecuteMsg {
SetOwner {
new_owner_addr : String ,
},
}
AcceptOwnership
The new owner accepts ownership permissions.
Copy #[derive( Serialize , Deserialize , Clone , Debug , PartialEq , JsonSchema )]
#[serde(rename_all = "snake_case" )]
pub enum ExecuteMsg {
AcceptOwnership {},
}
UpdateSwapContract
Update the contract address of the Swap Extension , which can only be modified by the owner.
Copy #[derive( Serialize , Deserialize , Clone , Debug , PartialEq , JsonSchema )]
#[serde(rename_all = "snake_case" )]
pub enum ExecuteMsg {
UpdateSwapContract {
swap_contract : String ,
},
}
UpdateSwapDenom
Add or remove Native token denomination types supported by the Swap Extension .
Copy #[derive( Serialize , Deserialize , Clone , Debug , PartialEq , JsonSchema )]
#[serde(rename_all = "snake_case" )]
pub enum ExecuteMsg {
UpdateSwapDenom {
swap_denom : String ,
is_add : bool ,
},
}
UpdateOracleContract
Update the contract address of the Oracle , which can only be modified by the owner.
Copy #[derive( Serialize , Deserialize , Clone , Debug , PartialEq , JsonSchema )]
#[serde(rename_all = "snake_case" )]
pub enum ExecuteMsg {
UpdateOracleContract {
oracle_contract : String ,
}
}
QueryMsg
Config
Returns the current configuration of the contract.
Copy #[derive( Serialize , Deserialize , Clone , Debug , PartialEq , JsonSchema )]
#[serde(rename_all = "snake_case" )]
pub enum QueryMsg {
Config {},
}
ConfigResponse
Copy #[derive( Serialize , Deserialize , Clone , Debug , PartialEq , JsonSchema )]
pub struct ConfigResponse {
pub owner : String ,
pub hub_contract : String ,
pub bsei_reward_contract : String ,
pub stsei_reward_denom : String ,
pub bsei_reward_denom : String ,
pub krp_keeper_address : String ,
pub krp_keeper_rate : Decimal ,
pub swap_contract : String ,
pub swap_denoms : Vec < String >,
pub oracle_contract : String ,
}
NewOwner
Query the address of the new owner.
Copy #[derive( Serialize , Deserialize , Clone , Debug , PartialEq , JsonSchema )]
#[serde(rename_all = "snake_case" )]
pub enum QueryMsg {
NewOwner {},
}
NewOwnerResponse
Copy #[derive( Serialize , Deserialize , Clone , Debug , PartialEq , JsonSchema )]
pub struct NewOwnerResponse {
pub new_owner : String ,
}