SIP 42: Gas Optimisations on issueSynths and burnSynths Source

AuthorJackson Chan, Clinton Ennis

Simple Summary

Optimize the calls to issueSynths by ~35% & burnSynths by ~45%


After the removal of XDRs in SIP-33 the ability to reduce the gas heavy operation of totalIssuedSynths() from 2 to 1 call became possible saving gas on;

  • Synthetix.issueSynths (& issueMaxSynths)
  • Synthetix.burnSynths


By reducing the calls to totalIssuedSynths() from 2 to 1 call takes out redundant processing of the systems value in both sUSD and XDR’s. totalIssuedSynth() is so heavy as it iterates though every Synth in Synthetix and makes a cross contract call for its totalSupply() to be able to calculate the total debt of the system.

Test Cases

KOVAN test transactions

issueSynths - burnSynths -


Copyright and related rights waived via CC0.