SundaeSwap
SundaeSwap is the first decentralised exchange (DEX) built on the Cardano blockchain. SundaeSwap cryptocurrency exchange is a decentralized exchange
Last updated
SundaeSwap is the first decentralised exchange (DEX) built on the Cardano blockchain. SundaeSwap cryptocurrency exchange is a decentralized exchange
Last updated
SundaeSwap is the first decentralised exchange (DEX) built on the Cardano blockchain. If you are familiar with UniSwap or other DEXs then it is quite similar. If not, I recommend taking a few minutes to read my other article here. That article will discuss DEXs in general; why they exist and how they work. In this article, I will discuss SundaeSwap’s implementation and how it is planning to distribute its token; $SUNDAE.
Implementation
SundaeSwap aims to be the UniSwap of the Cardano Network¹ and will implement the same constant product pool AMM algorithm²: x * y = k
While the end product and user experience will be very similar, the implementation of this new DEX is quite different. This is because of Cardano’s different accounting model. Unlike Ethereum’s accounting model, Cardano uses eUTXO; an extended implementation of the “unspent transaction output” model from Bitcoin’s network. In this model, custody of assets on the blockchain are tracked as unspent outputs of transactions. These unspent outputs are consumed as inputs into new transactions, which produce more unspent outputs³.
Because of Cardano’s accounting model, implementation of the constant product pool model involves a few modifications from UniSwap’s Ethereum implementation. SundaeSwap has four types of tokens:
$SUNDAE Token
This is the governance token for the protocol.
Global Pool Factory Token
A unique token that will allow the creation of the Asset Pair LP Token and liquidity pools.
Asset Pair LP Tokens
These tokens are locked in a script with the liquidity for that pool.
Tracking Tokens
These tokens are given to liquidity providers to track the portion of the liquidity pool they are entitled to.
Within the protocol, there are four types of transactions that can be executed:
Create a liquidity pool
Swap tokens
Deposit liquidity
Withdraw liquidity
I will now briefly discuss each of these transactions and how they are implemented in the eUTXO model.
This transaction takes four inputs:
SundaeSwap factory token
Partner Oracle for initial price
Asset A
Asset B
And has four outputs:
SundaeSwap factory token
Partner Oracle for initial price
Asset A, Asset B, Pair token
One tracking token