AaveModule7579
Integration into lending protocol.
Last updated
Integration into lending protocol.
Last updated
If your Health Factor is too low, then your positions may be liquidated. This will result in the loss of part of the deposited funds.
AaveModule7579 can make an emergency repayment. The module takes a flash loan and sends the borrowed funds to the account. Then account abstraction repays borrowed token and withdraws supplied token to make swap from supply to borrow token. After the swap, the borrowed token is repaid to the Pool. After calling emergency repayment, the health factor increases.
The user supplied Ether into the Aave protocol, then borrowed USDC. If the price of Ether decreases, the Health Factor decreases as well. To avoid liquidation of the position, one can call emergencyRepayment to restore Health Factor to target.