🚦Risk Parameters

The following risk parameters are adjustable within the Moonwell Comptroller. Most of these correspond with the Comptroller Storage variables.

Collateral Factor

The Collateral Factor is the percentage of a supplied asset that is treated as liquidity, and is set per market. If CF=0.6 for an asset, then every $1 of that asset supplied allows for $0.60 of borrowing power within the protocol. Stored in the collateralFactorMantissa variable and set via this function.

Price Oracle

This is the price oracle contract address used by the protocol to determine the prices of specific assets within the market.

Stored in the oracle variable, and set via this function.

Close Factor

The Close Factor is the percentage of a specific borrowers position that can be liquidated in one transaction.

Stored in the closeFactorMantissa variable and set via this function.

Liquidation Incentive

The Liquidation Incentive is the discount on collateral that a liquidator receives for liquidating a position.

Stored in the liquidationIncentiveMantissa variable and set via this function.

Market Borrow Cap

The Market Borrow Cap is the maximum amount of borrows allowed for a specific market.

Stored in the borrowCaps variable and set via this function.

Gas Amount

The Comptroller Gas Amount parameter sets the amount of gas that a transaction to send the native token on a chain will use - this is helpful to enable things like withdraws to smart contracts like Gnosis Safe, but if set too high can be an avenue for re-entrancy issues within the protocol.

Stored in the gasAmount variable and set via this function.

Reward Speed

The Comptroller is responsible for disbursing rewards, and supports different emission speeds for borrowers and suppliers. These speeds are set per market and per emission token where rewardType 0 = WELL, and 1 = GLMR

The reward speeds for a market are stored in the supplyRewardSpeeds and borrowRewardSpeeds variables and set via this function.

Last updated