|Implementor||Justin J. Moses (@justinjmoses)|
Synthetix contract on L2 can facilitate liquidations.
The version of Synthetix on L2 -
MintableSynthetix - needs to forward requests from the public to the
Issuer contract in order for liquidations to work as intended on L2.
During the Menkalinan release, the
Issuer contract was updated on L2 to align with L1, such that it could generate liquidations. However, the function in question
Issuer.liquidateDelinquentAccount() can only be invoked by
Synthetix (in the case of L2 -
MintableSynthetix) and this contract needed updating such that it can be publicly callable on L2.
liquidateDelinquentAccount logic from
BaseSynthetix along with the
AccountLiquidated event definition.
As liquidations is supported on both layers, the logic belongs in the shared base contract of both L1 (
Synthetix) and L2 (
MintableSynthetix), hence it will go into
ISynthetix interface is unchanged, however after the upgrade,
ISynthetix.liquidateDelinquentAccount() will no longer always revert with the unimplemented revert reason (
"Cannot be run on this layer").
- Given an account has been flagged for liquidation on L2, and given the delay has elapsed since flagging, and given its cratio is still below the threshold, and given the user has sufficient sUSD to liquidate the account, when a user invokes liquidation on the account, then it succeeds
Copyright and related rights waived via CC0.