LiquidationApprovalRegistry
Stores coordinator-local, bounded authorization for a receiver vault to accept liquidation debt from an exact operator. LiquidationApprovalRegistry source contract
Read surface
Use coordinator to identify the validating coordinator and implied security pool. LIQUIDATION_APPROVAL_TYPEHASH, DOMAIN_SEPARATOR, and liquidationApprovalDigest define the chain- and registry-bound EIP-712 message. getLiquidationApproval reports parameters plus available, reserved, consumed, and revoked state; minimumLiquidationApprovalNonce reports receiver invalidation state; liquidationReservations and minimumHealthFactorBps expose operation reservation state and its execution-time health floor.
State-changing interactions
| Transaction | Caller | Main prerequisites | State or asset effect | Primary signals |
|---|---|---|---|---|
initialize(coordinator) |
Anyone while the registry remains uninitialized; normal factory deployment initializes the clone atomically | Coordinator is nonzero and the registry has not been initialized. | Binds this registry clone to one coordinator and therefore one security pool. | No event; the public coordinator getter records the binding. |
setLiquidationApproval(params) |
The receiver vault named by params |
Correct local pool; nonzero receiver and operator; positive cumulative and per-operation limits with per-operation no greater than cumulative; health factor at least 10,000 BPS; live ordered validity window; unused, non-invalidated nonce. | Installs explicit onchain bounded approval state and consumes the receiver-scoped nonce. | LiquidationApprovalSet |
permitLiquidationApproval(params, signature) |
Anyone relaying the receiver vault signature | Signature is valid for params.receiverVault; the chain ID, registry address, stable name/version, pool, receiver, operator, target scope, limits, health factor, window, and nonce are bound by the digest; direct-install validation rules also pass. |
Validates an EIP-712 EOA or ERC-1271 signature immediately, installs explicit approval state, and consumes the receiver-scoped nonce. | LiquidationApprovalSet |
revokeLiquidationApproval(approvalId) |
Approval receiver vault only | Approval exists and is not already revoked. | Prevents new reservations while leaving reservations already attached to staged operations intact. | LiquidationApprovalRevoked with available, reserved, and consumed totals |
invalidateLiquidationApprovalNonce(newNonce) |
Receiver vault invalidating its own older nonce range | New nonce is greater than the receiver current minimum. | Raises the minimum nonce accepted for new approval installation or reservation. | LiquidationApprovalNonceInvalidated |
reserve(operationId, approvalId, receiverVault, targetVault, operator, requestedDebtAttoEth, snapshotTargetDebtAttoEth, latestExecutionTimestamp) |
Bound coordinator only | Approval matches local pool, receiver, exact operator, and exact or wildcard target; it is active, unrevoked, non-invalidated, valid through latest execution, and has positive reservable quota. | Moves quota from available to pending reserved at staging, bounded by requested debt, target snapshot debt, per-operation limit, and available cumulative quota. | LiquidationApprovalReserved |
release(operationId) |
Bound coordinator only | Coordinator terminal cleanup path. | Returns an unsettled delegated reservation to available quota. A missing, self-route, or already settled reservation is a no-op. | LiquidationApprovalReleased when quota is returned |
consume(operationId, debtMovedAttoEth) |
Bound coordinator only | For a delegated reservation, it is unsettled and moved debt does not exceed reserved debt. A self route is a no-op. | Permanently consumes exactly moved debt, releases unused reservation, and settles the reservation once. | LiquidationApprovalConsumed |
Accounting examples
Minimum post-liquidation health factor
minPostLiquidationHealthFactorBps is applied to both vault-health branches at execution. 10,000 (BPS_DENOMINATOR) means exactly the protocol minimum; a larger value requires the receiver to be over-collateralized by that ratio after accepting the position. The factor is checked against live post-liquidation state, not the queue-time preview.