Message: LiquidatePerpPosition
As described by the comment above the message handler,
Inputs
The incoming message has the following structure:
liqudationFeeReceiverValidation: None.
Impact: Not used by the contract, liquidation fees are not collected. The name implies this should determine which address should receive the liquidation fee. If not provided in the message, the caller's address is used.
tokenIdValidation: Must have an existing configuration in
tokenConfigs.Impact: Specifies which
tokenIdis being liquidated.
accountValidation: Must have an open position for the
tokenId.Impact: Specifies which position is being liquidated.
isLongValidation: None.
Impact: Specifies the direction the position is being liquidated.
trxIdValidation: None.
Impact: Not used by the on-chain contract.
priceValidation: None.
Impact: The trade price to use when calculating the PNL.
premiumRateValidation: None.
Impact: Not used by the on-chain contract.
fundingFeeGrowthValidation: None.
Impact: Used to compute the funding fees.
rolloverFeeGrowthValidation: None.
Impact: Used to compute rollover fees.
Test coverage
Intended branches
Negative behavior