pub fn liquidate_begin(
    ctx: Context<'_, '_, '_, '_, LiquidateBegin<'_>>
) -> Result<()>
Expand description

Begin liquidating an account

The account will enter a state preventing the owner from taking any action, until the liquidator process is complete.

Requires the liquidator_metadata account, which restricts the signer to those approved by protocol governance.

Accounts

NameTypeDescription
margin_accountwritableThe account in need of liquidation.
payersignerThe address paying rent.
liquidatorsignerThe liquidator account performing the liquidation.
liquidator_metadataread_onlyThe metadata describing the liquidator.
liquidationwritableThe account to persist the state of liquidation.
system_programread_onlyThe system native program.

Events

Event NameDescription
events::LiquidationBegunMarks the beginning of the liquidation.