How AaveModule7579 works
Last updated
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 account abstraction. Then account abstraction does repay borrow token and withdraw supply tokens to make swap supply token -> borrow token. After the swap, the borrow token is returned to the Pool. After calling emergency repayment, your health factor increases.
You made supply Ether into the Aave protocol, then you made borrow USDC. Then the price of Ether began to fall, which led to a decrease in the Health Factor. To avoid liquidation of your position, you call emergencyRepayment, after calling the debt on the position will be closed and you will restore your Health Factor.