ComptrollerStorage
ComptrollerStorage
Storage layout for the Comptroller
contract.
Solidity API
struct LiquidationOrder {
contract VToken vTokenCollateral;
contract VToken vTokenBorrowed;
uint256 repayAmount;
}
struct AccountLiquiditySnapshot {
uint256 totalCollateral;
uint256 weightedCollateral;
uint256 borrows;
uint256 effects;
uint256 liquidity;
uint256 shortfall;
}
struct RewardSpeeds {
address rewardToken;
uint256 supplySpeed;
uint256 borrowSpeed;
}
struct Market {
bool isListed;
uint256 collateralFactorMantissa;
uint256 liquidationThresholdMantissa;
mapping(address => bool) accountMembership;
}
enum Action {
MINT,
REDEEM,
BORROW,
REPAY,
SEIZE,
LIQUIDATE,
TRANSFER,
ENTER_MARKET,
EXIT_MARKET
}
oracle
Oracle which gives the price of any given asset
contract ResilientOracleInterface oracle
closeFactorMantissa
Multiplier used to calculate the maximum repayAmount when liquidating a borrow
uint256 closeFactorMantissa
liquidationIncentiveMantissa
Multiplier representing the discount on collateral that a liquidator receives
uint256 liquidationIncentiveMantissa
accountAssets
Per-account mapping of "assets you are in"
mapping(address => contract VToken[]) accountAssets
markets
Official mapping of vTokens -> Market metadata
mapping(address => struct ComptrollerStorage.Market) markets
allMarkets
A list of all markets
contract VToken[] allMarkets
borrowCaps
Borrow caps enforced by borrowAllowed for each vToken address. Defaults to zero which restricts borrowing.
mapping(address => uint256) borrowCaps
minLiquidatableCollateral
Minimal collateral required for regular (non-batch) liquidations
uint256 minLiquidatableCollateral
supplyCaps
Supply caps enforced by mintAllowed for each vToken address. Defaults to zero which corresponds to minting not allowed
mapping(address => uint256) supplyCaps
isForcedLiquidationEnabled
Flag indicating whether forced liquidation enabled for a market
mapping(address => bool) isForcedLiquidationEnabled
prime
Prime token address
contract IPrime prime
approvedDelegates
Whether the delegate is allowed to borrow or redeem on behalf of the user
mapping(address => mapping(address => bool)) approvedDelegates
Last updated