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​

The maximum value accepted for gracePeriod and liquidationPeriod.

uint256 public constant MAX_PERIOD = 3 days;

Returns

NameTypeDescription
<none>uint256

MIN_PERIOD​

The minimum value accepted for gracePeriod.

Also the maximum value accepted for priorityPeriod.

uint256 public constant MIN_PERIOD = 1 minutes;

Returns

NameTypeDescription
<none>uint256

MORPHO_MIDNIGHT​

The Morpho Midnight protocol the deployed gates are bound to.

address public immutable MORPHO_MIDNIGHT;

Returns

NameTypeDescription
<none>address

State Variables​

isDeployedGate​

Whether gate was deployed by this factory.

mapping(address gate => bool) public isDeployedGate;

Parameters

NameTypeDescription
gateaddress

Returns

NameTypeDescription
<none>bool

Functions​

constructor​

constructor(address morphoMidnight);

Parameters

NameTypeDescription
morphoMidnightaddress

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.