securesecrets / ShadeGrants

Github repository for Shade Protocol grant submissions.
6 stars 0 forks source link

Silk Invariant Research [Solving USD/SILK StableSwap Curve] #2

Open CarterLWoetzel opened 2 years ago

CarterLWoetzel commented 2 years ago

Silk Invariant Research [Solving USD/SILK StableSwap Curve] - (TAKEN, open to additional team members)

StableSwapInvariant

One of the most unique innovations that has emerged within DEX design are StableSwap invariants - mathematical curves that differ from traditional constant price invariance curves. StableSwap invariants differ because of the design assumption that two assets will be trading at a similar price, or at least at a stable ratio between the two assets (USD stable / USD stable).

StableSwap

Due to the change in the invariance curve, fees and slippage are significantly reduced - creating a much better trading experience and liquidity providing configuration. StableSwap still inherits key attributes that are similar to other DEXs. Specifically, infinite liquidity with increasingly worse slippage the more volatility and derivation that occurs.

StableSwap Invariant (Curve):

StableSwapInvariantEquation

Problem

Silk faces a distinct mathematical headwind that needs to be solved for: the price of Silk is stable in relation to other stablecoin assets (such as the dollar), but with a degree of volatility due to the peg slowly shifting on a multi-year basis.

Assumption:

Assume that Silk starts at ~$1.05 Assume that Silk will change, at most, +/- ~$0.02 worth of volatility annually

Solution:

A middle-ground stablecoin invariant curve that is able to reflexively adjust to Silk’s slowly changing peg, while also operating with minimal fees and slippage due to the design assumption that the ratio between a USD stablecoin and Silk should be continually stable on a day-to-day basis (but not perfectly 1-to-1, and with variant over extended timeframes).

End Result:

A curve that can be used by any stablecoin DEX that wants to implement USDC/SILK, UST/SILK, USDT/SILK into a curve-like product. Because of the mass adoption of USD stablecoin pairs, it is unlikely that DEXs will perform this research on their own. As such, this grant is building for a future end state where we see a transition from USD centric stablecoins to alternative decentralised and non one-to-one sovereign currency pegged stablecoins. This research could hypothetically empower other non-USD but highly stable stablecoins. It is theorised by the designer of this grant that modifications to existing StableSwap invariant curves will not necessarily be that large, but potentially will have significant ramifications to the sustainability of such a product.

Stableswap Reference Research: https://curve.fi/files/crypto-pools-paper.pdf Curve StableSwap: A Comprehensive Mathematical Guide StableSwap-paper Understanding StableSwap Curve

Research value capture for Shade Protocol ecosystem

Number of users Silk Adoption Liquidity Adoption UX on Silk acquisition DEX adoption

Team members

Canaro86

Team's experience

PHD in Mathematics

Development Roadmap

The creation of the USD/SILK invarient is broken up into three milestones

Example milestones: Preliminary Research (weeks 0 - 3) Model Presentation / Simulation / Documentation (weeks 3 - 10) Psuedo Code Implementation (weeks 10 - 13)

Completion of milestone one will result in 250 SHD. The completion of milestone two will result in 1.5k SHD. The completion of milestone three will result in 500 SHD. Total: 2,250 SHD.

At current market prices (~$50) this amounts to approximately $112,500 worth of SHD.

cantaro86 commented 2 years ago

I am very interested in trying to solve this problem. I wish to participate.

CarterLWoetzel commented 2 years ago

@cantaro86 great! Added. Looking forward to your research.

GalacticPunk1 commented 2 years ago

Would love to get involved!

cantaro86 commented 2 years ago

So, I am preparing a report to present my preliminary research. I confirm that the curve hybrid model (the stableswap invariant) is not good for our purpose, but it can be generalized in several ways. At the moment, I found 3 possible ways. I still need to study the "curve v2" model, which I guess contains very useful hints. I will simulate and study them all. After that, we can choose the one that performs best according to our needs.
I will complete the report in about two weeks, and I would like to organize a call. @CarterLWoetzel what's the best way to communicate with you?

GalacticPunk1 commented 2 years ago

Finals all done, catching up on preliminary research. Has a call been organised? I will make sure I have a report on my initial findings ready by that time. @CarterLWoetzel @cantaro86

CarterLWoetzel commented 2 years ago

@GalacticPunk1 if you could reach out to @CarterWoetzel on telegram that would be great! Other option is to ping me in the Shade Protocol public telegram to get my attention