By Keefer Taylor, Luke Youngblood and Ryan Sears
Just over a two weeks ago we announced Kolibri, a new algorithmic stable coin for Tezos. Since our testnet launch, we’ve seen over 140 ovens created and over 700,000 (testnet) XTZ locked in them, backing nearly 250K of kUSD. DeFi is booming on Delphinet!
We’re also incredibly grateful to our community of users and testers who helped us ferret out and fix quite a few bugs in our front end. Thanks to all folks who joined our discord server and suggested new features and have diligently reported and reproduced bugs with us — you keep us going. If you’re still experiencing bugs, or just want to hang out with the core team (and send us your best memes), we’d love to meet you over on our Discord server.
We’re also incredibly grateful to the MadFish Solutions team, who helped us launch kUSD support natively in Thanos Wallet. Users of kUSD no longer have to configure the token in the wallet; kUSD balances will simply auto populate when the wallet has a balance. They also turned around a testnet integration to Quipuswap, so we can play with DeFi end to end.
Thanks also to the CamlCase team, for launching a testnet version of Dexter, and working with us to integrate Kolibri.
As we march towards a mainnet release, the holders of over a quarter million dollars of kUSD might be wondering what you can actually do with it. This week, we’d like to show off decentralized exchange integrations for kUSD.
What is a Decentralized Exchange Anyway?
Decentralized exchanges (“DEXes”) allow users to swap tokens and the base layer asset of a network (XTZ, in Tezos’ case) for each other with no counter party risk and with swaps secured on the blockchain.
Decentralized exchanges work by creating a pool of assets that are available to swap. The exchange rate of assets for each other is determined by the ratio of assets in the pool. Assets in pools are provided by users, called “Liquidity Providers”, who loan their assets to the pool in return for a portion of fees from trades.
Why Do DEXes Matter to DeFi?
DeFi, or “Decentralized Finance”, describes a category of financial products which provide traditional finance infrastructure, but in a trustless and decentralized manner.
DEXes are useful because they provide yet another building-block in the DeFi ecosystem, and they can help facilitate price finding for assets in real time. This is especially useful for future products (like insurance products or index funds) which can consume this market data to enable new products.
This also all feeds into a healthy global economic system . When assets become mispriced in a pool, an arbitrage opportunity is presented for users to buy assets in the pool for less than they are worth and sell them elsewhere. We see this today across both centralized and decentralized exchanges.
This dynamic makes DEXes a fairly reliable price indicator for assets (as long as there is sufficient liquidity). It also makes DEXes a readily available market for all participants in the marketplace, which allows for price discovery and arbitraging, without any middle men. They also provide an off ramp for assets acquired in other DeFi applications to either XTZ or another currency.
DEXes on Tezos
Tezos has two DEXes that are currently live on Delphinet.
1) Dexter, built by the CamlCase Team
2) Quipuswap, built by the Madfish Team
Both teams have been working to help support kUSD trading on Delphinet. We encourage holders and testers of kUSD to familiarize themselves with how these DEXes work so that the Tezos community can create viable markets for kUSD at launch, and there’s a healthy amount of liquidity in these markets.
To help users get started, we’ll show a brief tutorial to swap kUSD for XTZ. Then we’ll show how users can provide liquidity to kUSD pools on DEXes. If you get stuck, feel free to drop by the Kolibri Discord for help.
Swapping
Swapping tokens exchanges one asset (kUSD) for the chain’s base asset (XTZ). Here’s how you do it:
Dexter
To trade kUSD for XTZ on Dexter, navigate to the Delphinet deployment of Dexter.
- Connect your wallet by selecting the button in the upper left hand corner and authorizing your wallet
- In the large exchange window, select the drop down menu and find kUSD
- Select the amount of kUSD you’d like to swap for XTZ. Note that the UI will update to show you both the price and slippage for your trade
- Hit the ‘Exchange kUSD for XTZ’ button and authorize the transaction with your wallet to make your trade
Quipuswap
Navigate to Quipuswap’s interface.
- Be sure that ‘Delphinet’ is selected in the drop down menu in the top left corner.
- Connect your wallet by pressing the ‘Connect Wallet’ button in the top right corner
- In the ‘Output’ box, select the drop down menu titled ‘Select a token’ and select KUSD
- Select the amount of kUSD you’d like to swap for XTZ. Note that the UI will update to show you both the price of your trade.
- Hit the ‘Swap’ button and authorize the transaction with your wallet to make your trade
Becoming a Liquidity Provider
Note: Liquidity providers take on the risk of impermanent loss. Testnet funds have no value, but please understand the risks of becoming a liquidity provider on networks where assets have real value. Binance Academy has a good article explaining impermanent loss.
Providing liquidity to an exchange consists of depositing a proportional amount of kUSD and XTZ to allow other users to swap (vs early ethereum DEXes where you only had to provide one asset), in exchange for a portion of the exchanges fees. Here’s how it works:
Dexter
To trade kUSD for XTZ on Dexter, navigate to the Delphinet deployment of Dexter.
- Connect your wallet by selecting the button in the upper left hand corner and authorizing your wallet
- Click on the ‘Liquidity Pool’ tab.
- Select kUSD in the token drop down
- Enter the number of kUSD and XTZ tokens you would like to provide to the pool
- Hit the ‘Add Liquidity’ button to authorize the transaction with your wallet and add liquidity
To retrieve your tokens, select the ‘Remove Liquidity’ tab and repeat the process in reverse.
Quipuswap
Navigate to Quipuswap’s interface.
- Be sure that ‘Delphinet’ is selected in the drop down menu in the top left corner.
- Connect your wallet by pressing the ‘Connect Wallet’ button in the top right corner
- Click on the ‘Invest’ tab
- Under ‘Token Deposit’, select the dropdown titled ‘Select a Token’ and select kUSD
- Enter the number of kUSD and XTZ tokens you would like to provide to the pool
- Hit the ‘Add Liquidity’ button to authorize the transaction with your wallet and add liquidity.
To retrieve your tokens, select the ‘Remove Liquidity’ tab and repeat the process in reverse.
A Call to Action
Tezos has a robust testnet that is not widely used. We hope that this demo of DeFi integrations on Tezos changes that culture, and we’d like to encourage other teams in the Tezos ecosystem to do public betas of their products on testnets prior to launching on mainnet. This approach has a few advantages:
1) It allows for large scale testing, user feedback and open discussion about what is being built
Kolibri has benefited greatly from user feedback and user reported bugs, as well as a strong community within the Tezos ecosystem. Users ended up using our frontend in ways which we didn’t expect and we’ve built a better product because of it. We want to try to encourage that across the entire ecosystem where possible, and we’re open to ideas on how best to do that!
2) It provides an integration surface for other apps
One of the most powerful parts of smart contracts is their compose-ability. Anyone can choose to integrate another smart contract in their app. People can go build an entirely different UI than what we’ve built if they wanted to, at the end of the day we’re just reading values from smart contracts. Providing an early tech preview provides other builders an integration surface and inspires developers to create the next wave of DeFi products on Tezos.
3) It provides a playground for users to interact with protocols and applications in order to better understand them before they are used with actual value.
DeFi is a new and exciting space, but it is also scary and unfamiliar to many users. A testnet deployment allows users to interact with your products without paying fees or losing real money. Think of it like paper trading — this allows users to better understand how a product works, the risks in using a product, and ultimately leads to less surprises once people start interacting with mainnet.
Our team maintains both Kolibri and Harbinger Oracles for Tezos’ testnets. We’re huge fans of these other teams which provide testnet deployments of their products:
- CamlCase: Dexter
- Madfish: Quipuswap
- StakerDAO: Wrapped XTZ
If your team maintains a testnet deployment of something relevant and you’d like to be listed in future articles, swing by our Discord channel to let us know about it, we love meeting other people in the space working on neat stuff!
We suspect there are many other teams building really cool apps and protocols on Tezos — we’d love to see them!