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

in SteemitCryptoAcademy3 years ago (edited)

Introduction

It's another great moment to come to the academy for the new week to enjoy a great privilege to learning more about cryptocurrency. This time, I've been in attendance of professor @sapwood lecture and of course, it is a groundbreaking lecture as usual and I am happy I attended.

Overview of Bandwidth and Energy (Tron)

images (39).jpeg
Source

Every transactions on the different blockchains has a means by which they charge for the process of transacting and as we all know, transaction consumes certain resources which differs from one blockchain to another. In the case of the Ethereum blockchain, it involves Gas fee to complete a transaction, whereas, for the Tron blockchain, Bandwidth and Energy are consumed to complete a transaction (Bandwidth for ordinary transfers/Bandwidth and Energy for smart contract triggered transactions). And this is where the concept of Bandwidth & Energy comes in, on the Tron blockchain whereby we have Bandwidth point representing bandwidth and Energy representing CPU and storage. Now to the task!

How do I connect my TronLink Wallet to Tronscan.org?(Screenshots needed)
For this section, I will be using my TronLink wallet Decentralized Application to access the tronscan.org/ directly and the steps involved are shown below.

  • Open the TronLink wallet.
  • Switch to Discover at the bottom of the wallet.
  • Enter tronscan.org/ into the address search field.
  • Go to the URL and the wallet would be connected automatically.
    Screenshots below



The last screenshot above shows my connected wallet with 5000 Bandwidth / 0 Energy.

Fred Br.png

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

This part will entails the entire process of freezing my TRX to obtain Bandwidth and Energy, in other words, locking up my TRX asset for a certain period of time to obtain Bandwidth and Energy (time-frame- at least 72 hours). The steps involved are shown below.

  • Visit the tronscan.org/
  • From the landing page, click the three parallel lines (menu button) at the top-right of the page to explore more options.
  • Scroll down to wallet and click on it.
  • Switch to Resources and hit the Obtain button.
  • From the option, select Tron Power and Bandwidth since I'm particular about obtaining Bandwidth in this section.
  • Enter the amount of TRX, I inputted 10 (with an estimated 15.229 Bandwidth to be received.
  • And confirmed that I am freezing 10 TRX for at least 72 hours by ticking the designated box.
  • I clicked Freeze. Confirmed the transaction by inserting my password and having the handling fee to be 245 Bandwidth.
    Screenshots below




  • The Transaction was successful and the record of my frozen TRX asset to obtain Bandwidth is shown below.

iMarkup_20210509_172122.jpg
15 Bandwidth Obtained

Fred Br.png

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

Steps

  • From the tronscan.org/ homepage, select the three parallel lines menu button at the top-right of the page.
  • Locate the wallet nearly at the bottom of the page and click on it.
  • Switch to Resources then click Obtain.
  • In the power type selection, select Tron Power and Energy.
  • Input the amount of TRX to be frozen to obtain Energy (In my case, I inputted 10 TRX with an estimated 306.444 Energy to be obtained).
  • Confirm by hitting the box.
  • Click on Freeze button and supply password to continue (handling fee- 247 Bandwidth).




  • The transaction was successful with 10 TRX frozen to obtain 306 Energy.

iMarkup_20210509_175323.jpg
306 Energy obtained

Fred Br.png

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)

Ordinary Transfer transactions on the Tron blockchain only consumes Bandwidth while transactions that involves Smart Contract Trigger consumes both Bandwidth and Energy. An example of each would be shown in the screenshots below.

Example of a Transaction that consumes both Bandwidth and Energy on my wallet

To obtain this information, I will be visiting tronscan.org/ from my mobile browser and the steps to it follows.

  • From the tronscan.org/ homepage, I will paste my Wallet's address into the address search field and search.
  • Select transfers.
  • Switch to TRC20 and TRC721 since I am particular about a smart contract trigger transaction.
  • Now, I have the history. I will be checking on the 14,995 jTRX I minted on JustLend when I supplied 150 TRX.

iMarkup_20210509_183122.jpg
Searched my wallet address

iMarkup_20210509_183143.jpg
Transfer

iMarkup_20210509_183437.jpg
TRC20 & TRC721

iMarkup_20210509_183337.jpg
Minted 14,995 jTRX

iMarkup_20210509_184619.jpg
Minting consumed- 284 Bandwidth and 80,377 Energy

Quick observation: From the minting transaction above, 284 Bandwidth was consumed from my daily free Bandwidth and 80,377 Energy was consumed (Having around 11.253 TRX burned to accommodate the required energy).

Example of a Transaction that consumes Bandwidth only

To obtain this, I am going to explore tronscan.org/ from my mobile browser as well.

  • From the landing page of tronscan.org/, I will be searching for my wallet address.
  • Click on Transfers.
  • And this time, I am sticking to TRX and TRC10 since we are looking into transaction that consumes Bandwidth alone.
  • Select one of the transactions to see the Bandwidth consumed.

iMarkup_20210509_190653.jpg
Search Wallet

iMarkup_20210509_190718.jpg
Transfers

iMarkup_20210509_190741.jpg
TRX and TRC10

iMarkup_20210509_190801.jpg
Sent 540 TRX

iMarkup_20210509_190840.jpg
269 Bandwidth consumed

Fred Br.png

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

For this aspect, I will be checking on a smart contract trigger transaction that consumes both Bandwidth and Energy showing the amount consumed in the transaction.

  • Visit tronscan.org/ official website. Search for my TronLink wallet address
  • Click on Transfers.
  • Select transaction type (TRX & TRC10 or TRC20 & TRC721) and I will stick to TRC20 & TRC721 because I want to explore a smart contract trigger transaction.
  • Choose a transaction from the list to see the details.



1 USDT loan repayment on JustLend


Transaction details

