Crypto Academy Week 13 | Homework Post for @sapwood | Bandwidth & Energy (Tron) by @abu78

in hive-108451 •  3 years ago 

Introduction

Greetings to all steemians on this great platform, I am indeed much excited to be here to write to submit my homework post assigned by our own professor @sapwood. One would notice that this week's lecture is indeed a very significant one if you had done the previous week's homework task. All our TRX were going wasted for TRX fees which we knew not, but today I can boldly control the fees provided by TRX.

Before I commence with this week's task, I would like to use this great opportunity to say a very thank you to prof @sapwood for giving us such a wonderful and beneficial lecture.


image.png
source


yrllo.jfif

1.How do I connect my TronLink Wallet to Tronscan.org?(Screenshots needed)


How to Connect my TronLink Wallet to Tronscan


The following steps indicate the procedure on how I connect my TronLink Wallet to tronscan.org

  1. Click and open the TronLink wallet and then click on the Dapp Icon.
  2. Scroll down and look for Tronscan and then click on it
    3.It automatically sends transactions to tronscan and this connects your Tron wallet directly to the tronscan website.
  3. Check to confirm whether your wallet is successfully connected.
  4. It can be seen that my wallet has been successfully connected with an amount of 116.853 TRX and 5000 Bandwidth /0 Energy.

Screenshot_2.png


yrllo.jfif

Screenshot_3.png


yrllo.jfif

Screenshot_4.png
Successfully connected


yrllo.jfif

(2) How do I freeze TRX to obtain Bandwidth? (Screenshots needed)

How to freeze TRX to obtain Bandwidth


  1. Open https://tronscan.org/ link
  2. From the homepage interface click on the wallet address from the right top corner of the interface.
  3. Go to resources and click on "obtain"
  4. From the obtain options, select Tron Power and Bandwidth
  5. Enter the amount of TRX to use (10 TRX)
  6. Check the small box and click on freeze to proceed the transaction
  7. Click on Accept to confirm the transaction
  8. I obtained 15 Bandwidth with the 10 TRX I used.

Screenshot_13.png


yrllo.jfif

Screenshot_14.png


yrllo.jfif

Screenshot_15.png


yrllo.jfif

Screenshot_16.png


yrllo.jfif

Screenshot_17.png


yrllo.jfif

Screenshot_18.png


yrllo.jfif

Screenshot_19.png
I obtained 15 Bandwith with 10TRX


yrllo.jfif

3.How do I freeze TRX to obtain Energy? (Screenshots needed)

How to freeze TRX to obtain Energy


  1. Open https://tronscan.org/ link
  2. From the homepage interface click on the wallet address from the right top corner of the interface.
  3. Go to resources and click on "obtain"
  4. From the obtain options, select Tron Power and Energy
  5. Enter the amount of TRX to use (10 TRX)
  6. Check the small box and click on freeze to proceed the transaction
  7. Click on Accept to confirm the transaction
  8. I obtained 299 energy with the 10 TRX I used.

Screenshot_6.png


yrllo.jfif

Screenshot_7.png


yrllo.jfif

Screenshot_8.png


yrllo.jfif

Screenshot_9.png


yrllo.jfif

Screenshot_10.png


yrllo.jfif

Screenshot_11.png


yrllo.jfif

Screenshot_12.png
I obtained 299 energy with the 10 TRX


yrllo.jfif

(4) What types of transaction consumes Bandwidth only and what types of transaction consume both Bandwidth & Energy? Example of both types of your own wallet? (Screenshots needed)


Types of transactions and their types of consumption with examples


From the lecture taught by our noble professor @sapwood, we saw that the type of transaction that consumes Bandwidth only is ordinary Transfer transactions on the Tron blockchain whilst that which consumes both Bandwidth and Energy is transactions that involve Smart Contract Trigger.

Example of a Transaction that consumes Bandwidth only

One has to search for Tron wallet history in order to show this type of fee, the following illustrations would guide us to this.

  1. Open https://tronscan.org/ website and click on Transfers
  2. Click or select TRX and TRC10 since they are ordinary transfers that consume only Bandwidth.
  3. You then choose and click on one of the available transactions to view the Bandwidth consumed

