Documentation ¶
Index ¶
- Constants
- func GenCompleteLiquidationThreshold(r *rand.Rand) sdk.Dec
- func GenDirectLiquidationFee(r *rand.Rand) sdk.Dec
- func GenMinimumCloseFactor(r *rand.Rand) sdk.Dec
- func GenOracleRewardFactor(r *rand.Rand) sdk.Dec
- func GenSmallLiquidationSize(r *rand.Rand) sdk.Dec
- func NewDecodeStore(cdc codec.Codec) func(kvA, kvB kv.Pair) string
- func ParamChanges(*rand.Rand) []simtypes.LegacyParamChange
- func RandomizedGenState(simState *module.SimulationState)
- func SimulateMsgBorrow(ak simulation.AccountKeeper, bk bankkeeper.Keeper, lk keeper.Keeper) simtypes.Operation
- func SimulateMsgCollateralize(ak simulation.AccountKeeper, bk bankkeeper.Keeper) simtypes.Operation
- func SimulateMsgDecollateralize(ak simulation.AccountKeeper, bk bankkeeper.Keeper, lk keeper.Keeper) simtypes.Operation
- func SimulateMsgLiquidate(ak simulation.AccountKeeper, bk bankkeeper.Keeper, lk keeper.Keeper) simtypes.Operation
- func SimulateMsgRepay(ak simulation.AccountKeeper, bk bankkeeper.Keeper, lk keeper.Keeper) simtypes.Operation
- func SimulateMsgSupply(ak simulation.AccountKeeper, bk bankkeeper.Keeper) simtypes.Operation
- func SimulateMsgWithdraw(ak simulation.AccountKeeper, bk bankkeeper.Keeper, lk keeper.Keeper) simtypes.Operation
- func WeightedOperations(appParams simtypes.AppParams, cdc codec.JSONCodec, ak types.AccountKeeper, ...) simulation.WeightedOperations
Constants ¶
const ( DefaultWeightMsgSupply int = 100 DefaultWeightMsgWithdraw int = 85 DefaultWeightMsgBorrow int = 80 DefaultWeightMsgCollateralize int = 65 DefaultWeightMsgDecollateralize int = 60 DefaultWeightMsgRepay int = 70 DefaultWeightMsgLiquidate int = 75 OperationWeightMsgSupply = "op_weight_msg_supply" OperationWeightMsgWithdraw = "op_weight_msg_withdraw" OperationWeightMsgBorrow = "op_weight_msg_borrow" OperationWeightMsgCollateralize = "op_weight_msg_collateralize" OperationWeightMsgDecollateralize = "op_weight_msg_decollateralize" OperationWeightMsgRepay = "op_weight_msg_repay" 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 GenDirectLiquidationFee ¶
GenDirectLiquidationFee produces a randomized DirectLiquidationFee in the range of [0, 1000]
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 GenSmallLiquidationSize ¶
GenSmallLiquidationSize produces a randomized SmallLiquidationSize in the range of [0, 1000]
func NewDecodeStore ¶
NewDecodeStore returns a decoder function closure that unmarshals the KVPair's Value to the corresponding leverage type.
func ParamChanges ¶
func ParamChanges(*rand.Rand) []simtypes.LegacyParamChange
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 SimulateMsgBorrow ¶
func SimulateMsgBorrow(ak simulation.AccountKeeper, bk bankkeeper.Keeper, lk keeper.Keeper) simtypes.Operation
SimulateMsgBorrow tests and runs a single msg borrow where an account attempts to borrow some assets.
func SimulateMsgCollateralize ¶
func SimulateMsgCollateralize( ak simulation.AccountKeeper, bk bankkeeper.Keeper, ) simtypes.Operation
SimulateMsgCollateralize tests and runs a single msg which adds some collateral to a user.
func SimulateMsgDecollateralize ¶
func SimulateMsgDecollateralize( ak simulation.AccountKeeper, bk bankkeeper.Keeper, lk keeper.Keeper, ) simtypes.Operation
SimulateMsgDecollateralize tests and runs a single msg which removes some collateral from a user.
func SimulateMsgLiquidate ¶
func SimulateMsgLiquidate(ak simulation.AccountKeeper, bk bankkeeper.Keeper, lk keeper.Keeper) simtypes.Operation
SimulateMsgLiquidate tests and runs a single msg liquidate where one user attempts to liquidate another user's borrow.
func SimulateMsgRepay ¶
func SimulateMsgRepay(ak simulation.AccountKeeper, bk bankkeeper.Keeper, lk keeper.Keeper) simtypes.Operation
SimulateMsgRepay tests and runs a single msg repay where an account repays some borrowed assets.
func SimulateMsgSupply ¶
func SimulateMsgSupply(ak simulation.AccountKeeper, bk bankkeeper.Keeper) simtypes.Operation
SimulateMsgSupply tests and runs a single msg supply where an account supplies some available assets.
func SimulateMsgWithdraw ¶
func SimulateMsgWithdraw(ak simulation.AccountKeeper, bk bankkeeper.Keeper, lk keeper.Keeper) simtypes.Operation
SimulateMsgWithdraw tests and runs a single msg withdraw where an account attempts to withdraw some supplied assets.
func WeightedOperations ¶
func WeightedOperations( appParams simtypes.AppParams, cdc codec.JSONCodec, ak types.AccountKeeper, bk bankkeeper.Keeper, lk keeper.Keeper, ) simulation.WeightedOperations
WeightedOperations returns all the operations from the leverage module with their respective weights
Types ¶
This section is empty.