|Network||Ethereum & Optimism|
Bug fix in Debt Pool Synthesis that doesn't correctly match the amount of debt shares to sUSD minted.
Issuer contract on L1 and L2 to correctly account for total debt across both networks when minting and burning.
When minting or burning, the
Issuer is supposed to calculate the ratio of global debt shares to global issued synths to figure out how many debt shares to issue. However, when it actually figures out the number of debt shares during mint/burn, it uses the local network's debt share amount. This leads to minting/burning of a lower number of debt shares than actually appropriate, while still minting the full amount of sUSD.
The fix involves updating this line in
Issuer to use
_debtBalanceOfAndTotalDebt(synthetixDebtShare().balanceOf(_issuer),sUSD) instead of
Copyright and related rights waived via CC0.