yrllo.jfif

Screenshot_20.png


yrllo.jfif

Screenshot_21.png
300 TRX used


yrllo.jfif

image.png
269 Bandwidth consumed for the transaction


yrllo.jfif

Now, let's have a look at an example of a transaction that consumes both Bandwidth and Energy from my wallet.


  1. Open https://tronscan.org/ website and click on Transfers
  2. Click or select TRC20 and TRC721 since they are Smart contract trigger transactions.
  3. You then choose and click on one of the available transactions to view the Bandwidth consumed

yrllo.jfif

Screenshot_20.png


yrllo.jfif

Screenshot_22.png


yrllo.jfif

image.png


yrllo.jfif

image.png


yrllo.jfif

image.png
345 Bandwidth is consumed plus 29,631 Energy consumed for the transaction


yrllo.jfif

(5) How do I check "how much Bandwidth and Energy are consumed in a particular transaction"?(Screenshots needed)

How to check the amount of Bandwidth and Energy consumed for a particular transaction


To do this the following procedures are followed;

  1. Search and navigate the https://tronscan.org/ website.
  2. I would be using my own account so I search with my TronLink wallet address from the search address bar.
  3. Click on the search icon and go to transfers
  4. Click and select the TRC20&TRC721 transfers, I am choosing this because I want to check for both bandwidth and energy consumption for a particular transaction
  5. I then choose one transaction and click to open.
  6. We can see that 284 Bandwidth and 80,377 energy were consumed for 50 TRX transaction made in supplying 4998.42372653 JTRX tokens.

image.png


yrllo.jfif

image.png


yrllo.jfif

image.png


yrllo.jfif

image.png


yrllo.jfif

image.png


yrllo.jfif

(6) How do I avoid burning TRX to accommodate the Energy required for a transaction?

How to avoid burning TRX to accommodate energy for a Transaction


One can avoid burning TRX to accommodate energy that is needed for transactions by freezing the TRX assets to obtain energy. When TRX transactions that involve energy consumption are issued, some amount of energy would be needed to burn the TRX and when this energy is scarce then it will then burn some of your TRX to complete the transaction.

How to calculate the energy Obtained


This can be done by using the formula provided by our professor in his lecture,

Energy obtained = (The TRX frozen for gaining Energy / the total TRX frozen for gaining Energy in the entire network) X Total_energy_limit).

This can be calculated also by using the https://tronstation.io/calculator/ .

Include the real example of your interaction with JustLend & Justswap? Indicate how a "swap"(in Justswap) function consumes different "Energy & Bandwidth" than a "borrow" function(in JustLend)? You can trade a small amount(as little as 1 USDT)? (Screenshots needed)


How to do Swap transaction using JustSwap


  1. Click on my TronLink wallet and click on DApp
  2. Select and click on JustSwap from the list to open
  3. Enter the amount of TRX to swap (1 TRX) and select the token you wish to swap to.
  4. Click on Swap and then click on confirm swap
  5. Click on accept to complete the transaction
  6. Click on close

yrllo.jfif

image.png


yrllo.jfif

image.png


yrllo.jfif

image.png


yrllo.jfif

image.png


yrllo.jfif

image.png


yrllo.jfif

I swapped 1TRX to acquire 0.003954358722834893 SUN tokens

Note: Because I have already had interaction with JustLend previously, I won't go deep into it here, but would track the transactions history.
I would be using my previous homework screenshots for this on how to borrow an asset using JustLend.

How to borrow an Asset using the JustLend platform

After collateralizing my supply asset, I would now borrow USDJ tokens
Go to USDJ tokens on the Markets and click on "Borrow"
Enter the amount of USDJ to borrow, say 1USDJ
Click on Borrow
Accept the transaction to confirm the transaction


yrllo.jfif

image.png


yrllo.jfif

image.png


yrllo.jfif

image.png


yrllo.jfif

image.png


yrllo.jfif

