docs: ADR-4: max collateral utilization#940
Conversation
Co-authored-by: toteki <63419657+toteki@users.noreply.github.com>
Co-authored-by: toteki <63419657+toteki@users.noreply.github.com>
toteki
left a comment
There was a problem hiding this comment.
There is a naming issue between Collateral Utilization and Borrow Utilization.
Imagine 3 users:
- Alice lends
100 ATOM, does not enable atom as collateral - Bob lends
200 ATOM, enables atom as collateral - Charlie borrows
100 ATOM
In this case, borrow utilization is 100/300. (Equal to the amounts borrowed / lent)
Would collateral utilization be the same? Or would it be 100/200 (equal to borrowed / collateral)?
If we desire the first option, we should stick to the existing concept Borrow Utilization.
|
I think it might be more intuitive to define utilization as a percent (98 collateral / 100 supply = than a 1/N (98 collateral / 2 non-collateral = |
We want to know how much more there is collateral over available supply. Simple supply doesn't take into account what's available (how much was borrowed). So it won't give us what we want. |
|
In Does that mean Edit: Also If the above is accurate, I can start looking over the math again. |
|
@toteki available supply is defined, see adr3. |
toteki
left a comment
There was a problem hiding this comment.
Just realized that ADR-004 was modified to use change interest rate to depend on collateral utilization. This needs to be reverted.
Dynamic interest rates work on the ratio of supply vs borrow - they need to increase when borrows are high, even when the Token is disabled as collateral.
|
This is intended. If we block new borrows based on collateral_utilization_ (the model presented in this ADR update) rather supply_utilization, then we should update the interest rate algorithm. In fact we can use both: select the max of two indices. BTW, base on the definition, the current model is base on supply_utilization. |
|
If proposing a change to interest rate algorithm, please separate it into a different PR. Renaming to supply_utilization is fine of course, but switching interest rate to collateral utilization (which is what we'd get if we merged now) has not been discussed with anyone besides us and doesn't work for non-collateral assets anyway. Also for future design PRs: It is possible to make a new ADR document rather than adding to old ones when modifying a feature - see how |
|
To reduce the diff size here, I will try extracting the |
|
I don't see a reason of splitting this PR. We could argue that some renames can go into other PRs, but most of the changes are logically connected:
Let's focus on logical changes, unless something is really not related to this PR. We have lot of work to do. |
Our previous design PRs have only modified the A source of frustration for me is that a bunch of things have been combined in this PR
I know the PR splitting creates merge conflicts and extra work for you, but I want to unravel this before it keeps growing, or at least confine it to |
|
Like I said, I want to be efficient. All changes in this PR are related to the major problem I outlined 2 months ago. I can move interest changes to other PR, but don't want to debate about cosmetic changes and double the work. |
toteki
left a comment
There was a problem hiding this comment.
Okay, the rest of this is good to merge
Description
closes: #926
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!to the type prefix if API or client breaking changeCHANGELOG.mdReviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!in the type prefix if API or client breaking change