Post
Share your knowledge.
Calling liquidationCall - Aave error
Hello, I'm having issues with calling liquidationCall
, would appreciate it if anyone can tell me what I'm doing wrong.
I'm running a fork of Polygon Mumbai on hardhat:
- impersonate whale accounts to transfer tokens to my account
- gave approval to the Pool contact, supplied WETH and borrowed DAI
- impersonate Pool Admin and set the price oracle for my collateral (WETH) to 1
- health factor is now < 1, so I call
liquidationCall
- transaction goes through successfully, but barely any debt was paid. Eg. If i borrowed 200 DAI, I still have an outstanding loan of 199.xx DAI after the
liquidationCall
Am I missing anything here?
In the debtToCover
argument, I played around with using the amount I borrowed and the max uint value (type(uint256).max in Solidity) but I'm still only liquidating a fraction of a percent of the borrowed amount
- Aave Protocol
- Aave liquidation
Answers
1Maybe you dropped so much the collateral value that is not enough to cover decently the debt value?
Like, if you had 1 ETH as collateral to cover 200 DAI, but now ETH value is 1$, it would only be able to cover 1 DAI or less.
Do you know the answer?
Please log in and share it.
Aave is a decentralized non-custodial liquidity protocol where users can participate as depositors or borrowers.
- Error "No matching key" when trying to unstake USDC on BNB chain32
- How to tell the code to, rather than "deposit 1 eth worth of WBTC" deposit "500$ worth of WBTC"?22
- How to interpret configuration field in a response from the getReserveData view function in Aave v2?21
- Getting a return value of '25 - INVALID BURN AMOUNT'21
- Is there any way to stake in the security module on Görli?23