how to check the consumption of bandwidth&energy for JustSwap transactions made.

  1. Search and navigate the https://tronscan.org/ website.
  2. I would be using my own account so I search with my TronLink wallet address from the search address bar.
  3. Click on the search icon and go to transfers
  4. Click and select the TRC20&TRC721 transfers, I am choosing this because I wanted to check for both bandwidth and energy consumption for a particular transaction
  5. I then choose one transaction that involves JustSwap and click to open.

image.png


yrllo.jfif

image.png


yrllo.jfif

image.png


yrllo.jfif

Screenshot_5.png


yrllo.jfif

Screenshot_2.png


yrllo.jfif

Observations;

  1. 349 Bandwidth consumed
  2. 46,677 energy consumed for the transaction

How to check the consumption of bandwidth&energy for JustLend transactions made.

  1. Search and navigate the https://tronscan.org/ website.
  2. I would be using my own account so I search with my TronLink wallet address from the search address bar.
  3. Click on the search icon and go to transfers
  4. Click and select the TRC20&TRC721 transfers, I am choosing this because I wanted to check for both bandwidth and energy consumption for a particular transaction
  5. I then choose one transaction that involves JustLend and click to open.

yrllo.jfif

image.png


yrllo.jfif

image.png


yrllo.jfif

Screenshot_4.png


yrllo.jfif

Screenshot_3.png


yrllo.jfif

Observations

  1. 313 Bandwidth was consumed for this transaction
  2. 202,165 Energy was consumed for this transaction

Analysis from the two transactions above.


ResourcesBorrow (borrow)JustSwap
Quantity0 TRX1 TRX
Bandwidth313349
Energy202,16546,677
TRX burnt to accommodate energy28.3031 TRX6.53478 TRX

From the above table, we can observe that the energy consumed in JusLend borrow is far higher than that of the JustSwap energy consumed.
Also, the bandwidth consumed in JustSwap is also a bit higher than that consumed in JustLend.

(8) Explore Tronscan(check your own wallet) to identify an "ordinary transfer" & a "Smart-contract-operated transfer"? Indicate the difference between the two?

How to identify an ordinary transfer on Tronscan using my own Wallet.

  1. Search and navigate the https://tronscan.org/ website.
  2. I would be using my own account so I search with my TronLink wallet address from the search address bar.
  3. Click on the search icon and go to transfers
  4. Click and select the "TRX&TRC10 transfers"
  5. Choose any transaction available to explore

yrllo.jfif

image.png


yrllo.jfif

image.png


yrllo.jfif

image.png


yrllo.jfif

image.png


yrllo.jfif

image.png


yrllo.jfif

NB: We can see that only Bandwidth is consumed and this indicates an ordinary transfer.


How to identify a"Smart-contract-operated transfer" on Tronscan using my own Wallet.


  1. Search and navigate the https://tronscan.org/ website.
  2. I would be using my own account so I search with my TronLink wallet address from the search address bar.
  3. Click on the search icon and go to transfers
  4. Click and select the "TRC20&TRC721 transfers"
  5. Choose any transaction available to explore

yrllo.jfif

image.png


yrllo.jfif

image.png


yrllo.jfif

image.png


yrllo.jfif

image.png


yrllo.jfif

image.png


yrllo.jfif

Differences between an ordinary transfer and a Smart contract trigger transfer


ordinary transfer transaction only consumes Bandwidth whilst Smart contract trigger transfer transactions consumes both Bandwidth and Energy.


Conclusion


yrllo.jfif

I am really excited to have gone through this wonderful lecture, I think this should have been the first lesson to be taught before the previous week's lesson. I have been enlightened more on how to freeze TRX to obtain energy and bandwidth, also how to check for energy or bandwidth consumption for any transaction on Tronscan. Indeed this week's lesson has really improved my understanding of how Tronscan works and aided me to explore more features on Tronscan as well.

I highly acknowledge the efforts of professor @sapwood for his kind work and lecturing us on this wonderful course. I say a very big thank you to prof @sapwood.

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:  
Loading...