SUSD: Stoichiometric USD

Inspirations

We always have been very interested in stablecoins and wanted to understand how they work. We have read a lot of papers, and to make this project, our main inspirations were Uniswap, TraderJoe, Curve and MakerDao but also our work on Beaker. For the frontend design, we mostly used the design that we made for Beaker.fi, our main project.

What it does

Stoichiometric is a Stablecoin protocol which integrates 3 main features: a DAO, a Stablecoin, an AMM

DAO

The DAO controls the whole stablecoin ecosystem. It has admin badge access to the DEX and the Stabelcoin lender. Users can make the following decisions:

  • Change the voting period for the DAO
  • Change the minimum amount of votes to make a proposal valid
  • Change the parameters of a Lender
  • Allow a new token to be used as collateral
  • Give a non-fungible resource that allows the minting and burning of the stablecoin. This enables new protocols to enter the stablecoin ecosystem
  • Recall a stablecoin minter. This enables the users to remove a protocol from the ecosystem.

DEX

The DEX is vastly inspired by TraderJoe, which is basically Uniswap v3 but with a constant-sum AMM between each tick. The DEX is built so that every pair has to include SUSD. The goal of the DEX is to concentrate as much liquidity around SUSD as possible. Therefore, the DEX pairs graph is a star with SUS at the center. This enables in theory to make SUSD more stable.

Issuer

The stablecoin lender enables users to lock allowed collateral against SUSD. The liquidation process differs from MakerDAO, DAI and AAVE in the sense that it uses a constant-product AMM curve to decide the amount of collateral to be liquidated when the liquidation threshold is exceeded.

Challenges :

We had only three weeks to implement this very ambitious project and it is clearly not enough. We did not have enough time to make a proper frontend implementation of every feature we wanted to build (the DAO is not entirely working on the frontend for example). Moreover, we wanted a good experience for the frontend and it involved some features that were lacking from the gateway API (mostly the decoding part). Hence, we had to find a way to decode everything by ourselves.

Accomplishments:

We managed to build a full app with a lot of features from scratch in 3 weeks that interacts with the betanet wallet and network. We managed to build :

  1. A DEX
  2. A CDP stablecoin
  3. A DAO We are also proud of our theoretical understanding of how everything works together, and how to implement it with Scypto.

What we learned:

We learned how to work under pressure and as a team. We understood how to properly use typescript, how not to break others' work when changing our code, and how to quickly deploy and test features. We also learned that we should put milestones that we work on one at a time instead of trying to develop five things simultaneously.

What's next:

As we said, the DAO is not functional on the front end. We still need to finish this and improve its design. We also need to develop more tests.

References:

Share this project:

Updates