Links

liquidate()

This function allows users to repay the debt of an under-collateralized borrower, in exchange for their collateral and a premium.
Liquidations on Morpho work the same way they work on the underlying protocol: Morpho uses the same oracle and dynamically uses the underlying protocol's parameters to automatically adjust its liquidation mechanism with the underlying protocol's liquidation parameters.
Liquidators must approve the Morpho contract to spend _amount of the underlying ERC20 token repaid.
function liquidate(
address _poolTokenBorrowedAddress,
address _poolTokenCollateralAddress,
address _borrower,
uint256 _amount
);
Input parameter
Input type
Description
_poolTokenBorrowedAddress
address
The address of the underlying protocol's pool token from which the _borrower is borrowing.
_poolTokenCollateralAddress
address
The address of the underlying protocol's pool token from which to take the _borrower's collateral.
_borrower
address
The address of the borrower to liquidate.
_amount
uint256
The amount of underlying ERC20 tokens borrowed to repay (_poolTokenBorrowedAddress's underlying token).
Reverts
Emitted Events