Skip to content

Liquidator

This BNB Chain Core Pool reference corresponds to the Liquidator source family in venus-protocol v10.3.0. It does not prove which implementation is behind a deployed proxy. Resolve the live implementation, immutable constructor addresses, owner, AccessControlManager, ProtocolShareReserve destination, treasury percentage, force-VAI settings, and per-borrower restrictions before encoding a call.

Entry pointsSource-level access in v10.3.0
liquidateBorrowPublic, subject to live force-VAI and borrower-specific restriction/allowlist state
restrictLiquidation, unrestrictLiquidation, addToAllowlist, removeFromAllowlistSignature-specific AccessControlManager permission
setTreasuryPercent, setMinLiquidatableVAI, setPendingRedeemChunkLength, pauseForceVAILiquidate, resumeForceVAILiquidateSignature-specific AccessControlManager permission
setProtocolShareReserveOwner only
reduceReservesPublic; transfers accrued reserves to the configured ProtocolShareReserve

Permissions and configured destinations can change. Re-read them at the block where the transaction will execute.

Address of vBNB contract.

contract IVBNB vBnb

Address of Venus Unitroller contract.

contract IComptroller comptroller

Address of VAIUnitroller contract.

contract IVAIController vaiController

Address of wBNB contract

address wBNB

Constructor for the implementation contract. Sets immutable variables.

constructor(address comptroller_, address payable vBnb_, address wBNB_) public
NameTypeDescription
comptroller_addressThe address of the Comptroller contract
vBnb_address payableThe address of the VBNB
wBNB_addressThe address of wBNB

Initializer for the implementation contract.

function initialize(uint256 treasuryPercentMantissa_, address accessControlManager_, address protocolShareReserve_) external virtual
NameTypeDescription
treasuryPercentMantissa_uint256Treasury share, scaled by 1e18 (e.g. 0.2 * 1e18 for 20%)
accessControlManager_addressaddress of access control manager
protocolShareReserve_addressThe address of the protocol share reserve contract

An admin function to restrict liquidations to allowed addresses only.

function restrictLiquidation(address borrower) external
NameTypeDescription
borroweraddressThe address of the borrower

An admin function to remove restrictions for liquidations.

function unrestrictLiquidation(address borrower) external
NameTypeDescription
borroweraddressThe address of the borrower

An admin function to add the liquidator to the allowedLiquidatorsByAccount mapping for a certain borrower. If the liquidations are restricted, only liquidators from the allowedLiquidatorsByAccount mapping can participate in liquidating the positions of this borrower.

function addToAllowlist(address borrower, address liquidator) external
NameTypeDescription
borroweraddressThe address of the borrower
liquidatoraddress

An admin function to remove the liquidator from the allowedLiquidatorsByAccount mapping of a certain borrower. If the liquidations are restricted, this liquidator will not be able to liquidate the positions of this borrower.

function removeFromAllowlist(address borrower, address liquidator) external
NameTypeDescription
borroweraddressThe address of the borrower
liquidatoraddress

Liquidates a borrow and splits the seized amount between protocol share reserve and liquidator. The liquidators should use this interface instead of calling vToken.liquidateBorrow(…) directly. Checks force VAI liquidation first; vToken should be address of vaiController if vaiDebt is greater than threshold For BNB borrows msg.value should be equal to repayAmount; otherwise msg.value should be zero.

function liquidateBorrow(address vToken, address borrower, uint256 repayAmount, contract IVToken vTokenCollateral) external payable
NameTypeDescription
vTokenaddressBorrowed vToken
borroweraddressThe address of the borrower
repayAmountuint256The amount to repay on behalf of the borrower
vTokenCollateralcontract IVTokenThe collateral to seize

Sets the new percent of the seized amount that goes to treasury. Should be less than or equal to comptroller.liquidationIncentiveMantissa().sub(1e18).

function setTreasuryPercent(uint256 newTreasuryPercentMantissa) external
NameTypeDescription
newTreasuryPercentMantissauint256New treasury percent (scaled by 10^18).

Sets protocol share reserve contract address

function setProtocolShareReserve(address payable protocolShareReserve_) external
NameTypeDescription
protocolShareReserve_address payableThe address of the protocol share reserve contract

Reduce the reserves of the pending accumulated reserves

function reduceReserves() external

Sets the threshold for minimum amount of vaiLiquidate

function setMinLiquidatableVAI(uint256 minLiquidatableVAI_) external
NameTypeDescription
minLiquidatableVAI_uint256New address for the access control

Length of the pendingRedeem array to be consider while redeeming in Liquidation transaction

function setPendingRedeemChunkLength(uint256 newLength_) external
NameTypeDescription
newLength_uint256Length of the chunk

Pause Force Liquidation of VAI

function pauseForceVAILiquidate() external

Resume Force Liquidation of VAI

function resumeForceVAILiquidate() external