ThunderCore’s DeFi 101: How to earn transaction fees on TTSwap as a liquidity provider?
Tags: Thunder Research, Decentralized Exchange, Usdt, Cryptocurrency, Defi

ThunderCore’s DeFi 101: How to earn transaction fees on TTSwap as a liquidity provider? ThunderCore Follow Aug 31 · 6 min read

Author: ThunderCore Research

For background knowledge, check out ThunderCore’s DeFi Landscape and Future Vision which gives an overview. And the previous post which introduced TTSwap. In this week’s post, we will talk about how to potentially make money on TTSwap as an LP(short for Liquidity Provider) by earning transaction fees?

What is TTSwap and what’s so special about DEXes like TTSwap?

In the last post, we mentioned that TTSwap as a Decentralized Exchange(DEX) allows users to easily swap between tokens in a fully decentralized and non-custodial way. Meanwhile, LPs(liquidity providers) could earn a passive income from transaction fees based on the proportion of their contribution to the liquidity pool. Let’s break down what these key properties mean:

Fully decentralized: Unlike when using traditional centralized exchanges, you don’t have to go through the KYC process to use the TTSwap, and the exchange is not controlled by central authorities like a company. Instead, the TTSwap Decentralized Exchange is essentially a group of smart contracts that lives on the ThunderCore blockchain. Non-custodial: When you use TTSwap, you don’t have to send your tokens to an exchange wallet address and rely on the exchange to be honest and credit your account accordingly. Since the entire process happens on-chain, you have full control over your assets and everything is done in your own wallet(e.g. ThunderCore Hub). Permissionless: Any TT20 token can be listed on TTSwap — no permission required. Each token is its own smart contract and has its own liquidity pool–if one doesn’t exist, it can be created easily(a liquidity pool is also a smart contract). Once the smart contracts have been created, anyone can trade the token or become a liquidity provider who contributes to the liquidity pool while earning a liquidity provider fee of 0.3%. To contribute to a liquidity pool, you need an equal value of TT and TT20 tokens(such as TT-USDT).

How Can I Provide Liquidity on TTSwap? What does Liquidity provision mean?

By the end of the previous post, we have exchanged some tokens: we now have ~500TT and 3.0928 TT-USDT to begin with. Let’s say I want to provide liquidity for the TT <-> TT-USDT trading pair, the first step is to choose the “Pool” option. In the dropdown, select “Add Liquidity”

3. Now I will provide an equal dollar amount of TT and TT-USDT. In this example, I’m providing 100TT and 0.6203USD (notice that 100TT is roughly equal to 0.6203USD at the time of writing)

4. Notice the “Unlock” button: when you click “Unlock”, there will be a prompt that asks for your approval to spend your tokens, it will generally cost a very small amount of gas so it may display 0 TT in the amount section. As a general reminder, always keep a small amount of TT in your wallet for withdrawals since every transaction on the Blockchain costs a small amount of fee.

5. Once the unlock transaction is confirmed, the Unlock button is gone and you can click on “Advanced Details” to see the summary of what you are about to provide to the liquidity pool.

6. Let’s breakdown what this means in more detail:

7. “You are adding 100TT and at most 0.6327 TT-USDT into the liquidity pool”: we are providing two assets to the liquidity pool at the same time, hence facilitating others to trade on this TT <-> TT-USDT trading pair.

8. “You will mint 116.8249 liquidity tokens”: For new users, this is something new. What this means is that in return for you providing the 100TT and the 0.6327 TT-USDT, the liquidity pool smart contract will give you 116.8249 liquidity provider tokens as a representation of your contribution to the pool. Intuitively, you can think of this as you now have 116.8249 shares of the entire liquidity pool. The natural question to ask is, then how much are these 116.8249 new liquidity provider tokens worth? Keep reading and you will know the answer in step 10.

9. “Current total supply of liquidity tokens is 11993708.7265”: This shows you the total amount of liquidity tokens right now. When users like you come and provide liquidity to this trading pair, new liquidity tokens get minted and the number would increase. You can also know how much percentage of the entire pool do you own. (116.8249/11993708.7265 which is around 0.0009%)

10. “At current exchange rate, each pool token is worth 0.8559 TT and 0.0052 TT-USDT”: This tells you that each of your newly minted LP token (i.e. the liquidity provider token, or pool token) is worth a certain amount of TT and a certain amount of TT-USDT.

Notice that how much each LP token is worth fluctuates over time, hence the risk. However, the reward is that owning the LP tokens entitles you to earn your share of the transaction fees on every swap between TT and TT-USDT happening on TTSwap.

Specifically, in the current implementation, every transaction charges a 0.3% fee. And since you own 0.0009% of the liquidity pool for the TT <->TT-USDT trading pair, you are earning 0.0009% of the transaction fees on every transaction. We can see that the more swaps happen on TTSwap, the larger the swap amounts are, and the longer you provide liquidity, the more you will make from transaction fees.

Once you fully understand what liquidity provision means and the risk/return associated, you may click on the “Add Liquidity” button and approve the transaction.

Quick Recap on the Liquidity Provision Transaction

What just happened? If you check the block explorer for more details, you can see that 3 things happened in the transaction which you provided liquidity.

The “OUT” at the top: you sent 100 TT to the liquidity pool smart contract The “OUT” in the middle: you sent 0.62 TT-USDT to the liquidity pool smart contract The “IN” at the bottom: in return for providing liquidity, you’ve received 116.825 Liquidity Provider Tokens.

And you can see your updated balances of the 3 tokens at the top.

Risks and rewards go hand-in-hand

In summary, you can make money on TTSwap by being an LP(Liquidity Provider). LPs by holding their Liquidity Provider tokens(aka liquidity token/pool token) earn transaction fees from every transaction that happens on that trading pair. Essentially, you own a piece of the exchange business, this is revolutionary because traditionally if you want to run an exchange and earn transaction fees, that usually requires a large amount of capital upfront. Now with the ThunderCore Blockchain and TTSwap, you can do that with even just the changes in your wallet! This is the kind of real benefits that ThunderCore Blockchain brings to the masses.

All trades come with potential risks, make sure you fully understand them and do your own research. Liquidity providers could potentially suffer losses when they withdraw in unfavourable market conditions(dubbed “impermanent loss”).

How do I Withdraw Liquidity?

When you withdraw liquidity, you are returning those LP tokens in exchange for TT and TT-USDT at the market exchange rate, plus the transaction fees you’ve earnt during the period of you being a Liquidity Provider.

What’s next?

We are only scratching the surface of ThunderCore’s DeFi Universe. We will be keep introducing new DeFi products so follow us and stay tuned!

[ Website] Thundercore.com

[ Telegram ]

T.me/thundercore_china

T.me/thunder_official

[ Reddit ] Reddit.com/r/thunder_official/

[ Medium ] Medium.com/thundercore

[ Twitter ] Twitter.com/ThunderProtocol

[ Linkedin ] Linkedin.com/company/thundercore