SIP-313: snxUSD Market Maker
Author | |
---|---|
Status | Rejected |
Type | Governance |
Network | Ethereum & Optimism |
Implementor | Daniel Beal (@dbeal-eth) |
Release | TBD |
Created | 2022-11-15 |
Simple Summary
Add a new module to the Synthetix core system which allows for trading supported collaterals (ex. ETH, BTC, LINK, etc.) for their equivalent oracle-reported value in snxUSD.
Abstract
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 both 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 deposited or withdrawn into/from a distribution which is shared between all stakers of the traded collateral type.
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 increases 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 collateral sharing also increases the collateral exposure for the user as well. To mitigate these minor factors, a limit can be imposed by the SC to prevent surges in inflows from overwhelming stakers. This method of debt distribution does not, however, increase exposure to any markets/debt afterwards.
Correspondingly, selling snxUSD for a collateral through this method will increase the c-ratio of all collateral participants. This has no negative side-effects.
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 transaction using these same USDMarket functions. Users who are capable of meeting the peg will have incentive to deposit more collateral in order to capture the increased fee generation of the v3 system due to higher snxUSD in circulation.
Motivation
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 will 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 adoption of the protocol and reduce confidence
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 drawbacks. 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 of the wrapper generates additional leverage for greater market price action with the deposited assets. The protocol has also supported loans, but users have 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 which allows for minting or more snxUSD while also aligning incentives for collateralization and managing exposure.
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.
Technical Specification
Overview
A new module will be added, USDMarketModule
, which contains the bulk of the new functionality which exchanges snxUSD to collaterals and vice-versa.
Aggregators such as 1inch or arbitrage bots can call these functions to trade from
A new storage library will be added, GlobalDistribution
, which allows for the assignment of collected delta debt/collateral to be distributed to all stakers
evenly. Ignoring fees, a user trading with any of the USDMarketModule
functions will trigger deposits/withdraws from this distribution of both debt
and 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.
The spartan council will be able to configure a new SCCP parameter for each collateral type, marketSpread
, which can control both 1) the maximum
tolerated 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
the fees collected for any volume passing through this interface.
The spartan council will be able to configure a new SCCP parameter for each collateral type, maxNetMarketIncrease
, which prevents users from
taking 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
and have no negative side effects other than reduced exposure.
Any fees collected will be shared with the liquidity providers that are the same asset as the trade. The spartan council will be able
to configure a new SCCP parameter for each collateral type marketProtocolPercent
, which diverts a configurable percentage of collected
fees deposited into a rewards distributor for SNX holders.
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
USD Market, it may be necessary/reasonable to self-liquidate. This can easily be handled by creating a new standalone market, AccountLiquidatorMarket
which, 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
can then use the USDMarket
to buy snxUSD with the unlocked collateral and keep an amount as a fee.
Rationale
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, and falls in line with many of the strategies we already use elsewhere in v3 to achieve our system goals.
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, but 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.
Finally, this solution does have some limitations, but it can be used in conjuction with other liquidity bootstrapping strategies. Due to the extremely simple required implementation and expected benefits of this system, it seems natural to add this as another promising wrench in our toolbox of snxUSD peg management.
Technical Specification
TBC
Test Cases
Relevant tests will be developed during implementation.
Configurable Values (Via SCCP)
For each CollateralConfiguration
, the following parameters are added:
marketSpread
allows for collection of fees and defining max peg deviation for users using the USD market with that collateralmaxNetMarketIncrease
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.marketProtocolPercent
defines a protocol-level fee which is diverted to SNX token holders.
SIP put on hold as per the authors' request
Copyright
Copyright and related rights waived via CC0.