Skip to main content

DelayedLiquidationGateFactory

Git Source - Generated with forge doc

Inherits: IDelayedLiquidationGateFactory

Title: DelayedLiquidationGateFactory

CREATE2 factory deploying DelayedLiquidationGate instances.

Only factory deployments guarantee the period bounds; the gate constructor does not validate them.

Constants

MAX_PERIOD

uint256 public constant MAX_PERIOD = 3 days

MIN_PERIOD

uint256 public constant MIN_PERIOD = 1 minutes

MORPHO_MIDNIGHT

address public immutable MORPHO_MIDNIGHT

State Variables

isDeployedGate

mapping(address gate => bool) public isDeployedGate

Functions

constructor

constructor(address morphoMidnight) ;

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.