LiquidationHelper
Title: Liquidation helper
Author: Malda Protocol
View helper that computes whether a borrower can be liquidated and the repay amount.
Functions
getBorrowerPosition
Computes liquidation eligibility for a borrower on a market
function getBorrowerPosition(address borrower, address market)
external
view
returns (bool shouldLiquidate, uint256 repayAmount);
Parameters
| Name | Type | Description |
|---|---|---|
borrower | address | Address of the borrower |
market | address | Market address implementing ImToken |
Returns
| Name | Type | Description |
|---|---|---|
shouldLiquidate | bool | True if borrower is below collateral requirements |
repayAmount | uint256 | Max repay amount according to close factor |