Closed ueco-jb closed 2 years ago
I don't think this is a bug. The credit_line - debt
is calculated elsewhere, e.g. here.
This queries available common tokens for other calculations, but the one I highlighted is still a response for QueryMsg::CreditLine
. Should there be a credit_line
, that actually doesn't calculate a debt?
I'm not sure I understand. What I linked queries credit_line
and subtracts debt
to figure out how much is available.
I looked up the definition of "credit line" and it's the limit of how much you can borrow in total, not how much more you can borrow.
Closing - see comment above!
I just noticed, that our
credit_line
query returnscredit_line
simply by multiplying collateral by ratio: https://github.com/confio/isotonic/blob/9287d9b0ae50e334f737990cabaf58b6a3401dad/contracts/isotonic-market/src/contract.rs#L845-L848where it should be actually:
Creating an issue to highlight, but it will be probably fixed along https://github.com/confio/isotonic/issues/121.