Synths on Stacks – by Alex Suvorov (RedStone)
Lead dev at RedStone Oracles, and creator of codenplay.io, Alex Suvorov, has won second place in the Builders Edition Clarity Hackathon – a smart contract challenge that lets you experiment and get familiar with Clarity’s developer environment – with his project Synths on Stacks.
Synths on Stacks makes it possible to create synthetic digital assets of over 1,000 assets (stocks, indexes, commodities, currencies, crypto) currently supported by the data feeds of the RedStone Oracles.
All of this can be tokenised and used in Stacks and hopefully attract more funds to the Stacks blockchain and also provide more utility to the existing STX holders.
Let’s take a closer look!
Synths on Stacks
In his submission video, Alex talks about how synthetics are already being used widely on other chains and protocols, and how they are needed for Stacks too. Their implementation can help the protocol immensely. Synthetix, MakerDAO, Cream Finance, and UMA are protocols that have already successfully implemented the concept.
I really believe that synthetic assets, or derivative assets, are a very important and helpful tool in decentralised finance (DeFi) and they can help to democratise access to financial instruments for people who cannot have access or can have difficult access to standard or traditional financial instruments.
So how does it work?
Synths on Stacks is compatible with the sip-010-trait. This allows the synthetic asset created to act in the same way an NFT would, where users can transfer it to others or exchange it on Decentralised Exchanges (DEXs) that are built on Stacks. They also use a CDP (collateralised debt position) pattern. Effectively, minting synths increases the debt that needs to be backed by adequate collateral.
The collateral of every user is kept in a segregated account limiting personal risk.
To mint a new synthetic token, users need to stake base tokens. In this case, STX tokens.
Token minters would be interested in shorting the underlying assets against STX by:
- Mint a synthetic asset;
- Sell it for STX (e.g. on a decentralised exchange);
- Wait for STX price to grow or for the underlying asset price to fall (or both);
- Buy synths again on a DEX (spending less STX than before);
- Burn synths and get back the STX collateral.
On the other hand, liquidators are incentivised to keep track of the minters’ solvency. If a minters solvency ratio falls below 120%, liquidators can liquidate them (by paying off their debt) and claim the minter’s collateral for themselves. Essentially a liquidator, once noticing this, would be able to buy a synth from the market, burn it, and make a profit.
Lastly, traders can help to achieve the required market liquidity needed for the minters and liquidators (to perform their parts) by speculating on the underlying asset’s price.
Synthetic assets rely on pricing data from oracles, so it’s crucial to have a secure oracle integration in place.
When talking about why he used RedStone:
I decided to use RedStone oracles because, actually, I work at RedStone, and it has a very interesting model of scaling the Oracle infrastructure by not pushing data on-chain, instead by providing signed data packages to the end users that can attach them to their transactions when they really need them.
RedStone also recently created their Oracle Hacks series, where they look at different Oracle hacks in order to learn from them and help others, and themselves, to not repeat those same mistakes.