PolicyFacet

PolicyFacet

This facet contract contains all the external pre-hook functions related to vToken

Solidity API

mintAllowed

Checks if the account should be allowed to mint tokens in the given market

function mintAllowed(address vToken, address minter, uint256 mintAmount) external returns (uint256)

Parameters

Return Values


mintVerify

Validates mint and reverts on rejection. May emit logs.

function mintVerify(address vToken, address minter, uint256 actualMintAmount, uint256 mintTokens) external

Parameters


redeemAllowed

Checks if the account should be allowed to redeem tokens in the given market

function redeemAllowed(address vToken, address redeemer, uint256 redeemTokens) external returns (uint256)

Parameters

Return Values


redeemVerify

Validates redeem and reverts on rejection. May emit log

function redeemVerify(address vToken, address redeemer, uint256 redeemAmount, uint256 redeemTokens) external pure

Parameters


borrowAllowed

Checks if the account should be allowed to borrow the underlying asset of the given market

function borrowAllowed(address vToken, address borrower, uint256 borrowAmount) external returns (uint256)

Parameters

Return Values


borrowVerify

Validates borrow and reverts on rejection. May emit log

function borrowVerify(address vToken, address borrower, uint256 borrowAmount) external

Parameters


repayBorrowAllowed

Checks if the account should be allowed to repay a borrow in the given market

function repayBorrowAllowed(address vToken, address payer, address borrower, uint256 repayAmount) external returns (uint256)

Parameters

Return Values


repayBorrowVerify

Validates repayBorrow and reverts on rejection. May emit log

function repayBorrowVerify(address vToken, address payer, address borrower, uint256 actualRepayAmount, uint256 borrowerIndex) external

Parameters


liquidateBorrowAllowed

Checks if the liquidation should be allowed to occur

function liquidateBorrowAllowed(address vTokenBorrowed, address vTokenCollateral, address liquidator, address borrower, uint256 repayAmount) external view returns (uint256)

Parameters


liquidateBorrowVerify

Validates liquidateBorrow and reverts on rejection. May emit logs.

function liquidateBorrowVerify(address vTokenBorrowed, address vTokenCollateral, address liquidator, address borrower, uint256 actualRepayAmount, uint256 seizeTokens) external

Parameters


seizeAllowed

Checks if the seizing of assets should be allowed to occur

function seizeAllowed(address vTokenCollateral, address vTokenBorrowed, address liquidator, address borrower, uint256 seizeTokens) external returns (uint256)

Parameters


seizeVerify

Validates seize and reverts on rejection. May emit log

function seizeVerify(address vTokenCollateral, address vTokenBorrowed, address liquidator, address borrower, uint256 seizeTokens) external

Parameters


transferAllowed

Checks if the account should be allowed to transfer tokens in the given market

function transferAllowed(address vToken, address src, address dst, uint256 transferTokens) external returns (uint256)

Parameters

Return Values


transferVerify

Validates transfer and reverts on rejection. May emit log

function transferVerify(address vToken, address src, address dst, uint256 transferTokens) external

Parameters


getAccountLiquidity

Determine the current account liquidity wrt collateral requirements

function getAccountLiquidity(address account) external view returns (uint256, uint256, uint256)

Return Values


getHypotheticalAccountLiquidity

Determine what the account liquidity would be if the given amounts were redeemed/borrowed

function getHypotheticalAccountLiquidity(address account, address vTokenModify, uint256 redeemTokens, uint256 borrowAmount) external view returns (uint256, uint256, uint256)

Parameters

Return Values


_setVenusSpeeds

Set XVS speed for a single market

function _setVenusSpeeds(contract VToken[] vTokens, uint256[] supplySpeeds, uint256[] borrowSpeeds) external

Parameters


Last updated