JustSwap - Crypto Academy / S4W5 - Homework Post for @kouba01

in hive-108451 •  3 years ago 

Introduction

Over the last few years, decentralized finance has been shaping the financial world with enhanced human interaction with many of its products, and with no exception, it has benefited the crypto ecosystem. Users in the crypto ecosystem can easily perform any transaction of choice with ease, independently, without the involvement of third parties, all credits to DeFi.

There are numerous products of DeFi, we have Decentralized Exchanges, Lending & Borrowing, and many others. Today, we would be discussing a product of DeFi known as JustSwap, JustSwap falls under the category of decentralized exchanges with numerous features which enhance users' interaction and profitability. Let's get into it.

0001-9362441772_20211005_203831_0000.png
Made in Canva

1. What is JustSwap?

JustSwap is a protocol built on the Tron blockchain, precisely, a decentralized exchange that offers swift swapping of TRC-20 tokens. We see this protocol as a product of DeFi which falls under the category, decentralized exchange, which offers full decentralization of transactions without the involvement of intermediaries.

JustSwap offer users the ease of independently swapping of their TRC-20 tokens from one to another at a price as quoted by the Automated Market Maker (AMM), this model would be discussed more as we proceed in this context. There are more features of this decentralized exchange, let's take a look at a few of them in the subsection below.

Swap

This is a feature of JustSwap that allows users to swap their TRC-20 tokens from one to another. In this case, the transaction would be carried out without the existence of third parties with an attached exchange fee and liquidity providers benefit from the transaction fees.

iMarkup_20211005_082347.jpg
JustSwap Swap's Interface

Liquidity Pool

Liquidity pool is another feature of the JustSwap which allows users to add their assets into the pool to earn from the exchange fee on the protocol. The liquidity in the pool is used by the Automated Market Marker to quote asset prices and the suppliers are known to be liquidity providers.

iMarkup_20211005_082421.jpg
JustSwap Liquidity Pool's Interface

JustSwap Mining (LP)

Another feature to talk about is the JustSwap Mining, and in this case, users can stake their acquired LP tokens. The LP tokens are acquired from the action of adding liquidity and these tokens, can still be staked in the LP mining pool to a certain APY/APR.

iMarkup_20211005_082456.jpg
JustSwap Mining's Interface


Importance of JustSwap within the Tron Ecosystem

JustSwap has been of great importance within the Tron Ecosystem and we would be looking at some of them below.

Decentralized Swapping

JustSwap allows users to swap their TRC-20 tokens with ease without involving third parties with almost instantaneous execution. This type of transaction is smart contract triggered which eliminates the existence of intermediaries, and of course, comes with an exchange fee.

Passive Income Generator

Users are allowed to supply their assets into the liquidity pool and this makes them liquidity providers as the assets are being utilized by the AMM to quote prices and in return, the liquidity providers earn passive income through transaction's exchange fee on the protocol as their reward for providing liquidity.

Fred Br.png

2. Tokens supported for Trading on JustSwap

Generally, JustSwap supports TRC-20 tokens, that is, tokens that are built on the Tron blockchain. Exploring the JustSwap to check for the supported tokens, we have the list at default to be; TRX (Tron), SUN (Sun), BTC (Bitcoin), WBTC (Wrapped Bitcoin), ETH (Ethereum), WETH (Wrapped ETH), WBTT (Wrapped BTT), WTRX (Wrapped TRX), JST (Just), WIN (Wink), DICE (Dice), LIVE (Live), USDT (Tether), TUSD (True Stablecoin), USDJ (Just Stablecoin), LTC (Litecoin) and HT (Huobi Token). Let's see the screenshots below.

iMarkup_20211005_090059.jpg
Tokens supported on JustSwap

iMarkup_20211005_090128.jpg
Tokens supported on JustSwap

iMarkup_20211005_090205.jpg
Tokens supported on JustSwap

The listed tokens above are the ones supported from trading on JustSwap. Notably, we see the likes of WBTC, WETH... these are wrapped tokens which means they belong to another blockchain and they have their price pegged to the normal BTC/ETH, and this enables them to be traded on the Tron network. In addition, all the listed tokens above are only available tokens by default on JustSwap, users can add other TRC-20 tokens and would be able to trade them for another TRC20 token of choice.

How the Price of Token is determined on JustSwap

At a point earlier in this context, I mentioned the Automated Market Maker as a model used to quote tokens' price on JustSwap. Unlike the centralized exchanges that have order books that reveal the bid/ask prices for traders to place orders, there is no order book on JustSwap rather it uses AMM to quote prices of the tokens.

In addition, the AMM utilizes the liquidity available in the pools as provided by the liquidity providers in the quest to quote tokens' prices. The formula used by the model to quote price of tokens is X * Y = K.

From, X * Y = K

X represents the first token,
Y represents the second token, and
K equals a constant value (total liquidity available in the liquidity pool).

Take for instance, in a liquidity pool of USDT and TRX, where X = USDT and Y = TRX, if a certain amount of USDT was bought, this reduces the quantity of USDT in the pool and it comes with the increased price of USDT. Note from the above, the user bought USDT with TRX, as such, there is an increased quantity of TRX in the pool which leads to its reduction in price. And the same thing happens if TRX was bought using the USDT token, the quantity of TRX is reduced accompanied by an increased price.

Basically, the formula keeps the pool balance constant such that the value of the First token is equal to the value of Second token with a resulting constant pool balance (K). The pool balance remains the same as the purchase/sale of one of the pairs balances the pool with an equal value of both tokens to give the resulting constant value and this follows a curve (as the pool balance up). The pool balance remains constant until new liquidity is supplied into the pool.

Fred Br.png

