The motivation for this PR was to ensure we can query health and not query the oracle if a user has zero debts. This is relevant for liquidations where it needs to avoid the conservative oracle circuit breakers.
This is solved by adding a new message HealthState that the credit manager calls. It simply replies with Healthy or Unhealthy(max_ltv). This is the only things that credit manager needs to know about. Which means it can skip doing the queries/calculations if there are no debts now.
Also, the Health contract needed a manually setting of the Params contract address. The health contract is already querying the config for Credit Manager. So this is unnecessary. Removed!
The motivation for this PR was to ensure we can query health and not query the oracle if a user has zero debts. This is relevant for liquidations where it needs to avoid the conservative oracle circuit breakers.
This is solved by adding a new message HealthState that the credit manager calls. It simply replies with Healthy or Unhealthy(max_ltv). This is the only things that credit manager needs to know about. Which means it can skip doing the queries/calculations if there are no debts now.
Also, the Health contract needed a manually setting of the Params contract address. The health contract is already querying the config for Credit Manager. So this is unnecessary. Removed!