pub fn liquidator_invoke<'info>(
    ctx: Context<'_, '_, '_, 'info, LiquidatorInvoke<'info>>,
    data: Vec<u8>
) -> Result<()>
Expand description

Perform an action by invoking another program, for the purposes of liquidating a margin account.

Requires the account already be in the liquidation state, and the signer must be the same liquidator that started the liquidation state.

Accounts

NameTypeDescription
liquidatorsignerThe liquidator processing the margin account.
liquidationwritableThe account to persist the state of liquidation.
margin_accountwritableThe margin account to proxy an action for.
adapter_programread_onlyThe program to be invoked.
adapter_metadataread_onlyThe metadata about the proxy program.

Events

Event NameDescription
events::LiquidatorInvokeBeginMarks the beginning of this liquidation event.
events::PositionEvent (Note that each single event represents an different adapter position)The PositionEvent describing the change in position.
events::LiquidatorInvokeEndMarks the ending of this liquidator event.