3. How to Connect my Wallet to JustSwap.io

For this section of the task, I will be connecting my TronLink Pro mobile wallet to Justswap.io. Let's see a few steps involved in the list below.

  • I launched my TronLink Pro wallet and from the homepage, I clicked on discover to visit the JustSwap.io dApp.

  • Justswap.io is one of the popular dApp on the wallet, so I clicked on it to visit. See the screenshots below

  • Now, on Justswap's landing page, I clicked on Connect to Wallet, and my wallet was connected successfully. See the screenshots below.

  • The swap interface after a successful connection is shown below.
  • iMarkup_20211005_113159.jpg

    Does JustSwap has a Mobile App?

    JustSwap doesn't have a mobile App like every other mobile app that can be downloaded from the App store, rather the exchange protocol is a dApp (decentralized application) and can be accessed through Tron-based mobile wallets, likewise, the web extension of JustSwap enable users to connect to the dApp as well, a typical example of it is the TronLink Pro wallet. For the process of connecting my wallet to Justswap illustrated earlier, I used the TronLink wallet on my mobile phone to connect with the exchange protocol.

    Fred Br.png

    4. How to Trade on JustSwap- Swapping explained

    In this section, I will be showing how to swap a TRC-20 for the other using JustSwap decentralized exchange. Note that: I will be using the TronLink Pro wallet on my Mobile phone to interact with the protocol. The steps are listed below.

  • Having connected my wallet to JustSwap. On the swap interface, the TRC-20 tokens I will be exchanging are TRX and USDT. I will be swapping TRX for USDT.

  • Now, I have selected TRX as the first token and I clicked on Select token to choose the second token. I selected USDT. See the screenshots below.

  • Now that I have selected the tokens, I inputted the amount. I am swapping 55 TRX which is giving me approximately 5.26 USDT. Then I clicked on Swap and confirmed the swap. See the screenshots below.

  • On the next interface, I finally confirmed the transaction by supplying my password. See the screenshots below.

  • The transaction was successful. Note that: this is a smart contract triggered transaction which consumed some bandwidth and energy.
  • iMarkup_20211005_123424.jpg
    Transaction Success

    A total of 350 bandwidth was consumed from my daily free bandwidth while 33,363 Energy was consumed as 4.63512 TRX was burned to accommodate the energy required for the transaction. The transaction hash is 497c421257434671899310b68727def77cbb472b239c3172d2f5314610896306/.

    iMarkup_20211005_123837.jpg
    Transaction details from Tronscan

    Fred Br.png

    5. How to Add Liquidity on JustSwap

    In this part of the task, we are going to talk about how to add liquidity to the available liquidity pools on JustSwap. I will be using my TronLink Pro mobile wallet to connect to the DEX. Let's see a few steps involved.

  • On the landing page of JustSwap, I switched to pool and clicked on Add Liquidity.

  • Now I have to select pool pair, so I am going for the TRX/USDT pool. Having selected TRX, I clicked Select token to select USDT. See the screenshots below.

  • It's time to input the amount of the tokens I will be supplying. Know that we are to supply our assets 50/50, I entered 5 USDT which is approximately 52.3 TRX making a total of 10 USD. Then, I clicked Supply and confirmed the supply. See the screenshots below.

  • On the next interface, I finally confirmed the transaction by supplying my password and the transaction was successful. See the screenshots below.

  • Let's take a look at my liquidity supplied on the adding liquidity and the 68.922574 S-USDT-TRX LP token acquired from supplying my assets. The acquired LP tokens can be staked on the JustSwap Liquidity Mining to earn more.
  • iMarkup_20211005_132108.jpg
    My Liquidity Supply history

    iMarkup_20211005_132301.jpg
    Acquired LP tokens

    The adding liquidity is also a smart contract triggered transaction and it consumed 383 bandwidth and 60902 energy as 8.52502 TRX was burned to accommodate the required energy for the transaction. The transaction hash is 8744ed3c029ca3f138f1744df40417f21c02b4094f455d7b260373cdb190e7a4/.

    iMarkup_20211005_134306.jpg
    Transaction details from Tronscan

    Fred Br.png

    Conclusion

    In conclusion, JustSwap is one of the products birthed by DeFi into the crypto ecosystem, built on the Tron blockchain, and fully decentralized as there is no involvement of third parties in transactions. This exchange protocol enables users to swap their TRC-20 tokens from one to another and earn passive income by supplying their assets into the liquidity pool as they earn rewards from exchange fees on the DEX.

    In addition, the acquired LP tokens can be used to earn more by staking it in the Liquidity mining pool. Speaking of the Tron blockchain, without a doubt, JustSwap is one of the leading protocols. Thanks to professor @kouba01 for this great lecture.

    Fred Br.png

    Cc:- @kouba01

    Fred Br.png

    Written by;
    @fredquantum

    Authors get paid when people like you upvote their post.
    If you enjoyed what you read here, create your account today and start earning FREE STEEM!
    Sort Order:  

    Hello @fredquantum,
    Thank you for participating in the 5th Week Crypto Course in its 4th season and for your efforts to complete the suggested tasks, you deserve a Total|9/10 rating, according to the following scale:

    OriginalityCompliance with topicConsistency of methodQuality of analysisClarity of structure & language
    (1.75/2)
    (1.75/2)
    (1.75/2)
    (1.75/2)
    (2/2)

    My review :

    Excellent content, in which you succeeded in presenting an organized and useful work. Only one note I want to bring to you is:

    • In your explanation of how JustSwap works, you are asked to prepare an illustration.

    Thanks again for your effort, and we look forward to reading your next work.
    Sincerely,@kouba01

    Thanks, professor.

    Loading...