Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: revert changes on debt outstanding #381

Merged
4 commits merged into from May 27, 2021
Merged

fix: revert changes on debt outstanding #381

4 commits merged into from May 27, 2021

Conversation

ghost
Copy link

@ghost ghost commented May 27, 2021

fixes: #376

@fubuloubu fubuloubu requested review from fubuloubu and poolpitako May 27, 2021 14:48
@fubuloubu
Copy link
Member

fubuloubu commented May 27, 2021

@poolpitako We discussed this issue and realized that the previous update to _debtOutstanding was incorrectly done, because that value should reflect the "expected value" of what the debt outstanding will be when report is called, and not the "current value" based on what the debt currently is (which won't be updated to match until next reporting cycle)

We had done this thinking there needed to be symmetry in how the calculations were performed. However, on further inspection we realized that the context of these two calculations were very different, and the approximation in the debt ratio adjustment in _reportLoss was okay to keep as we changed it in #337.

@fubuloubu fubuloubu changed the title Revert changes on debt outstanding fix: revert changes on debt outstanding May 27, 2021
@fubuloubu fubuloubu mentioned this pull request May 27, 2021
@fubuloubu
Copy link
Member

ignore commitlint failure, merge once CI passes

@ghost ghost merged commit 1dc70ed into yearn:master May 27, 2021
orbxball pushed a commit to orbxball/yearn-vaults that referenced this pull request Aug 8, 2021
* fix: do not use totalDebt to calculate debtLimit

* feat: test failure

* docs: add comment

* refactor: move test

Co-authored-by: Poolpi Tako <poolpitako@protonmail.com>
sambacha pushed a commit to sambacha/yearn-vaults that referenced this pull request Sep 7, 2021
* fix: do not use totalDebt to calculate debtLimit

* feat: test failure

* docs: add comment

* refactor: move test

Co-authored-by: Poolpi Tako <poolpitako@protonmail.com>
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DebtRatio problem
2 participants