{"componentChunkName":"component---src-pages-sips-sip-markdown-remark-frontmatter-sip-tsx","path":"/sips/sip-30/","result":{"data":{"markdownRemark":{"fileAbsolutePath":"/vercel/path0/content/sips/sip-30.md","frontmatter":{"sip":30,"sccp":null,"title":"Deprecate ERC223 from SNX and all Synths.","network":"Ethereum","author":"Clinton Ennis (@hav-noms)","type":"Governance","proposal":null,"implementor":null,"release":null,"created":"2019-11-26T00:00:00.000Z","updated":null,"status":"Implemented"},"html":"<!--You can leave these HTML comments in your merged SIP and delete the visible duplicate text guides, they will not appear and may be helpful to refer to if you edit it again. This is the suggested template for new SIPs. Note that an SIP number will be assigned by an editor. When opening a pull request to submit your SIP, please use an abbreviated title in the filename, `sip-draft_title_abbrev.md`. The title should be 44 characters or less.-->\n<h2 id=\"simple-summary\" style=\"position:relative;\"><a href=\"#simple-summary\" aria-label=\"simple summary permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Simple Summary</h2>\n<!--\"If you can't explain it simply, you don't understand it well enough.\" Provide a simplified and layman-accessible explanation of the SIP.-->\n<p>Deprecate <a href=\"https://github.com/ethereum/EIPs/issues/223\">ERC223</a> from SNX and all Synths to save gas on dex exchanges and no transaction errors.</p>\n<h2 id=\"motivation\" style=\"position:relative;\"><a href=\"#motivation\" aria-label=\"motivation permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Motivation</h2>\n<!--The motivation is critical for SIPs that want to change Synthetix. It should clearly explain why the existing protocol specification is inadequate to address the problem that the SIP solves. SIP submissions without sufficient motivation may be rejected outright.-->\n<p>The UX for <a href=\"https://mintr.synthetix.io\">Mintr</a> drove the implementation of ERC223 to reduce the number of transactions a user(minter) had to execute to deposit their sUSD into the Depot FIFO queue to be sold for ETH from 2 to 1 by only eliminating the ERC20 approve transaction prior to calling a ERC20 transferFrom. While this has been a nice UX for mintr users with the <a href=\"https://contracts.synthetix.io/Depot\">Depot</a> the benefits of ERC223 transfer have not outweighed the cons on contract to contract transfers;</p>\n<ul>\n<li>Bloated gas estimations <a href=\"https://github.com/Synthetixio/synthetix/issues/243\">Issue 243</a></li>\n<li>Causing gas loss <a href=\"https://github.com/Synthetixio/synthetix/issues/243\">Issue 243</a></li>\n<li>Perceived errors in SNX and Synth Transfers <a href=\"https://etherscan.io/address/0xe9cf7887b93150d4f2da7dfc6d502b216438f244\">etherscan</a>\n<img src=\"https://user-images.githubusercontent.com/799038/69776252-943b6d80-11ef-11ea-97b5-d01f849cff8b.png\" alt=\"Although one or more Error Occurred Reverted Contract Execution Completed\"></li>\n</ul>\n<p>There is a lot of Dex activity happening now with SNX on <a href=\"https://uniswap.info/token/0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f\">uniswap</a>, <a href=\"https://tracker.kyber.network/#/tokens/0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f\">Kyber</a>, sUSD <a href=\"https://uniswap.info/token/0x57ab1ec28d129707052df4df418d58a2d46d5f51\">uniswap</a>, <a href=\"https://tracker.kyber.network/#/tokens/0x57ab1ec28d129707052df4df418d58a2d46d5f51\">Kyber</a> and sETH <a href=\"https://uniswap.info/token/0x5e74c9036fb86bd7ecdcb084a0673efc32ea31cb\">uniswap</a>.\nThe ERC223 implementation is causing a significant cumulative gas loss trading these tokens. We aim to reduce the total gas lost / consumed trading Synthetix tokens.</p>\n<p>This will also enable better (cheaper) composability as teams integrate Synths to build Defi products.</p>\n<h2 id=\"specification\" style=\"position:relative;\"><a href=\"#specification\" aria-label=\"specification permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Specification</h2>\n<!--The technical specification should describe the syntax and semantics of any new feature.-->\n<ul>\n<li>Removing all ERC223 is a simple code change to <code>ExternStateToken.sol</code> which is inherited by <code>Synthetix.sol</code> and <code>Synth.sol</code></li>\n<li>It will require all Synths &#x26; SNX to be redeployed but no proxy addresses will change keeping all existing token addresses.</li>\n<li>The current <a href=\"https://contracts.synthetix.io/Depot\">Depot</a> will no longer be able to accept sUSD deposits effectivly putting it to its end of life.</li>\n<li>A new Depot will be required which will go back to using the original ERC20 approve, transferFrom workflow. This could be an opportunity to makes some additional improvements to the Depot such as making it upgradable. Putting it behind a proxy and giving it an external state contract so its logic can be upgraded.</li>\n</ul>\n<h2 id=\"rationale\" style=\"position:relative;\"><a href=\"#rationale\" aria-label=\"rationale permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Rationale</h2>\n<!--The rationale fleshes out the specification by describing what motivated the design and why particular design decisions were made. It should describe alternate designs that were considered and related work, e.g. how the feature is supported in other languages. The rationale may also provide evidence of consensus within the community, and should discuss important objections or concerns raised during discussion.-->\n<ul>\n<li>Removing ERC223 will no longer show the transfer errors in contract to contract transfers. <a href=\"https://etherscan.io/address/0xe9cf7887b93150d4f2da7dfc6d502b216438f244\">Uniswap sETH exchange</a></li>\n<li>This will also save 200K gas per contract to contract transfer. <a href=\"https://github.com/Synthetixio/synthetix/blob/v2.14.0/contracts/TokenFallbackCaller.sol#L52\">github code reference</a></li>\n<li>Reclaim byte code space for SNX contract deployment by removing the ERC223 implementation in <code>ExternStateToken.sol</code>.</li>\n</ul>\n<h2 id=\"implementation\" style=\"position:relative;\"><a href=\"#implementation\" aria-label=\"implementation permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Implementation</h2>\n<!--The implementations must be completed before any SIP is given status \"Implemented\", but it need not be completed before the SIP is \"Approved\". While there is merit to the approach of reaching consensus on the specification and rationale before writing code, the principle of \"rough consensus and running code\" is still useful when it comes to resolving many discussions of API details.-->\n<ul>\n<li>The current Depot will no longer be able to accept sUSD deposits but withdrawals and buying sUSD with ETH will still work as expected. It could stay until it is drained of sUSD supply.</li>\n<li>A new Depot version will need to be deployed to allow sUSD deposits. The Dapps will need to switch over to using this Depot for sUSD purchases with ETH when the FiFo queue is drained.</li>\n<li>Mintr will need to be updated to include an approve transaction for the Depot to call transferFrom to transfer the minters sUSD from their wallet to itself and create a deposit entry.</li>\n</ul>\n<h2 id=\"copyright\" style=\"position:relative;\"><a href=\"#copyright\" aria-label=\"copyright permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Copyright</h2>\n<p>Copyright and related rights waived via <a href=\"https://creativecommons.org/publicdomain/zero/1.0/\">CC0</a>.</p>"}},"pageContext":{"id":"46c433a4-a5cf-5f24-ba51-d1414e677741","frontmatter__sip":30,"__params":{"frontmatter__sip":"30"}}},"staticQueryHashes":[]}