SundaeSwap Review by Jesse
SundaeSwap is the new decentralized exchange built for the Cardano blockchain. It allows participants of the blockchain to provide liquidity and create a market for others to exchange their native tokens. In return, swappers pay a small fee and liquidity providers earn a return on their deposit.
While the initial product is modeled after the basic protocol popularized by Uniswap, it will eventually include several innovative adaptations for the Cardano blockchain with seamless upgrades to the SundaeSwap protocol. Achieved by validator contracts holding liquidity allowed to be spent by a future version of the protocol. While SundaeSwap had its release date in April of 2021 it took until this week to roll out the Public Beta on January 20th. A perfect time for us to take a look at what’s been going on since last year and what we can expect to see from the protocol in 2022.
As you are well aware of what a DEX is by now there’s no need to go over any basics. Instead, this report will focus more on the fundamental challenges of building an AMM on Cardano and how SundaeSwap and future DEXs built on Cardano will operate differently from DEXs built on Ethereum, Solana, Avalanche, and Polkadot.
Make a quick jump to: How To Use SundaeSwap
SundaeSwap, how it all began
When SundaeSwap first showed up it was meant to begin its journey of building out the initial investments and liquidity bootstrapping on Binance Smart Chain. Things changed relatively early on in the project when the decision to pivot into releasing tokens only on Cardano was made.
Before this, the only option presented to Cardano and “likewise” Polkadot projects were to release tokens on another blockchain and wait for someone to develop an appropriate AVA bridge into Cardano. SundaeSwap decided to forgo this option and launch on Cardano instead.
Initial Swap Offering with SundaeSwap
Another previously mentioned addition was the “Initial Swap Offering” ISO. Due to regulatory restrictions, this feature was put on hold until a clear regulatory landscape has been laid out. When SundaeSwap went into planning the ISO, they knew it was an innovative solution to the problem that many startups in this industry face when accessing capital and involving the average consumer.
While SundaeSwap remains ready to launch the ISO at any time from a technical standpoint, regulatory uncertainty dictates otherwise. By September 2021 and after months of testing with smaller groups, the Cardano public test net was upgraded to support smart contracts. The surge of activity that followed included many dApp tests and experiments, with developers eager to perform large-scale tests and show off their hard work. This created a ferocious discussion around some of the design decisions behind Cardano as you may remember hearing about late last year.
Many critics used this discussion as an opportunity to point at Cardano’s flaws in a more public manner. Some misconceptions began floating around suggesting that Cardano only supports one transaction per block, only one user can interact with a smart contract at a time, and that Cardano is ultimately destined for centralization.
There are some truths, as the model being used fundamentally requires a sacrifice of determinism, and thus demands greater trust from a user. Because the state of the blockchain could change between when you construct your transaction and when you submit it, on Cardano the smart contract needs to be trusted to do “what’s in your best interest” when it runs, even if that isn’t what you intended. Like a DEX needing to know if the price has moved by a certain large percentage and you are no longer interested in the trade.
eUTXO: Extended Unsepnt Transaction Outputs
Cardano is considered a 3rd Generation blockchain and there’s one function that separates it from other chains in regards to how smart contracts operate with Cardano. The accounting model and virtual machine of Cardano are dramatically different from those on other smart-contract enabled blockchains. Tokens are tracked as bundles of unspent outputs from previous transactions and can be locked with a validation script that determines under what conditions they can be spent. This novel accounting and execution model is known as “Extended Unspent Transaction Outputs”.
This eUTXO model implements smart contracts more passively than an explicit function call, and heavily discourages the use of global states. In your standard UTXO model, money is tracked as a chain of custody, by pointing at a specific (unspent) output from a previous transaction, which then gets consumed as the input to a new transaction. Very simple scripts can be attached and evaluated to determine if the output is allowed to be spent.
The model used in Cardano extends this to add arbitrary datum and scripts have access to all transaction data instead of just what is necessary for block validation. What this means for SundaeSwap is that a global “SundaeSwap Pool” unique token can be locked via script allowing the creation of a specific “Asset Pair Liquidity Pool” unique token.
The global token is used in conjunction with a minting policy to ensure that asset pairs stay unique, rather than diluting the available liquidity and suffering from poor slippage.
Then, these unique tokens become locked in an eUTXO alongside the liquidity stored in the pool. While using a validator script to enforce the constraints of the entire pool.
While the one transaction at a time poses problems previously pointed out. This means that front-running and other harmful attacks we’re used to seeing on most DEXs can be immediately detected and mitigated before serious harm can be done to the liquidity pool.
Transactions in Cardano
Transactions in Cardano are partially ordered by their dependencies, and a stake pool operator reordering things has no impact on the outcome, so MEV disappears. For many purposes and protocols, this is entirely sufficient to build an incredible amount of value. A vesting contract, for example, does not need access to any global state. Some protocols are much harder to divorce from their global state. A DEX like Uniswap, for example, fundamentally relies on pooling liquidity for capital efficiency and creating a single unified view of the exchange rate between two tokens.
The problem occurs on Cardano when too many people need to access this global state, and that state is stored in the datum of a single UTXO creating a race among users to be the first to spend that UTXO. Each time someone wins that race, it resets everyone else back to square one where you’ll then have to find the new UTXO, construct a new transaction, and submit it.
Despite this, Cardano allows many hundreds of transactions per block but only allows a given transaction output to be spent a single time, by a single transaction, so protocols that give many people access to the same UTXO might face contention issues.
The one-user one-contract at a time idea comes from our experiences with Ethereum and “calling” a contract to do something. But on Cardano, you lock outputs with a contract that determines when they can later be spent. One way of approaching a solution would be to allow batching of transactions and minimal swap executions. But this would ultimately make the protocol susceptible to denial of service attacks.
Scooper Model/AMM Orderbook
To mitigate some of the restrictions on Cardano SundaeSwap has developed the Scooper Model/AMM Orderbook. Like a pure order book, market participants can place good-until-canceled orders onto the blockchain. These don’t need interacting with any pre-existing entities, and so don’t suffer from the UTXO contention problems in other protocol designs.
Using a programmable API, these orders can be tailored to the market participant’s desires. But, unlike a pure order book, the liquidity pool can rely on the orderly and efficient execution of swaps enabled by the automated market maker. A scooper builds and submits a transaction that executes many swaps against the automated market maker, and in return, collects a small ADA fee. Since these “Scoopers” have tremendous power over the protocol, trust is a key factor to the entire operation. With the goal of acquiring a select group of cohorts known as Stake Pool Operators. After a total of 1.6 billion ADA was collected from over 40 entities. It resulted in one of the first and largest acts of on-chain governance on Cardano outside of Project Catalyst.
Delayed for a few days after the initial launch on January 20th Yield farming for SUNDAE tokens began. With 2 Billion SUNDAE tokens to be minted at the start of the DEX and available slowly over a period of time as the protocol matures.
Of the 2 Billion Total Supply 55% will go directly to the Public, 25% for the Team, 13% for Early Investors, 5% for future hires (Team), and 2% for Advisors. With 5% of the total token supply being distributed through the ISO, users will also be able to earn additional SUNDAE as rewards from providing liquidity to specific XX/SUNDAE pairs at launch.
Team, Investor, and Advisor tokens that have been allocated are vested on a 4 year (team) or 2 years (investors/advisors) schedule with an agreed selling schedule on top of the vesting schedule.
Projects were allowed to create pools beginning Tuesday, January 18th as one of the only two ways to get SUNDAE. Either by participation in the ISO available during Cardano Epoch 316 through 320, or Yield farming beginning January 2022 through June 2022 in the SUNDAE/ADA, LQ/ADA, WMT/ADA, or CARDS/ADA pool. A third option was available right up until the zero-hour where any user who made a swap on the protocol would be rewarded with SUNDAE tokens. Dubbed the “taste test” this was dropped due to the contracts not being included in the previous audit and the decision to instead allow a SUNDAE-ADA pair to exist at launch.
The dates for participation in each ISO are as follows; Round 1: January 25th, Round 2: January 30th, Round 3: February 4th, Round 4: February 9th, and Round 5: February 14th.
As long as you are delegated to an official ISO Scooper (list here) before the snapshot is taken, your rewards will be calculated for the epoch you staked in.
SundaeSwap has no shortage of passionate individuals behind it. With CEO Mateen Motavaf, COO Artem Wright, CTO Matt Ho, CIO Pi Lanningham, and Frontend Engineers Miklós Süveges, Mark Hansen, and Andi Kratzel. Early funding for the project came only from Double Peak, Alameda Research, and cFund.
The impact for SUNDAE has been minimal since tokens have started rolling out the last couple days. The team announced they’re still working on the API in Discord so there’s no information available outside of the exchange at this time. So we don’t have a clear view of Market Cap, Circulating Supply, or any of those metrics. But, after following the token natively on SundaeSwap over the week its price has remained within a 10% margin of 1:1 with ADA. Currently, 1 SUNDAE is equal to 0.87 ADA.
Liquidity has remained very low with the entire DEX operating off less than 25 Million ADA in total liquidity. Though native integration with the most used Cardano wallet Daedelus was supposed to be available. But, the project wasn’t able to manage a direct integration. Those users will need to import their wallets using CCVault.io. Or use the only other available integration on the platform Nami Wallet. The protocol has gathered a large following since 2021 with almost 300k followers on Twitter, 110k in Discord, and 60k on Telegram. Some work is visible in the public Github but far less than expected for almost a year now.
Unfortunately for SundaeSwap, it’s been a rollercoaster ride since day one for the project and its Team. With equal parts situations out of their control as those within. It’s culminated in Charles himself calling into question how little community trust SundaeSwap is deserving of. The recent load congestion on Cardano reached an all-time high of 92.8% capacity caused by SundaeSwap and already putting them in a very unfriendly light causing the entire Cardano ecosystem to look bad. This doesn’t completely rely only on SundaeSwap, as during previously closed testnets none of these issues came up. Not for lack of trying the Team at SundaeSwap discussed dozens of options for operation over the last year before settling on the current iteration that heavily leverages AWS with tooling that has been optimized for AWS.
To make matters worse, what can only be described as a “verbal good faith agreement” between CardStarter and SundaeSwap fell through. A rather public display of poo throwing commenced between the two projects. With heavy blame lying on SundaeSwap for renegotiating the deal last minute after CSWAP holders already locked in $15 Million during the ISO for the rights to 150 Million tokens, renegotiated down to 10 Million SUNDAE tokens. Yikes! Can’t say I wouldn’t feel the same if I were in Cardstarters shoes. While SundaeSwap has publicly addressed the issue, CardStarter has responded by saying it will continue to fight for the previously promised amount. SundaeSwap sights CardStarter’s lack of available liquidity as the reason for lowering their reward.
Since its release users are citing many issues with the protocol and in some cases had to cancel transactions due to hangups in the protocol’s execution. Those who have allowed their transactions to process can wait upwards of 76hrs before transaction finality is reached. For a system that was supposed to have supreme pool security. Reports are coming in that fake tokens have been making their way into circulation on SundaeSwap already as well. Aside from the usual fake SUNDAE token sellers that every project launching has to deal with.
Being the first to break ground in the Cardano DEX space has proven to be a worthy challenge. Aside from just the technical limitations, this is an entirely new experience for Cardano users. In fact, I’d argue that it’s the first real use case for Cardano. Aside from simply staking ADA, the token hasn’t served much of any other purpose to its holders when compared to Polkadot, Ethereum, Avalanche, and Solana ecosystems. With anything new, you’re bound to run into problems that eventually become learning experiences. SundaeSwap is doing just that despite everything that is happening with the protocol. I identify honest effort and I see a good bit of it behind the protocol. Whether sheer determination is enough to build the operational DEX Cardano needs, is yet to be seen.
Until next time, remember that the only guarantee is BTC. So keep stacking that Satoshi.