Highlights of the transaction above

The transaction above is a repayment of my 1 USDT loan from JustLend and of course, it's a smart contract trigger transaction that consumes both Bandwidth and Energy and the amount of consumption will be listed below.

  • Bandwidth: 313 Bandwidth
  • Energy: 87,314 Energy
  • TRX burned to accommodate the required Energy for the transaction: 12.224 TRX

Fred Br.png

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

To avoid burning TRX unnecessarily during transactions on the Tron blockchain, you need to freeze your TRX assets to obtain Energy and also Bandwidth based on your choice. For transactions' energy consumption, the energy generated from one's frozen TRX asset would be consumed but if it's insufficient, then it would burn some of one's TRX asset to complete the transaction. Know that, transactions on the Tron blockchain consumes Bandwidth and Energy, and if you don't have enough at the time of transaction, you end up burning excess TRX to accommodate the required Energy. There are two options to obtain Bandwidth and Energy;

  • Tron Power and Bandwidth- To obtain Bandwidth.
  • Tron Power and Energy- To obtain Energy.

How Energy Obtained is calculated

As taught by the professor, energy obtained can be calculated from the expression below;

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

The amount of Energy to be obtained for freezing TRX can be calculated on tronstation.io/calculator/ and with the screenshot that will be shown below, for freezing 500 TRX, the estimated Energy to be obtained is 15294.

iMarkup_20210510_132310.jpg
Freezing 500 TRX <---> 15294 Energy

Note that: You are given free 5000 Bandwidth daily which resets every 24 hours.

Fred Br.png

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)

Swap transaction on JustSwap

I will be accessing JustSwap through my TronLink Wallet's DApp and the steps will be given below.

  • Open the TronLink wallet, select Discover to access the DApp and navigate to justswap.io/.
  • On the swap landing page of JustSwap, choose the asset you are swapping.
  • In my own case, I am swapping TRX to USDT.
  • Select USDT token as the coin you are swapping to.
  • Input the amount of TRX you are willing to swap.
  • The estimate of the USDT to be received is shown.
  • Continue by clicking Swap and Confirm swap.
  • Supply password and click Done (handling fee in this case: 344 Bandwidth).





  • The transaction was successful as I swapped 8 TRX to 1.126659 USDT.

iMarkup_20210509_215523.jpg
Successful swap

Checking the details of my recent JustSwap swap

iMarkup_20210509_221703.jpg

From the screenshot above, 350 Bandwidth and 48,363 Energy was consumed having 6.728 TRX burned to accommodate the required energy for the transaction.

Borrow transaction on JustLend

For this purpose, I will be borrowing from the USDT market on JustLend and the amount to be borrowed is 1 USDT. Note that: this is an extract from the professor's previous week's task.

Steps

  • Visit market on JustLend.
  • Select the USDT market and click on Borrow with the APY to be 1.72%.
  • Input the amount you want to borrow, which is 1 USDT in my own case.
  • Put the password to continue.
  • The borrowed asset was received. Note that: You have to collateralize your jTokens before you can borrow on JustLend.



Checking the details of my borrow on JustLend

iMarkup_20210509_224708.jpg

From the details of my borrow transaction on JustLend, 313 Bandwidth and 204,506 Energy was consumed having 28.63 TRX burned to accommodate the required energy for the transaction.

JustSwap Swap transaction and JustLend Borrow transaction

ValuesJustSwap (Swap)JustLend (Borrow)
Amount8 TRX <---> 1.1266569 USDT1 USDT
Bandwidth350313
Energy48,363204,506
TRX burned6.728 TRX28.63 TRX
Observation: The transactions carried out on both JustSwap and JustLend are close in amount as both lies within 1 USDT, and the Bandwidth consumed is as well close but there is a massive difference in the energy consumed with the JustLend's borrow having a huge amount of Energy consumed which resulted to a bigger TRX burned almost 4x greater than JustSwap's swap.

Fred Br.png

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

The steps involved in this starts with visiting the tronscan.org/ to explore different transactions.

Steps- Ordinary Transfer

  • Visit the website tronscan.org/.
  • Search for my TronLink wallet's address.
  • Click on transfers.
  • For ordinary transfers, I am selecting TRX & TRC10.
  • And select a transaction to explore the details.


iMarkup_20210510_000043.jpg
Ordinary transfer

iMarkup_20210509_235728.jpg
Bandwidth consumed- 288

Steps- Smart-contract-operated transfer

  • To explore this, we will stick to TRC20 & TRC721.
  • Select a transaction to explore the details.
  • Now, I selected the smart contract triggered transaction where I swapped TRX to ANDX.

iMarkup_20210510_001359.jpg
TRC20 & TRC721

iMarkup_20210510_001508.jpg
Bandwidth and Energy consumed

Difference between Ordinary transfer and Smart-contract-operated transaction

The difference between the two is; Ordinary transfer only consumes Bandwidth while Smart-contract-operated transaction consumes both Bandwidth and Energy.

Fred Br.png

In conclusion, transaction fee on the Tron blockchain is very low and in the real sense, Bandwidth and Energy are consumed during transactions but a user can have their TRX assets burned to accommodate the required energy to complete a transaction, as such it is advised that users should freeze their TRX assets to obtain Bandwidth and Energy to avoid excessive burning of their assets. Thanks to professor @sapwood for this awesome lecture. Thank you all.

Fred Br.png

Cc: @sapwood

Written by;
@fredquantum

Sort:  
Loading...

Amazing presentation from you. Well exained with real screen shots.

Thanks for participating.

#affable #india

Thank you, sir. I am glad that you read this piece from me.

Coin Marketplace

STEEM 0.21
TRX 0.14
JST 0.030
BTC 68220.71
ETH 3321.59
USDT 1.00
SBD 2.74