Skip to content

SIP-150: fix issuance debt bug #547

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

Merged
merged 4 commits into from
Jun 18, 2021

Conversation

zyzek
Copy link
Contributor

@zyzek zyzek commented Jun 16, 2021

No description provided.

@vercel
Copy link

vercel bot commented Jun 16, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/synthetixio/sips/FbrGKD1bakwE6cPFfW6avmvTgx4j
✅ Preview: https://sips-git-sip-150-issuance-debt-adjustment-tr-e4ccae-synthetixio.vercel.app

@zyzek zyzek marked this pull request as ready for review June 17, 2021 05:56

### Overview

The `DebtCache._updateCachedSynthDebtsWithRates` function is called during issuance to update the cached debt with the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add a bit more context here on where this change was introduced and why - "in SIP-136, the debt calculation was amended to correctly exclude debt from total system debt. This included an update to the cached debt recalculation in _updateCachedSynthDebtsWithRates, however the logic implemented was broken. It intended to subtract the excluded debt from total cached debt, however it in fact subtracted the excluded debt from the delta cached debt."

Copy link
Contributor

@jjgonecrypto jjgonecrypto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just please add Liam's suggestion. 🙏

@jjgonecrypto jjgonecrypto merged commit 32d337b into master Jun 18, 2021
@jjgonecrypto jjgonecrypto deleted the sip-150-issuance-debt-adjustment-truncation branch June 18, 2021 19:14
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.

3 participants