Interface
Strategy contracts satisfies the specific interface described below.
ExecuteMsg
ExecuteMsg::Stake
ExecuteMsg::Stake
On ExecuteMsg::Stake
, staking amount is configured on info.funds
.
ExecuteMsg::Unstake
ExecuteMsg::Unstake
On ExecuteMsg::Unstake
, unstaking amount is put as Uint128
variable on UnstakeMsg
.
ExecuteMsg::ExecuteEpoch
ExecuteMsg::ExecuteEpoch
On ExecuteMsg::ExecuteEpoch
, the strategy contract has to execute the periodical process of the strategy. For example, auto compounding.
This Msg is called by yieldaggregator
module periodically. However, this Msg can be called by anyone (because this is not SudoMsg
), so the strategy contract must not implement logics that can be abused by malicious users.
QueryMsg
QueryMsg::Bonded
QueryMsg::Bonded
QueryMsg::Bonded
needs following info for querying:
addr
: address of the Vault that deposit funds to the strategy.
This query returns the amount of bonded tokens of the address.
Unbonding
QueryMsg::Unbonding
needs following info for querying:
addr
: address of the Vault that deposit funds to the strategy.
This query returns the amount unbonding tokens of the address.
QueryMsg::Fee
QueryMsg::Fee
QueryMsg::Fee
needs no info for querying.
This query returns FeeResp
object that contains information of fees.
Developers who developed strategy contracts have to implement this query properly, to show how much fees are charged on the strategy to users. Otherwise, the proposal for registering the strategy will be rejected.
Source codes
Last updated