Skip to main content

IDelayedLiquidationGateFactory

Git Source - Generated with forge doc

Title: IDelayedLiquidationGateFactory

Interface of the CREATE2 factory deploying DelayedLiquidationGate instances.

Functions​

MAX_PERIOD​

The maximum value accepted for gracePeriod and liquidationPeriod.

function MAX_PERIOD() external view returns (uint256);

MIN_PERIOD​

The minimum value accepted for gracePeriod.

Also the maximum value accepted for priorityPeriod.

function MIN_PERIOD() external view returns (uint256);

MORPHO_MIDNIGHT​

The Morpho Midnight protocol the deployed gates are bound to.

function MORPHO_MIDNIGHT() external view returns (address);

deployDelayedLiquidationGate​

Deploys a new DelayedLiquidationGate via CREATE2.

Reverts if gracePeriod is outside [MIN_PERIOD, MAX_PERIOD], liquidationPeriod is above MAX_PERIOD or below priorityPeriod + MIN_PERIOD, or priorityPeriod is above MIN_PERIOD.

function deployDelayedLiquidationGate(
uint256 gracePeriod,
uint256 liquidationPeriod,
uint256 priorityPeriod,
bytes32 salt
) external returns (address gate);

Parameters

NameTypeDescription
gracePerioduint256The seconds borrowers have to cure before liquidation opens.
liquidationPerioduint256The seconds during which liquidation is permitted.
priorityPerioduint256The seconds at the start of the liquidation window reserved for the priority liquidator recorded at startGracePeriod time.
saltbytes32The CREATE2 salt.

Returns

NameTypeDescription
gateaddressThe address of the deployed gate.

isDeployedGate​

Whether gate was deployed by this factory.

function isDeployedGate(address gate) external view returns (bool);

Events​

DelayedLiquidationGateDeployed​

event DelayedLiquidationGateDeployed(
address indexed gate,
uint256 gracePeriod,
uint256 liquidationPeriod,
uint256 priorityPeriod,
address indexed deployer
);

Errors​

InvalidPeriod​

error InvalidPeriod();