Fund
The Fund is a derivative version of Synthetix Staking Rewards, distributing protocol revenue to veSEILOR stakers.
Config
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct FundConfig {
pub gov: Addr,
pub ve_seilor_addr: Addr,
pub seilor_addr: Addr,
pub kusd_denom: String,
pub kusd_reward_addr: Addr,
pub kusd_reward_total_amount: Uint128,
pub kusd_reward_total_paid_amount: Uint128,
// Sum of (reward rate * dt * 1e18 / total supply)
pub reward_per_token_stored: Uint128,
// uint256 immutable exitCycle = 30 days;
pub exit_cycle: Uint64,
// uint256 public claimAbleTime;
pub claim_able_time: Uint64,
pub new_gov: Option<Addr>,
pub token_cap: Option<Uint128>,
}
gov
Addr
The address of the governance contract
ve_seilor_addr
Addr
The address of the veSEILOR contract
seilor_addr
Addr
The address of SEILOR token contract
kusd_denom
String
Stablecoin kUSD denomination
kusd_reward_addr
Addr
The address of the token contract for kUSD rewards
kusd_reward_total_amount
Uint128
The total amount of kUSD rewards
kusd_reward_total_paid_amount
Uint128
The total amount of kUSD rewards paid
reward_per_token_stored
Uint128
Reward per token stored
exit_cycle
Uint64
Exit cycle
claim_able_time
Uint64
Claim able time
new_gov
Addr
The address of the new governance contract
token_cap
Uint128
Token amount limit
InitMsg
InstantiateMsg
#[cw_serde]
pub struct InstantiateMsg {
pub gov: Option<Addr>,
pub ve_seilor_addr: Addr,
pub seilor_addr: Addr,
pub kusd_denom: String,
pub kusd_reward_addr: Addr,
pub exit_cycle: Uint64,
pub claim_able_time: Uint64,
}
{
"gov": "sei1...",
"ve_seilor_addr": "sei1...",
"seilor_addr": "sei1...",
"kusd_denom": "factor/sei1.../KUSD",
"kusd_reward_addr": "sei2...",
"exit_cycle": "2592000",
"claim_able_time": "1687190400"
}
gov
Addr
The address of the governance contract
ve_seilor_addr
Addr
The address of the veSEILOR contract
seilor_addr
Addr
The address of SEILOR token contract
kusd_denom
String
Stablecoin kUSD denomination
kusd_reward_addr
Addr
The address of the token contract for kUSD rewards
exit_cycle
Uint64
Exit cycle
claim_able_time
Uint64
Claim able time
ExecuteMsg
UpdateFundConfig
#[cw_serde]
pub enum ExecuteMsg {
UpdateFundConfig { update_config_msg: UpdateConfigMsg },
}
#[cw_serde]
pub struct UpdateConfigMsg {
pub gov: Option<Addr>,
pub ve_seilor_addr: Option<Addr>,
pub seilor_addr: Option<Addr>,
pub kusd_denom: Option<String>,
pub kusd_reward_addr: Option<Addr>,
pub claim_able_time: Option<Uint64>,
}
{
"update_fund_config":
{
"update_config_msg":
{
"gov": "sei1...",
"ve_seilor_addr": "sei1...",
"seilor_addr": "sei1...",
"kusd_denom": "factor/sei1.../KUSD",
"kusd_reward_addr": "sei2...",
"claim_able_time": "1687190400"
}
}
}
update_fund_config
UpdateConfigMsg
Fund contract configuration structure
gov*
Addr
The address of the governance contract
ve_seilor_addr*
Addr
The address of the veSEILOR contract
seilor_addr*
Addr
The address of SEILOR token contract
kusd_denom*
String
Stablecoin kUSD denomination
kusd_reward_addr*
Addr
The address of the token contract for kUSD rewards
claim_able_time*
Uint64
Claim able time
RefreshReward
Update user reward.
#[cw_serde]
pub enum ExecuteMsg {
RefreshReward { account: Addr },
}
{
"refresh_reward": {
"account": "sei1..."
}
}
account
Addr
The user's address
Stake
Stake SEILOR.
#[cw_serde]
pub enum ExecuteMsg {
Stake { amount: Uint128 },
}
{
"stake": {
"amount": "1000000000000000000"
}
}
amount
Uint128
The amount of SEILOR to stake
Withdraw
#[cw_serde]
pub enum ExecuteMsg {
Withdraw { amount: Uint128 },
}
{
"withdraw": {
"amount": "1000000000000000000"
}
}
amount
Uint128
The amount of SEILOR to withdraw
ReStake
#[cw_serde]
pub enum ExecuteMsg {
ReStake {},
}
{
"re_stake": {}
}
GetReward
#[cw_serde]
pub enum ExecuteMsg {
GetReward {},
}
{
"get_reward": {}
}
NotifyRewardAmount
#[cw_serde]
pub enum ExecuteMsg {
NotifyRewardAmount { reward: Uint128 },
}
{
"notify_reward_amount": {
"reward": "1000000000000000000"
}
}
SetVeFundMinter
#[cw_serde]
pub enum ExecuteMsg {
SetVeFundMinter {
minter: Addr,
is_ve_minter: bool,
},
}
{
"set_ve_fund_minter": {
"minter": "sei1...",
"is_ve_minter": true
}
}
minter
Addr
The minter's address
is_ve_minter
bool
Whether the user is a ve-minter
VeFundMint
#[cw_serde]
pub enum ExecuteMsg {
VeFundMint {
user: Addr,
amount: Uint128,
},
}
{
"ve_fund_mint": {
"user": "sei1...",
"amount": "1000000000000000000"
}
}
user
Addr
The user's address
amout
Uint128
mint amount
QueryMsg
FundConfig
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
#[returns(FundConfigResponse)]
FundConfig {},
}
{
"fund_config": {}
}
FundConfigResponse
#[cw_serde]
pub struct FundConfigResponse {
pub gov: Addr,
pub ve_seilor_addr: Addr,
pub seilor_addr: Addr,
pub kusd_denom: String,
pub kusd_reward_addr: Addr,
pub kusd_reward_total_amount: Uint128,
pub kusd_reward_total_paid_amount: Uint128,
// Sum of (reward rate * dt * 1e18 / total supply)
pub reward_per_token_stored: Uint128,
// uint256 immutable exitCycle = 30 days;
pub exit_cycle: Uint64,
// uint256 public claimAbleTime;
pub claim_able_time: Uint64,
}
{
"gov": "sei1...",
"ve_seilor_addr": "sei1...",
"seilor_addr": "sei1...",
"kusd_denom": "factor/sei1.../kUSD",
"kusd_reward_addr": "sei2...",
"kusd_reward_total_amount": "1000000000000000000",
"kusd_reward_total_paid_amount": "1000000000000000000",
"reward_per_token_stored": "1000000000000000000",
"exit_cycle": "2592000",
"claim_able_time": "1687190400"
}
gov
Addr
The address of the governance contract
ve_seilor_addr
Addr
The address of the veSEILOR contract
seilor_addr
Addr
The address of SEILOR token contract
kusd_denom
String
Stablecoin kUSD denomination
kusd_reward_addr
Addr
The address of the token contract for kUSD rewards
kusd_reward_total_amount
Uint128
The total amount of kUSD rewards
kusd_reward_total_paid_amount
Uint128
The total amount of kUSD rewards paid
reward_per_token_stored
Uint128
Reward per token stored
exit_cycle
Uint64
Exit cycle
claim_able_time
Uint64
Claim able time
GetClaimAbleSeilor
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
#[returns(GetClaimAbleSeilorResponse)]
GetClaimAbleSeilor { user: Addr },
}
{
"get_claim_able_seilor": {
"user": "sei1..."
}
}
user
Addr
The user's address
GetClaimAbleSeilorResponse
#[cw_serde]
pub struct GetClaimAbleSeilorResponse {
pub amount: Uint128,
}
{
"amount": "1000000000000000000"
}
amount
Uint128
The amount of SEILOR that can be claimed
GetReservedSeilorForVesting
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
#[returns(GetReservedSeilorForVestingResponse)]
GetReservedSeilorForVesting { user: Addr },
}
{
"get_reserved_seilor_for_vesting": {
"user": "sei1..."
}
}
user
Addr
The user's address
GetReservedSeilorForVestingResponse
#[cw_serde]
pub struct GetReservedSeilorForVestingResponse {
pub amount: Uint128,
}
{
"amount": "1000000000000000000"
}
amount
Unit128
The remaining amount of veSEILOR that is vested for the user
Earned
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
#[returns(EarnedResponse)]
Earned { account: Addr },
}
{
"earned": {
"account": "sei1..."
}
}
account
Addr
The user's address
EarnedResponse
#[cw_serde]
pub struct EarnedResponse {
pub amount: Uint128,
}
{
"amount": "1000000000000000000"
}
amount
Unit128
The amount of veSEILOR that is earned by the user
GetClaimAbleKusd
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
#[returns(GetClaimAbleKusdResponse)]
GetClaimAbleKusd { account: Addr },
}
{
"get_claim_able_kusd": {
"account": "sei1..."
}
}
account
Addr
The user's address
GetClaimAbleKusdResponse
#[cw_serde]
pub struct GetClaimAbleKusdResponse {
pub amount: Uint128,
}
{
"amount": "1000000000000000000"
}
amount
Uint128
The amount of kUSD that the user is able to claim
GetUserRewardPerTokenPaid
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
#[returns(UserRewardPerTokenPaidResponse)]
GetUserRewardPerTokenPaid { account: Addr },
}
{
"get_user_reward_per_token_paid": {
"account": "sei1..."
}
}
account
Addr
The user's address
GetUserRewardPerTokenPaidResponse
#[cw_serde]
pub struct UserRewardPerTokenPaidResponse {
pub user_reward_per_token_paid: Uint128,
}
{
"user_reward_per_token_paid": "1000000000000000000"
}
user_reward_per_token_paid
Uint128
The rate of reward allocation per token for the user
GetUserRewards
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
#[returns(UserRewardsResponse)]
GetUserRewards { account: Addr },
}
{
"get_user_rewards": {
"account": "sei1..."
}
}
account
Addr
The user's address
UserRewardsResponse
#[cw_serde]
pub struct UserRewardsResponse {
pub user_rewards: Uint128,
}
{
"user_rewards": "1000000000000000000"
}
user_rewards
Uint128
The amount of rewards that the user is able to claim
GetUserTime2fullRedemption
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
#[returns(UserTime2fullRedemptionResponse)]
GetUserTime2fullRedemption { account: Addr },
}
{
"get_user_time2full_redemption": {
"account": "sei1..."
}
}
account
Addr
The user's address
UserTime2fullRedemptionResponse
#[cw_serde]
pub struct UserTime2fullRedemptionResponse {
pub user_time2full_redemption: Uint64,
}
{
"user_time2full_redemption": "1000000000000000000"
}
user_time2full_redemption
Uint64
GetUserUnstakeRate
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
#[returns(UserUnstakeRateResponse)]
GetUserUnstakeRate { account: Addr },
}
{
"get_user_unstake_rate": {
"account": "sei1..."
}
}
account
Addr
The user's address
UserUnstakeRateResponse
#[cw_serde]
pub struct UserUnstakeRateResponse {
pub user_unstake_rate: Uint256,
}
{
"user_unstake_rate": "1000000000000000000"
}
user_unstake_rate
Uint256
GetUserLastWithdrawTime
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
#[returns(UserLastWithdrawTimeResponse)]
GetUserLastWithdrawTime { account: Addr },
}
{
"get_user_last_withdraw_time": {
"account": "sei1..."
}
}
account
Addr
The user's address
UserLastWithdrawTimeResponse
#[cw_serde]
pub struct UserLastWithdrawTimeResponse {
pub user_last_withdraw_time: Uint64,
}
{
"user_last_withdraw_time": "1000000000000000000"
}
user_last_withdraw_time
Uint64
The time when the user last withdrew
IsVeFundMinter
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
#[returns(bool)]
IsVeFundMinter { minter: Addr },
}
{
"is_ve_fund_minter": {
"minter": "sei1..."
}
}
minter
Addr
The user's address
Return true or false.
Last updated