Liquidate Borrow
A user who has negative Account Liquidity is subject to forced liquidation by other users of the protocol to return his/her account liquidity back to positive (above the max collateral ratio). When a liquidation occurs, a liquidator may repay some or all of an outstanding borrow on behalf of a borrower and in return receive a discounted amount of collateral held by the borrower; this discount is defined as the liquidation incentive. A liquidator may close up to a certain fixed percentage of any individual outstanding borrow of the underwater account.
Liquidators must interact with each fToken contract in which they wish to repay a borrow and seize another asset as collateral. When collateral is seized, the liquidator is transferred fTokens, which they may redeem the same as if they had supplied the asset themselves. Users must approve each fToken contract before calling liquidate, as they are transferring funds into the contract.
FBep20
msg.sender: The account which shall liquidate the borrower by repaying their debt and seizing their collateral
borrower: The account with negative account liquidity that shall be liquidated
repayAmount: The amount of the borrowed asset to be repaid and converted into collateral, specified in units of the underlying borrowed asset
fTokenCollateral: The address of the fToken currently held as collateral by a borrower, that the liquidator shall seize
RETURN: 0 on success, otherwise an Error Code
Before repaying an asset, users must first approve the fToken to access their token balance.
FBnb
msg.value: payable The amount of ether to be repaid and converted into collateral, in wei
msg.sender: The account which shall liquidate the borrower by repaying their debt and seizing their collateral
borrower: The account with negative account liquidity that shall be liquidated
fTokenCollateral: The address of the fToken currently held as collateral by a borrower, that the liquidator shall seize.
RETURN: No return, reverts on error
Solidity
Web3 1.0
Last updated