This facet contract contains functions regarding markets
Indicator that this is a Comptroller contract (for inspection)
Returns the vToken markets an account has entered in the Core Pool
Parameters
Return Values
Return all of the markets
Return Values
Calculate number of tokens of collateral asset to seize given an underlying amount
Parameters
Return Values
Calculate number of tokens of collateral asset to seize given an underlying amount
Parameters
Return Values
Calculate number of tokens of collateral asset to seize given an underlying amount
Parameters
Return Values
Returns whether the given account has entered the specified vToken market in the Core Pool
Parameters
Return Values
Checks whether the given vToken market is listed in the Core Pool (poolId = 0)
Parameters
Return Values
Add assets to be included in account liquidity calculation
Parameters
Return Values
Add assets to be included in account liquidity calculation
Parameters
Return Values
❌ Errors
NotAnApprovedDelegate thrown if msg.sender is not the account itself or an approved delegate
Unlists the given vToken market from the Core Pool (poolId = 0) by setting isListed to false
Parameters
Return Values
Removes asset from sender's account liquidity calculation
Parameters
Return Values
Alias to _supportMarket to support the Isolated Lending Comptroller Interface
Parameters
Return Values
Adds the given vToken market to the Core Pool (poolId = 0) and marks it as listed
Parameters
Return Values
Grants or revokes the borrowing or redeeming delegate rights to / from an account If allowed, the delegate will be able to borrow funds on behalf of the sender Upon a delegated borrow, the delegate will receive the funds, and the borrower will see the debt on their account Upon a delegated redeem, the delegate will receive the redeemed amount and the approver will see a deduction in his vToken balance
Parameters
Allows a user to switch to a new pool (e.g., e-mode ).
Parameters
📅 Events
PoolSelected Emitted after a successful pool switch.
❌ Errors
PoolDoesNotExist The specified pool ID does not exist.
AlreadyInSelectedPool The user is already in the target pool.
IncompatibleBorrowedAssets The user's current borrows are incompatible with the new pool.
LiquidityCheckFailed The user's liquidity is insufficient after switching pools.
Creates a new pool with the given label.
Parameters
Return Values
📅 Events
PoolCreated Emitted after successfully creating a new pool.
❌ Errors
EmptyPoolLabel Reverts if the provided label is an empty string.
Batch initializes market entries with basic config.
Parameters
📅 Events
PoolMarketInitialized Emitted after successfully initializing a market in a pool.
❌ Errors
ArrayLengthMismatch Reverts if poolIds and vTokens arrays have different lengths or if the length is zero.
InvalidOperationForCorePool Reverts when attempting to call pool-specific methods on the Core Pool.
PoolDoesNotExist Reverts if the target pool ID does not exist.
Removes a market (vToken) from the specified pool.
Parameters
📅 Events
PoolMarketRemoved Emitted after a market is successfully removed from a pool.
❌ Errors
InvalidOperationForCorePool Reverts if called on the Core Pool.
PoolMarketNotFound Reverts if the market is not listed in the pool.
Get the core pool collateral factor for a vToken
Parameters
Return Values
Get the core pool liquidation threshold for a vToken
Parameters
Return Values
Get the core pool liquidation Incentive for a vToken
Parameters
Return Values
Get the effective loan-to-value factor (collateral factor or liquidation threshold) for a given account and market.
Parameters
Return Values
Get the Effective Liquidation Incentive for a given account and market
Parameters
Return Values
Returns the full list of vTokens for a given pool ID.
Parameters
Return Values
❌ Errors
PoolDoesNotExist Reverts if the given pool ID do not exist.
InvalidOperationForCorePool Reverts if called on the Core Pool.
Returns the market configuration for a vToken in the core pool (poolId = 0).
Parameters
Return Values
Returns the market configuration for a vToken from _poolMarkets.
Parameters
Return Values
❌ Errors
PoolDoesNotExist Reverts if the given pool ID do not exist.
Returns true if the user can switch to the given target pool, i.e., all markets they have borrowed from are also borrowable in the target pool.
Parameters
Return Values
InactivePool The user is trying to enter inactive pool.
MarketAlreadyListed Reverts if the given market is already listed in the specified pool.
InactivePool Reverts if attempted to add markets to an inactive pool.
liquidationIncentiveMantissa
uint256
The max liquidation incentive allowed for this market, in mantissa.
marketPoolId
uint96
The pool ID this market belongs to.
isBorrowAllowed
bool
Whether borrowing is allowed in this market.
liquidationIncentiveMantissa
uint256
The liquidation incentive allowed for this market, in mantissa.
marketPoolId
uint96
The pool ID this market belongs to.
isBorrowAllowed
bool
Whether borrowing is allowed in this market.
account
address
The address of the account to query
[0]
contract VToken[]
assets A dynamic array of vToken markets the account has entered
[0]
contract VToken[]
The list of market addresses
vTokenBorrowed
address
The address of the borrowed vToken
vTokenCollateral
address
The address of the collateral vToken
actualRepayAmount
uint256
The amount of vTokenBorrowed underlying to convert into vTokenCollateral tokens
[0]
uint256
(errorCode, number of vTokenCollateral tokens to be seized in a liquidation)
[1]
uint256
borrower
address
Address of borrower whose collateral is being seized
vTokenBorrowed
address
The address of the borrowed vToken
vTokenCollateral
address
The address of the collateral vToken
actualRepayAmount
uint256
[0]
uint256
(errorCode, number of vTokenCollateral tokens to be seized in a liquidation)
[1]
uint256
vTokenCollateral
address
The address of the collateral vToken
actualRepayAmount
uint256
The amount of vTokenBorrowed underlying to convert into vTokenCollateral tokens
[0]
uint256
(errorCode, number of vTokenCollateral tokens to be seized in a liquidation)
[1]
uint256
account
address
The address of the account to check
vToken
contract VToken
The vToken to check
[0]
bool
True if the account is in the asset, otherwise false
vToken
contract VToken
The vToken Address of the market to check
[0]
bool
listed True if the (Core Pool, vToken) market is listed, otherwise false
vTokens
address[]
The list of addresses of the vToken markets to be enabled
[0]
uint256[]
Success indicator for whether each corresponding market was entered
onBehalf
address
The address of the account entering the market
vToken
address
The address of the vToken market to enable for the account
[0]
uint256
uint256 indicating the result (0 = success, non-zero = failure)
market
address
The address of the market (vToken) to unlist
[0]
uint256
uint256 0=success, otherwise a failure (See enum Error for details)
vTokenAddress
address
The address of the asset to be removed
[0]
uint256
Whether or not the account successfully exited the market
vToken
contract VToken
The address of the market (token) to list
[0]
uint256
uint256 0=success, otherwise a failure. (See enum Error for details)
vToken
contract VToken
The address of the vToken market to list in the Core Pool
[0]
uint256
uint256 0=success, otherwise a failure. (See enum Error for details)
delegate
address
The address to update the rights for
approved
bool
Whether to grant (true) or revoke (false) the borrowing or redeeming rights
poolId
uint96
The ID of the pool the user wants to enter.
label
string
name for the pool (must be non-empty).
[0]
uint96
poolId The incremental unique identifier of the newly created pool.
poolIds
uint96[]
Array of pool IDs.
vTokens
address[]
Array of market (vToken) addresses.
poolId
uint96
The ID of the pool from which the market should be removed.
vToken
address
The address of the market token to remove.
vToken
address
The address of the vToken to get the collateral factor for
[0]
uint256
The collateral factor for the vToken, scaled by 1e18
vToken
address
The address of the vToken to get the liquidation threshold for
[0]
uint256
The liquidation threshold for the vToken, scaled by 1e18
vToken
address
The address of the vToken to get the liquidation Incentive for
[0]
uint256
liquidationIncentive The liquidation incentive for the vToken, scaled by 1e18
account
address
The account whose pool is used to determine the market's risk parameters.
vToken
address
The address of the vToken market.
weightingStrategy
enum WeightFunction
The weighting strategy to use: - WeightFunction.USE_COLLATERAL_FACTOR to use collateral factor - WeightFunction.USE_LIQUIDATION_THRESHOLD to use liquidation threshold
[0]
uint256
factor The effective loan-to-value factor, scaled by 1e18.
account
address
The account whose pool is used to determine the market's risk parameters
vToken
address
The address of the vToken market
[0]
uint256
The liquidation Incentive for the vToken, scaled by 1e18
poolId
uint96
The ID of the pool whose vTokens are being queried.
[0]
address[]
An array of vToken addresses associated with the pool.
vToken
address
The address of the vToken whose market configuration is to be fetched.
isListed
bool
Whether the market is listed and enabled.
collateralFactorMantissa
uint256
The maximum borrowable percentage of collateral, in mantissa.
isVenus
bool
Whether this market is eligible for VENUS rewards.
liquidationThresholdMantissa
uint256
poolId
uint96
The ID of the pool whose market configuration is being queried.
vToken
address
The address of the vToken whose market configuration is to be fetched.
isListed
bool
Whether the market is listed and enabled.
collateralFactorMantissa
uint256
The maximum borrowable percentage of collateral, in mantissa.
isVenus
bool
Whether this market is eligible for XVS rewards.
liquidationThresholdMantissa
uint256
account
address
The address of the user attempting to switch pools.
targetPoolId
uint96
The pool ID the user wants to switch into.
[0]
bool
bool True if the switch is allowed, otherwise False.
The amount of vTokenBorrowed underlying to convert into vTokenCollateral tokens
The threshold at which liquidation is triggered, in mantissa.
The threshold at which liquidation is triggered, in mantissa.
function isComptroller() public pure returns (bool)function getAssetsIn(address account) external view returns (contract VToken[])function getAllMarkets() external view returns (contract VToken[])function liquidateCalculateSeizeTokens(address vTokenBorrowed, address vTokenCollateral, uint256 actualRepayAmount) external view returns (uint256, uint256)function liquidateCalculateSeizeTokens(address borrower, address vTokenBorrowed, address vTokenCollateral, uint256 actualRepayAmount) external view returns (uint256, uint256)function liquidateVAICalculateSeizeTokens(address vTokenCollateral, uint256 actualRepayAmount) external view returns (uint256, uint256)function checkMembership(address account, contract VToken vToken) external view returns (bool)function isMarketListed(contract VToken vToken) external view returns (bool)function enterMarkets(address[] vTokens) external returns (uint256[])function enterMarketBehalf(address onBehalf, address vToken) external returns (uint256)function unlistMarket(address market) external returns (uint256)function exitMarket(address vTokenAddress) external returns (uint256)function supportMarket(contract VToken vToken) external returns (uint256)function _supportMarket(contract VToken vToken) external returns (uint256)function updateDelegate(address delegate, bool approved) externalfunction enterPool(uint96 poolId) externalfunction createPool(string label) external returns (uint96)function addPoolMarkets(uint96[] poolIds, address[] vTokens) externalfunction removePoolMarket(uint96 poolId, address vToken) externalfunction getCollateralFactor(address vToken) external view returns (uint256)function getLiquidationThreshold(address vToken) external view returns (uint256)function getLiquidationIncentive(address vToken) external view returns (uint256)function getEffectiveLtvFactor(address account, address vToken, enum WeightFunction weightingStrategy) external view returns (uint256)function getEffectiveLiquidationIncentive(address account, address vToken) external view returns (uint256)function getPoolVTokens(uint96 poolId) external view returns (address[])function markets(address vToken) external view returns (bool isListed, uint256 collateralFactorMantissa, bool isVenus, uint256 liquidationThresholdMantissa, uint256 liquidationIncentiveMantissa, uint96 marketPoolId, bool isBorrowAllowed)function poolMarkets(uint96 poolId, address vToken) public view returns (bool isListed, uint256 collateralFactorMantissa, bool isVenus, uint256 liquidationThresholdMantissa, uint256 liquidationIncentiveMantissa, uint96 marketPoolId, bool isBorrowAllowed)function hasValidPoolBorrows(address account, uint96 targetPoolId) public view returns (bool)This facet contract contains functions for flash loan operations
Executes a flashLoan operation with the requested assets
Transfers the specified assets to the receiver contract and handles repayment. Supports both full repayment and partial repayment where unpaid amounts become ongoing debt positions.
Parameters
param
bytes
The bytes passed in the executeOperation call
onBehalf
address payable
The address of the user whose debt position will be created in case of partial repayment
receiver
address payable
The address of the contract that will receive the flashLoan amount and execute the operation
vTokens
VToken[]
The addresses of the vToken assets to be loaned
underlyingAmounts
uint256[]
The amounts of each underlying assets to be loaned
function executeFlashLoan(
address payable onBehalf,
address payable receiver,
VToken[] memory vTokens,
uint256[] memory underlyingAmounts,
bytes memory param
) externalThis facet contract provides the external functions related to all claims and rewards of the protocol
Claim all the xvs accrued by holder in all markets and VAI
Parameters
Claim all the xvs accrued by holder in the specified markets
Parameters
Claim all xvs accrued by the holders
Parameters
Claim all the xvs accrued by holder in all markets, a shorthand for claimVenus with collateral set to true
Parameters
Transfer XVS to the recipient
Parameters
Seize XVS rewards allocated to holders
Parameters
Return Values
Claim all xvs accrued by the holders
Parameters
Returns the XVS vToken address
Return Values
collateral
bool
Whether or not to use XVS earned as collateral, only takes effect when the holder has a shortfall
holder
address
The address to claim XVS for
holder
address
The address to claim XVS for
vTokens
contract VToken[]
The list of markets to claim XVS in
holders
address[]
The addresses to claim XVS for
vTokens
contract VToken[]
The list of markets to claim XVS in
borrowers
bool
Whether or not to claim XVS earned by borrowing
suppliers
bool
holder
address
The address to claim XVS for
recipient
address
The address of the recipient to transfer XVS to
amount
uint256
The amount of XVS to (possibly) transfer
holders
address[]
Addresses of the XVS holders
recipient
address
Address of the XVS token recipient
[0]
uint256
The total amount of XVS tokens seized and transferred to recipient
holders
address[]
The addresses to claim XVS for
vTokens
contract VToken[]
The list of markets to claim XVS in
borrowers
bool
Whether or not to claim XVS earned by borrowing
suppliers
bool
[0]
address
The address of XVS vToken
Whether or not to claim XVS earned by supplying
Whether or not to claim XVS earned by supplying
function claimVenus(address holder) publicfunction claimVenus(address holder, contract VToken[] vTokens) publicfunction claimVenus(address[] holders, contract VToken[] vTokens, bool borrowers, bool suppliers) publicfunction claimVenusAsCollateral(address holder) externalfunction _grantXVS(address recipient, uint256 amount) externalfunction seizeVenus(address[] holders, address recipient) external returns (uint256)function claimVenus(address[] holders, contract VToken[] vTokens, bool borrowers, bool suppliers, bool collateral) publicfunction getXVSVTokenAddress() external view returns (address)This facet contract contains all the external pre-hook functions related to vToken
Checks if the account should be allowed to mint tokens in the given market
Parameters
Return Values
Validates mint, accrues interest and updates score in prime. Reverts on rejection. May emit logs.
Parameters
Checks if the account should be allowed to redeem tokens in the given market
Parameters
Return Values
Validates redeem, accrues interest and updates score in prime. Reverts on rejection. May emit logs.
Parameters
Checks if the account should be allowed to borrow the underlying asset of the given market
Parameters
Return Values
Validates borrow, accrues interest and updates score in prime. Reverts on rejection. May emit logs.
Parameters
Checks if the account should be allowed to repay a borrow in the given market
Parameters
Return Values
Validates repayBorrow, accrues interest and updates score in prime. Reverts on rejection. May emit logs.
Parameters
Checks if the liquidation should be allowed to occur
Parameters
Validates liquidateBorrow, accrues interest and updates score in prime. Reverts on rejection. May emit logs.
Parameters
Checks if the seizing of assets should be allowed to occur
Parameters
Validates seize, accrues interest and updates score in prime. Reverts on rejection. May emit logs.
Parameters
Checks if the account should be allowed to transfer tokens in the given market
Parameters
Return Values
Validates transfer, accrues interest and updates score in prime. Reverts on rejection. May emit logs.
Parameters
Alias to getAccountLiquidity to support the Isolated Lending Comptroller Interface
Parameters
Return Values
Determine the current account liquidity wrt liquidation threshold requirements
Parameters
Return Values
Determine what the account liquidity would be if the given amounts were redeemed/borrowed
Parameters
Return Values
Set XVS speed for a single market
Parameters
borrowerIndex
uint256
repayAmount
uint256
The amount of underlying being repaid
actualRepayAmount
uint256
The amount of underlying being repaid
seizeTokens
uint256
The amount of collateral token that will be seized
seizeTokens
uint256
The number of collateral tokens to seize
seizeTokens
uint256
The number of collateral tokens to seize
vToken
address
The market to verify the mint against
minter
address
The account which would get the minted tokens
mintAmount
uint256
The amount of underlying being supplied to the market in exchange for tokens
[0]
uint256
0 if the mint is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)
vToken
address
Asset being minted
minter
address
The address minting the tokens
actualMintAmount
uint256
The amount of the underlying asset being minted
mintTokens
uint256
vToken
address
The market to verify the redeem against
redeemer
address
The account which would redeem the tokens
redeemTokens
uint256
The number of vTokens to exchange for the underlying asset in the market
[0]
uint256
0 if the redeem is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)
vToken
address
Asset being redeemed
redeemer
address
The address redeeming the tokens
redeemAmount
uint256
The amount of the underlying asset being redeemed
redeemTokens
uint256
vToken
address
The market to verify the borrow against
borrower
address
The account which would borrow the asset
borrowAmount
uint256
The amount of underlying the account would borrow
[0]
uint256
0 if the borrow is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)
vToken
address
Asset whose underlying is being borrowed
borrower
address
The address borrowing the underlying
borrowAmount
uint256
The amount of the underlying asset requested to borrow
vToken
address
The market to verify the repay against
payer
address
The account which would repay the asset
borrower
address
The account which borrowed the asset
repayAmount
uint256
[0]
uint256
0 if the repay is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)
vToken
address
Asset being repaid
payer
address
The address repaying the borrow
borrower
address
The address of the borrower
actualRepayAmount
uint256
vTokenBorrowed
address
Asset which was borrowed by the borrower
vTokenCollateral
address
Asset which was used as collateral and will be seized
liquidator
address
The address repaying the borrow and seizing the collateral
borrower
address
vTokenBorrowed
address
Asset which was borrowed by the borrower
vTokenCollateral
address
Asset which was used as collateral and will be seized
liquidator
address
The address repaying the borrow and seizing the collateral
borrower
address
vTokenCollateral
address
Asset which was used as collateral and will be seized
vTokenBorrowed
address
Asset which was borrowed by the borrower
liquidator
address
The address repaying the borrow and seizing the collateral
borrower
address
vTokenCollateral
address
Asset which was used as collateral and will be seized
vTokenBorrowed
address
Asset which was borrowed by the borrower
liquidator
address
The address repaying the borrow and seizing the collateral
borrower
address
vToken
address
The market to verify the transfer against
src
address
The account which sources the tokens
dst
address
The account which receives the tokens
transferTokens
uint256
[0]
uint256
0 if the transfer is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)
vToken
address
Asset being transferred
src
address
The account which sources the tokens
dst
address
The account which receives the tokens
transferTokens
uint256
account
address
The account get liquidity for
[0]
uint256
(possible error code (semi-opaque), account liquidity in excess of collateral requirements, account shortfall below collateral requirements)
[1]
uint256
[2]
uint256
account
address
The account get liquidity for
[0]
uint256
(possible error code (semi-opaque), account liquidity in excess of liquidation threshold requirements, account shortfall below liquidation threshold requirements)
[1]
uint256
[2]
uint256
account
address
The account to determine liquidity for
vTokenModify
address
The market to hypothetically redeem/borrow in
redeemTokens
uint256
The number of tokens to hypothetically redeem
borrowAmount
uint256
[0]
uint256
(possible error code (semi-opaque), hypothetical account liquidity in excess of collateral requirements, hypothetical account shortfall below collateral requirements)
[1]
uint256
[2]
uint256
vTokens
contract VToken[]
The market whose XVS speed to update
supplySpeeds
uint256[]
New XVS speed for supply
borrowSpeeds
uint256[]
New XVS speed for borrow
The number of tokens being minted
The number of tokens being redeemed
The amount of the underlying asset the account would repay
The amount of underlying being repaid
The address of the borrower
The address of the borrower
The address of the borrower
The address of the borrower
The number of vTokens to transfer
The number of vTokens to transfer
The amount of underlying to hypothetically borrow
function mintAllowed(address vToken, address minter, uint256 mintAmount) external returns (uint256)function mintVerify(address vToken, address minter, uint256 actualMintAmount, uint256 mintTokens) externalfunction redeemAllowed(address vToken, address redeemer, uint256 redeemTokens) external returns (uint256)function redeemVerify(address vToken, address redeemer, uint256 redeemAmount, uint256 redeemTokens) externalfunction borrowAllowed(address vToken, address borrower, uint256 borrowAmount) external returns (uint256)function borrowVerify(address vToken, address borrower, uint256 borrowAmount) externalfunction repayBorrowAllowed(address vToken, address payer, address borrower, uint256 repayAmount) external returns (uint256)function repayBorrowVerify(address vToken, address payer, address borrower, uint256 actualRepayAmount, uint256 borrowerIndex) externalfunction liquidateBorrowAllowed(address vTokenBorrowed, address vTokenCollateral, address liquidator, address borrower, uint256 repayAmount) external view returns (uint256)function liquidateBorrowVerify(address vTokenBorrowed, address vTokenCollateral, address liquidator, address borrower, uint256 actualRepayAmount, uint256 seizeTokens) externalfunction seizeAllowed(address vTokenCollateral, address vTokenBorrowed, address liquidator, address borrower, uint256 seizeTokens) external returns (uint256)function seizeVerify(address vTokenCollateral, address vTokenBorrowed, address liquidator, address borrower, uint256 seizeTokens) externalfunction transferAllowed(address vToken, address src, address dst, uint256 transferTokens) external returns (uint256)function transferVerify(address vToken, address src, address dst, uint256 transferTokens) externalfunction getBorrowingPower(address account) external view returns (uint256, uint256, uint256)function getAccountLiquidity(address account) external view returns (uint256, uint256, uint256)function getHypotheticalAccountLiquidity(address account, address vTokenModify, uint256 redeemTokens, uint256 borrowAmount) external view returns (uint256, uint256, uint256)function _setVenusSpeeds(contract VToken[] vTokens, uint256[] supplySpeeds, uint256[] borrowSpeeds) externalThis facet contract contains all the configurational setter functions
Alias to _setPriceOracle to support the Isolated Lending Comptroller Interface
Parameters
Return Values
Sets a new price oracle for the comptroller
Parameters
Return Values
Alias to _setCloseFactor to support the Isolated Lending Comptroller Interface
Parameters
Return Values
Sets the closeFactor used when liquidating borrows
Parameters
Return Values
Sets the address of the access control of this contract
Parameters
Return Values
Sets the collateral factor and liquidation threshold for a market in the Core Pool only.
Parameters
Return Values
Sets the liquidation incentive for a market in the Core Pool only.
Parameters
Return Values
Sets the collateral factor and liquidation threshold for a market in the specified pool.
Parameters
Return Values
Sets the liquidation incentive for a market in the specified pool.
Parameters
Return Values
Update the address of the liquidator contract
Parameters
Admin function to change the Pause Guardian
Parameters
Return Values
Alias to _setMarketBorrowCaps to support the Isolated Lending Comptroller Interface
Parameters
Set the given borrow caps for the given vToken market Borrowing that brings total borrows to or above borrow cap will revert
Parameters
Alias to _setMarketSupplyCaps to support the Isolated Lending Comptroller Interface
Parameters
Set the given supply caps for the given vToken market Supply that brings total Supply to or above supply cap will revert
Parameters
Set whole protocol pause/unpause state
Parameters
Return Values
Alias to _setActionsPaused to support the Isolated Lending Comptroller Interface
Parameters
Pause/unpause certain actions
Parameters
Sets a new VAI controller
Return Values
Set the VAI mint rate
Parameters
Return Values
Set the minted VAI amount of the owner
Parameters
Return Values
Set the treasury data.
Parameters
Return Values
Set the amount of XVS distributed per block to VAI Vault
Parameters
Set the VAI Vault infos
Parameters
Alias to _setPrimeToken to support the Isolated Lending Comptroller Interface
Parameters
Return Values
Sets the prime token contract for the comptroller
Parameters
Return Values
Alias to _setForcedLiquidation to support the Isolated Lending Comptroller Interface
Parameters
Enables forced liquidations for a market. If forced liquidation is enabled, borrows in the market may be liquidated regardless of the account liquidity
Parameters
Enables forced liquidations for user's borrows in a certain market. If forced liquidation is enabled, user's borrows in the market may be liquidated regardless of the account liquidity. Forced liquidation may be enabled for a user even if it is not enabled for the entire market.
Parameters
Explanation: This function grants or revokes an account's permission to use the protocol's flash loan feature, enforcing access control and address validation.
Parameters
Return Values
Set the address of the XVS token
Parameters
Set the address of the XVS vToken
Parameters
updates active status for a specific pool (excluding the Core Pool)
Parameters
📅 Events
PoolActiveStatusUpdated Emitted after the pool active status is updated.
❌ Errors
InvalidOperationForCorePool Reverts when attempting to call pool-specific methods on the Core Pool.
PoolDoesNotExist Reverts if the target pool ID does not exist.
Updates the isBorrowAllowed flag for a market in a pool.
Parameters
📅 Events
BorrowAllowedUpdated Emitted after the borrow permission for a market is updated.
❌ Errors
PoolDoesNotExist Reverts if the pool ID is invalid.
MarketConfigNotFound Reverts if the market is not listed in the pool.
newOracle
contract ResilientOracleInterface
The new price oracle to set
[0]
uint256
uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)
newOracle
contract ResilientOracleInterface
The new price oracle to set
[0]
uint256
uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)
newCloseFactorMantissa
uint256
New close factor, scaled by 1e18
[0]
uint256
uint256 0=success, otherwise will revert
newCloseFactorMantissa
uint256
New close factor, scaled by 1e18
[0]
uint256
uint256 0=success, otherwise will revert
newAccessControlAddress
address
New address for the access control
[0]
uint256
uint256 0=success, otherwise will revert
vToken
contract VToken
The market to set the factor on
newCollateralFactorMantissa
uint256
The new collateral factor, scaled by 1e18
newLiquidationThresholdMantissa
uint256
The new liquidation threshold, scaled by 1e18
[0]
uint256
uint256 0=success, otherwise a failure. (See ErrorReporter for details)
vToken
address
The market to set the liquidationIncentive for
newLiquidationIncentiveMantissa
uint256
New liquidationIncentive scaled by 1e18
[0]
uint256
uint256 0=success, otherwise a failure. (See ErrorReporter for details)
poolId
uint96
The ID of the pool.
vToken
contract VToken
The market to set the factor on
newCollateralFactorMantissa
uint256
The new collateral factor, scaled by 1e18
newLiquidationThresholdMantissa
uint256
[0]
uint256
uint256 0=success, otherwise a failure. (See ErrorReporter for details)
poolId
uint96
The ID of the pool.
vToken
address
The market to set the liquidationIncentive for
newLiquidationIncentiveMantissa
uint256
New liquidationIncentive scaled by 1e18
[0]
uint256
uint256 0=success, otherwise a failure. (See ErrorReporter for details)
newLiquidatorContract_
address
The new address of the liquidator contract
newPauseGuardian
address
The address of the new Pause Guardian
[0]
uint256
uint256 0=success, otherwise a failure. (See enum Error for details)
vTokens
contract VToken[]
The addresses of the markets (tokens) to change the borrow caps for
newBorrowCaps
uint256[]
The new borrow cap values in underlying to be set. A value of 0 corresponds to Borrow not allowed
vTokens
contract VToken[]
The addresses of the markets (tokens) to change the borrow caps for
newBorrowCaps
uint256[]
The new borrow cap values in underlying to be set. A value of 0 corresponds to Borrow not allowed
vTokens
contract VToken[]
The addresses of the markets (tokens) to change the supply caps for
newSupplyCaps
uint256[]
The new supply cap values in underlying to be set. A value of 0 corresponds to Minting NotAllowed
vTokens
contract VToken[]
The addresses of the markets (tokens) to change the supply caps for
newSupplyCaps
uint256[]
The new supply cap values in underlying to be set. A value of 0 corresponds to Minting NotAllowed
state
bool
The new state (true=paused, false=unpaused)
[0]
bool
bool The updated state of the protocol
markets_
address[]
Markets to pause/unpause the actions on
actions_
enum Action[]
List of action ids to pause/unpause
paused_
bool
The new paused state (true=paused, false=unpaused)
markets_
address[]
Markets to pause/unpause the actions on
actions_
enum Action[]
List of action ids to pause/unpause
paused_
bool
The new paused state (true=paused, false=unpaused)
[0]
uint256
uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)
newVAIMintRate
uint256
The new VAI mint rate to be set
[0]
uint256
uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)
owner
address
The address of the account to set
amount
uint256
The amount of VAI to set to the account
[0]
uint256
The number of minted VAI by owner
newTreasuryGuardian
address
The new address of the treasury guardian to be set
newTreasuryAddress
address
The new address of the treasury to be set
newTreasuryPercent
uint256
The new treasury percent to be set
[0]
uint256
uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)
venusVAIVaultRate_
uint256
The amount of XVS wei per block to distribute to VAI Vault
vault_
address
The address of the VAI Vault
releaseStartBlock_
uint256
The start block of release to VAI Vault
minReleaseAmount_
uint256
The minimum release amount to VAI Vault
_prime
contract IPrime
The new prime token contract to be set
[0]
uint256
uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
_prime
contract IPrime
The new prime token contract to be set
[0]
uint256
uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
vTokenBorrowed
address
Borrowed vToken
enable
bool
Whether to enable forced liquidations
vTokenBorrowed
address
Borrowed vToken
enable
bool
Whether to enable forced liquidations
borrower
address
The address of the borrower
vTokenBorrowed
address
Borrowed vToken
enable
bool
Whether to enable forced liquidations
account
address
The account to whitelist or remove
_isWhiteListed
bool
True to whitelist, false to remove
None
xvs_
address
The address of the XVS token
xvsVToken_
address
The address of the XVS vToken
poolId
uint96
id of the pool to update
active
bool
true to enable, false to disable
poolId
uint96
The ID of the pool.
vToken
address
The address of the market (vToken).
borrowAllowed
bool
The new borrow allowed status.
The new liquidation threshold, scaled by 1e18
function setPriceOracle(contract ResilientOracleInterface newOracle) external returns (uint256)function _setPriceOracle(contract ResilientOracleInterface newOracle) external returns (uint256)function setCloseFactor(uint256 newCloseFactorMantissa) external returns (uint256)function _setCloseFactor(uint256 newCloseFactorMantissa) external returns (uint256)function _setAccessControl(address newAccessControlAddress) external returns (uint256)function setCollateralFactor(contract VToken vToken, uint256 newCollateralFactorMantissa, uint256 newLiquidationThresholdMantissa) external returns (uint256)function setLiquidationIncentive(address vToken, uint256 newLiquidationIncentiveMantissa) external returns (uint256)function setCollateralFactor(uint96 poolId, contract VToken vToken, uint256 newCollateralFactorMantissa, uint256 newLiquidationThresholdMantissa) external returns (uint256)function setLiquidationIncentive(uint96 poolId, address vToken, uint256 newLiquidationIncentiveMantissa) external returns (uint256)function _setLiquidatorContract(address newLiquidatorContract_) externalfunction _setPauseGuardian(address newPauseGuardian) external returns (uint256)function setMarketBorrowCaps(contract VToken[] vTokens, uint256[] newBorrowCaps) externalfunction _setMarketBorrowCaps(contract VToken[] vTokens, uint256[] newBorrowCaps) externalfunction setMarketSupplyCaps(contract VToken[] vTokens, uint256[] newSupplyCaps) externalfunction _setMarketSupplyCaps(contract VToken[] vTokens, uint256[] newSupplyCaps) externalfunction _setProtocolPaused(bool state) external returns (bool)function setActionsPaused(address[] markets_, enum Action[] actions_, bool paused_) externalfunction _setActionsPaused(address[] markets_, enum Action[] actions_, bool paused_) externalfunction _setVAIController(contract VAIControllerInterface vaiController_) external returns (uint256)function _setVAIMintRate(uint256 newVAIMintRate) external returns (uint256)function setMintedVAIOf(address owner, uint256 amount) external returns (uint256)function _setTreasuryData(address newTreasuryGuardian, address newTreasuryAddress, uint256 newTreasuryPercent) external returns (uint256)function _setVenusVAIVaultRate(uint256 venusVAIVaultRate_) externalfunction _setVAIVaultInfo(address vault_, uint256 releaseStartBlock_, uint256 minReleaseAmount_) externalfunction setPrimeToken(contract IPrime _prime) external returns (uint256)function _setPrimeToken(contract IPrime _prime) external returns (uint256)function setForcedLiquidation(address vTokenBorrowed, bool enable) externalfunction _setForcedLiquidation(address vTokenBorrowed, bool enable) externalfunction _setForcedLiquidationForUser(address borrower, address vTokenBorrowed, bool enable) externalfunction setWhiteListFlashLoanAccount(address account, bool _isWhiteListed) external function _setXVSToken(address xvs_) externalfunction _setXVSVToken(address xvsVToken_) externalfunction setPoolActive(uint96 poolId, bool active) externalfunction setIsBorrowAllowed(uint96 poolId, address vToken, bool borrowAllowed) external