enterMarketsmethod on the Comptroller, where
cTokensis an array of Cozy money market addresses.
exitMarketmethod described below. Notice that you can enter multiple markets in a single transaction, but you can only exit one market per call. When exiting a market, your transaction will fail with an error code if you have an outstanding borrow balance in that market, or if exiting the market would result in insufficient account liquidity.
getAssetsInmethod to return a list of markets that a user has entered. The method takes the user's address as an input and returns the full set of markets for the specified user in an array. The array of markets returned by this method is the full set of markets used for liquidity calculations.
marketsfunction by providing a Cozy token market address as input:
boolvalue for the
trueif the market is recognized by the Comptroller or
falseif it is not.
uint256returned by the function is an 18 decimal number for the
collateralFactorMantissaproperty described above. A value of 0.9 means that you can supply this market's assets as collateral to borrow up to 90% of the supplied value.
boolvalue is for the
isCompedproperty that is not currently used and can be safely ignored.
getAllMarketsmethod to return an array of all Cozy token markets supported by the Comptroller as follows:
uint256will equal the user's account liquidity and the third
uint256will equal zero. If the account queried has negative account liquidity, that is, the user has a shortfall and can be liquidated, the second
uint256will be zero and the third
uint256will equal the shortfall amount.
liquidationIncentiveMantissamethod specifies additional collateral that liquidators receive. For example, if the liquidation incentive is 1.08e18, then liquidators receive 8% more collateral than the borrow amount they closed.
Failurelogs when calling methods on the Comptroller. These codes are descriptive so no additional description is provided.