Stableswaps on Cardano

Episode by Peter Bui on January 18th, 2024

The Minswap team have put together a bug bounty for their new open-source stableswap smart contract. If you’re a developer and know how to work through Aiken and Cardano smart contracts, this one is for you!

Read over the latest blog post about the Minswap Stableswap bug bounty.

Learn More About Stableswaps

You can read over the documentation and article about stableswaps on the Wingriders documentation website.

Visit the Wingriders DEX to interact with the stableswap and see it in action.

TeddySwap Drama

The lead off-chain developer, Clark has decided to leave the TeddySwap project.

If you’d like the full details, please read his long thread.

Listen to the Other Side of the Story

Text Transcript

00:00
The Minswap team have released a bug bounty for their brand new open source stable swap smart contract to be released on their decentralized exchange. Now this all came about from a previous catalyst fund where they put in a proposal to have this all funded as a bug bounty for the community. So if you’re a developer in the Cardano ecosystem, you know how to work through the smart contracts,

00:29
possible vulnerabilities that may come about from this, you can participate in this and earn this somewhere in this $12,000 worth of rewards for this particular bug bounty program. They do have a full article about this on Medium so you can go to it and find out a little bit more about what they’re actually after in regards to the bug bounty. There are eligibility requirements for this so please go through that and make sure you follow their instructions clearly.

00:57
They also have the list of type of vulnerabilities that they are looking for. Anything from theft of user funds, unauthorized minting of protocol NFTs, freezing of funds or on the smart contract, protocol insolvency. And then these ones here are ranked as high. Sandwich attacks, front running of trades, on-chain denial of service, contract failures to deliver promised returns. So a whole bunch of things here that anyone that is working in Aiken, the Aiken smart contract language for Cardano,

01:26
I know a lot of people are working with it at the moment. So if you are and you are a struggling but aspiring developer and want some funds, this might be an opportunity for you. I’ll put all the links to the GitHub repos and this article as well down below in the show notes so that you can get to it and start the process. But what exactly is a stable swap? So it’s a different type of formula used in a trading pair on a decentralized exchange.

01:54
so that users when they’re swapping from one USD asset to another USD asset aren’t affected by slippage or price impact as they would in a regular DEX trading pair. So they use a slightly different formula. So we have the constant product formula function as X times Y equals K and we have the constant sum function of X plus Y equals K.

02:18
And here you can see the stable swap invariant has a very different curve and it’s very close to the constant sum function here. Now you want this type of scenario because you don’t want to be swapping from one USD asset to another and suffer from price impact or slippage. So if you start with one USD you expect to have one USD maybe minus tiny bit of fees off the top, but not one USD and then 80 cents USD afterwards that you could be

02:46
with if you suffer from price impact or slippage in a particular trade. So that is a point of a stable swap invariant and having this smart contract available in the Cardano ecosystem as an open source contract means that other DEXs in the ecosystem can start using that in their DEXs as well. So hopefully we start to see other DEXs in the Cardano ecosystem that are also using Aiken on their platform deploy this

03:12
so that we can see more options and more liquidity for stable swapping between different USD assets. And with stable coins such as USDM coming out in March this year, it is definitely a good thing to have. Now stable swaps do already exist in the Cardano ecosystem and I brought up that Wingrider’s documentation around stable swaps because they did implement it already on their decks. So they did it with Plutarch originally on their decks about.

03:41
maybe this time last year in 2023, but they have Jed, IUSD as well as Dai stable coin on their platform, which will allow you to swap between those different stable coins using their stable swap protocol. So really cool that they already have that implemented on their platform. Now, Teddy swap was supposed to be the platform, the decks where you go to swap your stable coins. And with

04:08
platforms like Dex Hunter being an aggregator on top. You can provide all your liquidity to TeddySwap and then Dex Hunter will just do the trades for you with their routing and all sorts of things that’s coming up. But this post I read this morning from Clark and Clark is a brilliant developer in the Cardano ecosystem. He built the first Dex.

04:31
on Cardano and it was the Hosky Swap. I can’t remember what the name of it was but it allowed you to trade Hosky tokens through his interface. So you know he knows his stuff. He knows what he’s doing off chain and on chain. And he put out this post publicly announcing that he is left as lead off chain developer of Teddy Swap. And it’s really disappointing to hear. Now I do know that Frosty Austin who’s behind a lot of these projects.

04:59
Basically, copies and pastes or the idea is using existing open source contracts to build new protocols out there. And you know, I’m all for that. If you look at other ecosystems, other chains, other blockchains, they have a lot of copy and paste protocols. When Uniswap released their code, you had a plethora of other platforms just copy that and build up their own DEXs, build up their own communities and build up a huge amount of liquidity in DeFi.

05:27
And we hope to see that in the Cardano ecosystem as well. So I was all for that. But reading this thread, how the project was run and everything else around it, that was what was really disappointing to see when reading through this thread. And I won’t go through it in detail here, but please, I’ll put a link down below, read Clark’s rundown of events.

05:53
that has happened over the last year of working on the entire project and related projects as well. There’s a lot of comments from the community. I had massive high hopes for Teddy Swap because they were going for that open source approach and decentralize approach. I’m pretty sure they can still deliver based on who is left in the team and whatnot, but we’ll see how this all goes and how all plays out.

06:22
They do have a space coming up where you can tune in and find out what is happening after this. I’m sure there’s a huge amount of questions in regards to what’s going on, what’s happening, and the future of the various projects that TeddySwap are associated with as well. That’s it for me for this video. Sorry to leave it on such a sour note, but it’s really good to see that Minswap, with their perfect timing here,

06:48
are releasing an open source version of that stable swap smart contract for the Cardano ecosystem and we will hopefully see it on other DEXs really soon as well. Now if you enjoyed this video, if you want to support the channel, I do have some project catalyst proposals out there. The first one is around the Learn Cardano ecosystem where I’ll be building 10 courses around DeFi, around all the different platforms.

07:14
I am looking for writers for that as well. So hopefully we do get some funding. And all of that content will start to translate to different languages. We’re starting with Japanese first to try and hit some of those countries where we do have a lot of ADA holders, but they’re not doing much because of maybe language barriers. So some stuff like this hopefully will entice and encourage users to participate in DeFi and increase that level of adoption.

07:41
My other proposal is around Cardano Press, the plugin for WordPress used to build those mini dApps and community websites that allow you to connect your Cardano wallet, read what’s in there, analyze it, maybe have a particular NFT and those NFTs will unlock access on the website. That’s a primary use case for it, but there’s also ISPO’s, stake pool powered websites, all sorts of different things that CardanoPress can do.

08:08
and we’re looking for funding for security audits around that particular plugin so that anyone that’s using it, there’s over about a hundred active installations of CardanoPress at the moment. So any of those websites that have it installed, this security audit, when they update it, they’ll inherit all of those security upgrades as well. So we’re really hoping that we can get that because we know that that particular update with security improvements.

08:34
roll out to the entire community that is using CardanoPress as well. So I’ll put links to those down below if you want to support the channel. Otherwise just give me a thumbs up, click the subscribe button, click that notification bell and I’ll see you in the next video.

 

Comments

Leave a Reply

[learndash_login login_label=" You must be logged in to post a comment."]