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

Answers 1

Maybe 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.