For the complete documentation index, see llms.txt. This page is also available as Markdown.

LiquidationAdapter

Inherits: Initializable, AccessControlledV8, ReentrancyGuardUpgradeable

Title: LiquidationAdapter

Manages whitelisted liquidators/settlers, routes liquidation calls to Institutional Vault vaults, receives seized collateral, and splits incentive between protocol and caller.

Deployed as a transparent proxy (upgradeable). Holds ACM for whitelist and config management.

Solidity API

State Variables

MANTISSA_ONE

uint256 public constant MANTISSA_ONE = 1e18

vaultController

InstitutionalVaultController address (vaults are validated via controller).

address public vaultController

isWhitelistedLiquidator

HF-based liquidators — can call liquidate() when LT shortfall > 0.

mapping(address => bool) public isWhitelistedLiquidator

isWhitelistedSettler

Deadline-based settlers — can call liquidateOverdueVault() in SettlementDeadlineExceeded.

protocolLiquidationShare

Fraction of incentive portion to protocol (mantissa).

closeFactor

Max fraction of debt repayable per liquidation (mantissa). Global for all vaults.

protocolShareAccrued

Accrued protocol share per collateral token. Swept to PSR via governance.

Functions

constructor

Note: oz-upgrades-unsafe-allow: constructor

initialize

Initializes the adapter proxy.

Parameters

Name
Type
Description

vaultController_

address

VaultController address.

protocolLiquidationShare_

uint256

Initial protocol share of incentive (mantissa).

closeFactor_

uint256

Initial close factor (mantissa).

acm_

address

Venus AccessControlManager address.

setLiquidatorWhitelist

Add or remove a liquidator from the whitelist.

Note: event: LiquidatorWhitelistUpdated

Parameters

Name
Type
Description

liquidator

address

Address to update.

approved

bool

Whether to approve or remove.

setSettlerWhitelist

Add or remove a settler from the whitelist.

Note: event: SettlerWhitelistUpdated

Parameters

Name
Type
Description

settler

address

Address to update.

approved

bool

Whether to approve or remove.

setProtocolLiquidationShare

Set the protocol share of the liquidation incentive (mantissa).

Notes:

  • error: InvalidShare if share > 1e18.

  • event: ProtocolLiquidationShareUpdated

Parameters

Name
Type
Description

share

uint256

New share (0 <= share <= 1e18).

setCloseFactor

Set max fraction of debt repayable per liquidation.

Notes:

  • error: InvalidCloseFactor if zero or > 1e18.

  • event: CloseFactorUpdated

Parameters

Name
Type
Description

newCF

uint256

New close factor (0 < newCF <= 1e18).

sweepProtocolShareToReserve

Transfer accrued protocol share for the given collateral token to PSR.

Note: event: ProtocolShareSweptToReserve

Parameters

Name
Type
Description

collateral

address

Collateral token address.

liquidate

HF-based liquidation. Whitelisted liquidator only.

Parameters

Name
Type
Description

vault

address

Vault address to liquidate.

repayAmount

uint256

Amount of supply asset to repay.

liquidateOverdueVault

Deadline-based liquidation. Whitelisted settler only.

Parameters

Name
Type
Description

vault

address

Vault address to liquidate.

repayAmount

uint256

Amount of supply asset to repay.

renounceOwnership

Disabled — renouncing ownership would permanently brick ACM-gated liquidation governance.

Note: error: OwnershipCannotBeRenounced Always reverts.

Events

LiquidatorWhitelistUpdated

SettlerWhitelistUpdated

ProtocolLiquidationShareUpdated

CloseFactorUpdated

LiquidationCollateralSplit

ProtocolShareSweptToReserve

Errors

NotWhitelistedLiquidator

NotWhitelistedSettler

VaultNotRegistered

InvalidShare

InvalidCloseFactor

InvalidAddress

ZeroRepayAmount

OwnershipCannotBeRenounced

Last updated