ComptrollerLens
ComptrollerLens Contract
Lens for querying information relating to liquidations
Solidity API
liquidateCalculateSeizeTokens
Computes the number of collateral tokens to be seized in a liquidation event
Parameters
comptroller
address
Address of comptroller
vTokenBorrowed
address
Address of the borrowed vToken
vTokenCollateral
address
Address of collateral for the borrow
actualRepayAmount
uint256
Repayment amount i.e amount to be repaid of total borrowed amount
Return Values
[0]
uint256
A tuple of error code, and tokens to seize
[1]
uint256
liquidateVAICalculateSeizeTokens
Computes the number of VAI tokens to be seized in a liquidation event
Parameters
comptroller
address
Address of comptroller
vTokenCollateral
address
Address of collateral for vToken
actualRepayAmount
uint256
Repayment amount i.e amount to be repaid of the total borrowed amount
Return Values
[0]
uint256
A tuple of error code, and tokens to seize
[1]
uint256
getHypotheticalAccountLiquidity
Computes the hypothetical liquidity and shortfall of an account given a hypothetical borrow A snapshot of the account is taken and the total borrow amount of the account is calculated
Parameters
comptroller
address
Address of comptroller
account
address
Address of the borrowed vToken
vTokenModify
contract VToken
Address of collateral for vToken
redeemTokens
uint256
Number of vTokens being redeemed
borrowAmount
uint256
Amount borrowed
Return Values
[0]
uint256
Returns a tuple of error code, liquidity, and shortfall
[1]
uint256
[2]
uint256
Last updated