eclypse-labs / eclypse-core

The core contracts of the eclypse protocol
1 stars 0 forks source link

Liquidations and PriceFeed errors. #7

Closed gaspardthrl closed 1 year ago

gaspardthrl commented 1 year ago

In the PositionsManager contract, in the function debtOfInETH (first line of the function). Why do we use WETHAddress and not Denominations.ETH.

This removes the Error: Feed not found.

However, when doing so the position becomes liquidable even though it shouldn't be.

We did not have those errors before.

Any clues @devsquaaa, @userdarius, @GustaveCharles ?

devsquaaa commented 1 year ago

In debtOfInEth we basically need to fetch the price of ETH/USD.

The problem with Denomination.ETH is that we then have to use usdc’s token address to query the PriceFeed contract, which means we make the assumption that 1 USDC = 1$.

Now for the « Feed not found. » error, I was not aware of that and I’ll fix it, since I am the one who pushed the change (commit 469575a35fae63b6eef4f9d584ba3e47a1d3f830).

devsquaaa commented 1 year ago

Nevermind, you're right, I misunderstood what you meant. I'll push the fix ASAP.

userdarius commented 1 year ago

Ok once this is solved make sure to close the issue

devsquaaa commented 1 year ago

Fixed : a8e72e7b5b10a3a4c0a75a29f82371fb6f5be537