Documentation ¶
Index ¶
- Constants
- func GenCompleteLiquidationThreshold(r *rand.Rand) sdk.Dec
- func GenMinimumCloseFactor(r *rand.Rand) sdk.Dec
- func GenOracleRewardFactor(r *rand.Rand) sdk.Dec
- func NewDecodeStore(cdc codec.Codec) func(kvA, kvB kv.Pair) string
- func ParamChanges(r *rand.Rand) []simtypes.ParamChange
- func RandomizedGenState(simState *module.SimulationState)
- func SimulateMsgBorrowAsset(ak simulation.AccountKeeper, bk types.BankKeeper, lk keeper.Keeper) simtypes.Operation
- func SimulateMsgLendAsset(ak simulation.AccountKeeper, bk types.BankKeeper) simtypes.Operation
- func SimulateMsgLiquidate(ak simulation.AccountKeeper, bk types.BankKeeper, lk keeper.Keeper) simtypes.Operation
- func SimulateMsgRepayAsset(ak simulation.AccountKeeper, bk types.BankKeeper, lk keeper.Keeper) simtypes.Operation
- func SimulateMsgSetCollateralSetting(ak simulation.AccountKeeper, bk types.BankKeeper, lk keeper.Keeper) simtypes.Operation
- func SimulateMsgWithdrawAsset(ak simulation.AccountKeeper, bk types.BankKeeper, lk keeper.Keeper) simtypes.Operation
- func WeightedOperations(appParams simtypes.AppParams, cdc codec.JSONCodec, ak types.AccountKeeper, ...) simulation.WeightedOperations
Constants ¶
const ( DefaultWeightMsgLendAsset int = 100 DefaultWeightMsgWithdrawAsset int = 85 DefaultWeightMsgBorrowAsset int = 80 DefaultWeightMsgSetCollateral int = 60 DefaultWeightMsgRepayAsset int = 70 DefaultWeightMsgLiquidate int = 75 OperationWeightMsgLendAsset = "op_weight_msg_lend_asset" OperationWeightMsgWithdrawAsset = "op_weight_msg_withdraw_asset" OperationWeightMsgBorrowAsset = "op_weight_msg_borrow_asset" OperationWeightMsgSetCollateral = "op_weight_msg_set_collateral" OperationWeightMsgRepayAsset = "op_weight_msg_repay_asset" OperationWeightMsgLiquidate = "op_weight_msg_liquidate" )
Default simulation operation weights for leverage messages
Variables ¶
This section is empty.
Functions ¶
func GenCompleteLiquidationThreshold ¶
GenCompleteLiquidationThreshold produces a randomized CompleteLiquidationThreshold in the range of [0.050, 0.100]
func GenMinimumCloseFactor ¶
GenMinimumCloseFactor produces a randomized MinimumCloseFactor in the range of [0.001, 0.047]
func GenOracleRewardFactor ¶
GenOracleRewardFactor produces a randomized OracleRewardFactor in the range of [0.005, 0.100]
func NewDecodeStore ¶
NewDecodeStore returns a decoder function closure that unmarshals the KVPair's Value to the corresponding leverage type.
func ParamChanges ¶
func ParamChanges(r *rand.Rand) []simtypes.ParamChange
ParamChanges defines the parameters that can be modified by param change proposals on the simulation
func RandomizedGenState ¶
func RandomizedGenState(simState *module.SimulationState)
RandomizedGenState generates a random GenesisState for oracle
func SimulateMsgBorrowAsset ¶
func SimulateMsgBorrowAsset(ak simulation.AccountKeeper, bk types.BankKeeper, lk keeper.Keeper) simtypes.Operation
SimulateMsgBorrowAsset tests and runs a single msg borrow where an account attempts to borrow some assets.
func SimulateMsgLendAsset ¶
func SimulateMsgLendAsset(ak simulation.AccountKeeper, bk types.BankKeeper) simtypes.Operation
SimulateMsgLendAsset tests and runs a single msg lend where an account lends some available assets.
func SimulateMsgLiquidate ¶
func SimulateMsgLiquidate(ak simulation.AccountKeeper, bk types.BankKeeper, lk keeper.Keeper) simtypes.Operation
SimulateMsgLiquidate tests and runs a single msg liquidate where one user attempts to liquidate another user's borrow.
func SimulateMsgRepayAsset ¶
func SimulateMsgRepayAsset(ak simulation.AccountKeeper, bk types.BankKeeper, lk keeper.Keeper) simtypes.Operation
SimulateMsgRepayAsset tests and runs a single msg repay where an account repays some borrowed assets.
func SimulateMsgSetCollateralSetting ¶
func SimulateMsgSetCollateralSetting( ak simulation.AccountKeeper, bk types.BankKeeper, lk keeper.Keeper, ) simtypes.Operation
SimulateMsgSetCollateralSetting tests and runs a single msg set collateral where an account enables or disables a uToken denom as collateral.
func SimulateMsgWithdrawAsset ¶
func SimulateMsgWithdrawAsset(ak simulation.AccountKeeper, bk types.BankKeeper, lk keeper.Keeper) simtypes.Operation
SimulateMsgWithdrawAsset tests and runs a single msg withdraw where an account attempts to withdraw some lent assets.
func WeightedOperations ¶
func WeightedOperations( appParams simtypes.AppParams, cdc codec.JSONCodec, ak types.AccountKeeper, bk types.BankKeeper, lk keeper.Keeper, ) simulation.WeightedOperations
WeightedOperations returns all the operations from the leverage module with their respective weights
Types ¶
This section is empty.