Aave.

Допис

Діліться своїми знаннями.

Aaveator.
Jan 25, 2023
Питання та відповіді експертів

Aave Liquidation call Learning

I’m currently trying to learn about Liquidation call. so far I managed to perform deposit, withdraw, borrow and repay successfully using Aave protocol app on Koven testnet, on coming to getting liquidated. How do I perform self liquidation. If i want to perform liquidation call what should i have to do, how can I participate on liquidation any path to learn and perform liquidation call that would be useful, thanks.

  • Aave liquidation
0
2
Поділитися
Коментарі
.

Відповіді

2
0x8744...6532.
Jan 25 2023, 15:26

To get liquidated, you need have a loan out from Aave and be undercollateralized. Meaning, you need to have a healthFactor that is below 1. Your health factor decreases as the value of your collateral decreases.

Because of this, liquidiation is difficult to practice on Kovan, since you'd have to manipulate the price of the Chainlink oracles. This would be easier to do on a local fork of the chain.

Once the price of your collateral is low enough, you'll call:

liquidationCall(address collateral, address debt, address user, uint256 debtToCover, bool receiveAToken)

collateral: address of the collateral reserve debt: address of the debt reserve user: address of the borrower debtToCover: amount of asset debt that the liquidator will repay receiveAToken: if true, the user receives the aTokens equivalent of the purchased collateral. If false, the user receives the underlying asset directly.

You can learn more from the Aave docs

1
Коментарі
.
Aaveator.
Feb 2 2023, 17:31

Well for testing Aave liquidation, you will have to simulate collateral price drop i.e. get HF < 1 . The best way to that is by impersonating admin account to update price in hardhat fork. Aave sandbox is designed specifically for such integrations https://github.com/aave/aave-sandbox

For more details on liquidation cal, refer guide here

0
Коментарі
.

Ви знаєте відповідь?

Будь ласка, увійдіть та поділіться нею.

Aave is a decentralized non-custodial liquidity protocol where users can participate as depositors or borrowers.

213Пости230Відповіді
Sui.X.Peera.

Зароби свою частку з 1000 Sui

Заробляй бали репутації та отримуй винагороди за допомогу в розвитку спільноти Sui.

Ми використовуємо файли cookie, щоб гарантувати вам найкращий досвід на нашому сайті.
Детальніше