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
| Name | Type | Description |
|---|---|---|
<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
| Name | Type | Description |
|---|---|---|
<none> | uint256 |
MORPHO_MIDNIGHT
The Morpho Midnight protocol the deployed gates are bound to.
address public immutable MORPHO_MIDNIGHT;
Returns
| Name | Type | Description |
|---|---|---|
<none> | address |
State Variables
isDeployedGate
Whether gate was deployed by this factory.
mapping(address gate => bool) public isDeployedGate;
Parameters
| Name | Type | Description |
|---|---|---|
gate | address |
Returns
| Name | Type | Description |
|---|---|---|
<none> | bool |
Functions
constructor
constructor(address morphoMidnight);
Parameters
| Name | Type | Description |
|---|---|---|
morphoMidnight | 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
| Name | Type | Description |
|---|---|---|
gracePeriod | uint256 | The seconds borrowers have to cure before liquidation opens. |
liquidationPeriod | uint256 | The seconds during which liquidation is permitted. |
priorityPeriod | uint256 | The seconds at the start of the liquidation window reserved for the priority liquidator recorded at startGracePeriod time. |
salt | bytes32 | The CREATE2 salt. |
Returns
| Name | Type | Description |
|---|---|---|
gate | address | The address of the deployed gate. |