Fliquidator
The Fliquidator contract facilitates the liquidation of users across the vault-pair-type contracts.
Liquidation is the event-process of selling a portion of a user’s collateral to repay the user’s debt. This occurs when the value of their crypto-collateral-asset falls below a predefine threshold to back-up a percentage level of their debt value.
Liquidations are an important key operation job for the safety and protection of the pooled funds in a vault-pair contract.
FUNCTIONS
batchLiquidate()
Liquidate a user or set of users when their position is undercollateralized and get a bonus (defined in parameter bonusL in Vault). Calling user require to own and approve (ERC20) the Fliquidator contract to spend the debt crypto asset of the positions to be liquidated.
flashbatchLiquidate()
Liquidate a user or set of users when their position is undercollateralized and get a bonus (defined in parameter bonusL in Vault) by using a flashloan. Calling user does not require to own the debt crypto asset amount position to be liquidated. However, the bonus for a caller of flashbatchLiquidate is less than batchLiquidate() due to flashloan fees involved at flashloan provider.
executeFlashbatchLiquidation()
This function is the callback of flashloan providers. This call is restricted to the flasher contract and it executes the operations of a flashbatchLiquidation().
flashClose()
Initiates a flashloan used to repay partially or fully the debt position of the caller (msg.sender). Caller can pass (-1) to fully close a debt position, otherwise the specific amount of debt to be repaid. Passing a number above msg.sender debt position will revert transaction.
executeflashClose()
This function is the callback of flashloan providers. This call is restricted to the flasher contract and it executes the operations of a flashClose().
Last updated