{"componentChunkName":"component---src-pages-sips-sip-markdown-remark-frontmatter-sip-tsx","path":"/sips/sip-313/","result":{"data":{"markdownRemark":{"fileAbsolutePath":"/vercel/path0/content/sips/sip-313.md","frontmatter":{"sip":313,"sccp":null,"title":"snxUSD Market Maker","network":"Ethereum & Optimism","author":"Daniel Beal (@dbeal-eth)","type":"Governance","proposal":null,"implementor":"Daniel Beal (@dbeal-eth)","release":null,"created":"2022-11-15T00:00:00.000Z","updated":null,"status":"Rejected"},"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.\" Simply describe the outcome the proposed changes intends to achieve. This should be non-technical and accessible to a casual community member.-->\n<p>Add a new module to the Synthetix core system which allows for trading supported collaterals (ex. ETH, BTC, LINK, etc.)\nfor their equivalent oracle-reported value in snxUSD.</p>\n<h2 id=\"abstract\" style=\"position:relative;\"><a href=\"#abstract\" aria-label=\"abstract 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>Abstract</h2>\n<!--A short (~200 word) description of the proposed change, the abstract should clearly describe the proposed change. This is what *will* be done if the SIP is implemented, not *why* it should be done or *how* it will be done. If the SIP proposes deploying a new contract, write, \"we propose to deploy a new contract that will do x\".-->\n<p>Add support for snxUSD to be traded from any supported collaterla type to snxUSD or vise versa. Aggregators such as 1inch can directly interface with these trading functions. The peg of snxUSD will be maintained between\nboth upwards and downwards by a SCCP-defined \"spread\" parameter so long as limits have not been reached. Any new issued debt and collected collateral will be\ndeposited or withdrawn into/from a distribution which is shared between all stakers of the traded collateral type.</p>\n<p>A purchase of snxUSD with this method is equivalent to adding collateral/debt to all collateral depositers at a 100% c-ratio. This means that continual\nincreases of the snxUSD supply via this method will reduce the c-ratio of all distributed collateral holders to a limit of 100%. This method of\ncollateral sharing also increases the collateral exposure for the user as well. To mitigate these minor factors, a limit can be imposed by the SC\nto prevent surges in inflows from overwhelming stakers. This method of debt distribution does not, however, increase exposure to any markets/debt afterwards.</p>\n<p>Correspondingly, selling snxUSD for a collateral through this method will increase the c-ratio of all collateral participants. This has no negative side-effects.</p>\n<p>If a user is finding trouble maintaining their peg due to this system, we will provide a market which, for a fee, self-liquidates their account in a flash\ntransaction using these same USDMarket functions. Users who are capable of meeting the peg will have incentive to deposit more collateral in order to capture\nthe increased fee generation of the v3 system due to higher snxUSD in circulation.</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<!--This is the problem statement. This is the *why* of the SIP. It should clearly explain *why* the current state of the protocol is inadequate.  It is critical that you explain *why* the change is needed, if the SIP proposes changing how something is calculated, you must address *why* the current calculation is inaccurate or wrong. This is not the place to describe how the SIP will address the issue!-->\n<p>Maintaining the peg is of core importance to a stablecoin such as snxUSD. In the past, sUSD has had a tendancy to run high due to the lack of market which\nwill sell the sUSD for cheaper. During times of high demand for synthetix services, sUSD peg can easily rise to 1.03 or 1.05, and we stifle additional\nadoption of the protocol and reduce confidence</p>\n<p>In the past to solve this problem, we have resorted to a variety of methods which allow for the free minting of sUSD, but all of these systems have had major\ndrawbacks. For example, the wrappers allow for a user to deposit WETH and get sUSD, but the wrapper only has a limited capacity set by SCCP, and the existance\nof the wrapper generates additional leverage for greater market price action with the deposited assets. The protocol has also supported loans, but users\nhave not been interested in using loans because of high fees or lack of education, and the convenience of using a wrapper instead. We need another solution\nwhich allows for minting or more snxUSD while also aligning incentives for collateralization and managing exposure.</p>\n<p>The design of v3 and recent innovations with isolated debt pools, value distribution, and socialized liquidations allow for a new approach to collateral wrapping that is highly market efficient.</p>\n<h2 id=\"technical-specification\" style=\"position:relative;\"><a href=\"#technical-specification\" aria-label=\"technical 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>Technical Specification</h2>\n<!--The specification should describe the syntax and semantics of any new feature, there are five sections\n1. Overview\n2. Rationale\n3. Technical Specification\n4. Test Cases\n5. Configurable Values\n-->\n<h3 id=\"overview\" style=\"position:relative;\"><a href=\"#overview\" aria-label=\"overview 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>Overview</h3>\n<!--This is a high level overview of *how* the SIP will solve the problem. The overview should clearly describe how the new feature will be implemented.-->\n<p>A new module will be added, <code>USDMarketModule</code>, which contains the bulk of the new functionality which exchanges snxUSD to collaterals and vice-versa.\nAggregators such as 1inch or arbitrage bots can call these functions to trade from</p>\n<p>A new storage library will be added, <code>GlobalDistribution</code>, which allows for the assignment of collected delta debt/collateral to be distributed to all stakers\nevenly. Ignoring fees, a user trading with any of the <code>USDMarketModule</code> functions will trigger deposits/withdraws from this distribution of both debt\nand additional collateral which are equal in value. Therefore, there is no value loss/gain for any of the stakers (other than fees) through this transaction.</p>\n<p>The spartan council will be able to configure a new SCCP parameter for each collateral type, <code>marketSpread</code>, which can control both 1) the maximum\ntolerated deviation from peg for snxUSD (ex. 0.25% spread means 1.0025 max snxUSD price, and 0.9975 min snxUSD price). This will also determine\nthe fees collected for any volume passing through this interface.</p>\n<p>The spartan council will be able to configure a new SCCP parameter for each collateral type, <code>maxNetMarketIncrease</code>, which prevents users from\ntaking on an unexpected amount of exposure due to large purchasing of snxUSD. There is no need for a limit on snxUSD sold/outflows, since these outflows increase the system c-ratio\nand have no negative side effects other than reduced exposure.</p>\n<p>Any fees collected will be shared with the liquidity providers that are the same asset as the trade. The spartan council will be able\nto configure a new SCCP parameter for each collateral type <code>marketProtocolPercent</code>, which diverts a configurable percentage of collected\nfees deposited into a rewards distributor for SNX holders.</p>\n<p>Since stakers may be put into a situation where they are unable to support their c-ratio due to cumulative increases in the USD supply through the\nUSD Market, it may be necessary/reasonable to self-liquidate. This can easily be handled by creating a new standalone market, <code>AccountLiquidatorMarket</code>\nwhich, upon sending your account token temporarily to the market, will repay however much debt is specified and repair a user's c-ratio. The market\ncan then use the <code>USDMarket</code> to buy snxUSD with the unlocked collateral and keep an amount as a fee.</p>\n<h3 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</h3>\n<!--This is where you explain the reasoning behind how you propose to solve the problem. Why did you propose to implement the change in this way, what were the considerations and trade-offs. The rationale fleshes out what motivated the design and why particular design decisions were made. It should describe alternate designs that were considered and related work. The rationale may also provide evidence of consensus within the community, and should discuss important objections or concerns raised during discussion.-->\n<p>The v3 system has given us new opporitunities to explore increasing the supply of our USD stablecoin, and this method is both technically easy to implement,\nand falls in line with many of the strategies we already use elsewhere in v3 to achieve our system goals.</p>\n<p>As mentioned above, wrappers have major drawbacks in terms of exposure and complexity of implementation. v3 in it's design already implements what are effectively loans,\nbut there is wide expectations that loans on their own will not be sufficient to meet the full demands of users in the face of our previous liquidity struggles.</p>\n<p>Finally, this solution does have some limitations, but it can be used in conjuction with other liquidity bootstrapping strategies. Due to the extremely simple\nrequired implementation and expected benefits of this system, it seems natural to add this as another promising wrench in our toolbox of snxUSD peg management.</p>\n<h3 id=\"technical-specification-1\" style=\"position:relative;\"><a href=\"#technical-specification-1\" aria-label=\"technical specification 1 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>Technical Specification</h3>\n<!--The technical specification should outline the public API of the changes proposed. That is, changes to any of the interfaces Synthetix currently exposes or the creations of new ones.-->\n<p>TBC</p>\n<h3 id=\"test-cases\" style=\"position:relative;\"><a href=\"#test-cases\" aria-label=\"test cases 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>Test Cases</h3>\n<!--Test cases for an implementation are mandatory for SIPs but can be included with the implementation..-->\n<p>Relevant tests will be developed during implementation.</p>\n<h3 id=\"configurable-values-via-sccp\" style=\"position:relative;\"><a href=\"#configurable-values-via-sccp\" aria-label=\"configurable values via sccp 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>Configurable Values (Via SCCP)</h3>\n<!--Please list all values configurable via SCCP under this implementation.-->\n<p>For each <code>CollateralConfiguration</code>, the following parameters are added:</p>\n<ul>\n<li><code>marketSpread</code> allows for collection of fees and defining max peg deviation for users using the USD market with that collateral</li>\n<li><code>maxNetMarketIncrease</code> defines a maximum rate of net collateral accumulation to prevent collaterals from increasing too quickly. This is the only limit needed to protect this system.</li>\n<li><code>marketProtocolPercent</code> defines a protocol-level fee which is diverted to SNX token holders.</li>\n</ul>\n<p>SIP put on hold as per the authors' request</p>\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":"4d3a47bd-3a27-568a-a584-e8ea8495156c","frontmatter__sip":313,"__params":{"frontmatter__sip":"313"}}},"staticQueryHashes":[]}