Steemit Crypto Academy | Season 2 Week5 Homework task for @sapwood| Bandwidth & Energy (Tron)

in SteemitCryptoAcademy3 years ago (edited)

Steemit Crypto Academy.pngEdited onCanva.com

Hello everyone,
Yet another interesting and informative lecture about Bandwidth and energy from professor @sapwood. The professor explained everything in depth. I lent a lot from this lecture. And I’m happy to submit this homework task. To perform this task, I’m using a mobile device and desktop.

Before start answering 1st question, let’s underhand what does it mean by Bandwidth and energy?

Bandwidth: In cryptocurrency when we perform any transaction it consumes some fee. This fee can be a different form. For Tron blockchain when we perform any ordinary transaction it consumes bandwidth as fee handing. I’ll explain what ordinary transaction in this post too. By default, every user gets 5000 bandwidth per day.

Energy: On Tron blockchain when we do any smart contract transaction that case it consumes Energy as well as bandwidth too. For example, like Ethereum blockchain consume gas fee for transactions. And by default, wouldn’t get any energy.

link.png

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

Steps: -

  1. Search Tronscan.org on google. Then you’ll get the home page of the official site of Tronscan.org.
  2. Then click the right corner potion called Connect wallet. (You can check in below down images red box highlight.)
    a) For Desktop make sure you have installed Tron Link on your computer.
    b) Just enter the Tron wallet account credential. And click on continue.
  3. For mobile
    a) For mobile just log in to your wallet and click on discover in the bottom menu bar
    b) Next click on Tronscan from dApp and it will automatically connect your wallet.
  4. Click on the hamburger icon to check other detail like Tron wallet Id, Bandwidth, and energy detail.

1.PNG
Desktop view

2.PNG
Home page

3.PNG

4.PNG
Chrome extension

Mobile UI

5.jpg

6.jpg

7.jpg

8.jpg

As in my wallet have 5456, 2138 Bandwidth, and Energy respectively.

link.png

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

In order to perform this operation when you are going to see the real bandwidth how getting consumes even your obtaining the Bandwidth. And on the Tron platform that particular TRX is going to freeze for a minimum of 72 hours, which means you can do anything with that TRX even you can unfreeze after 72 hours. Curranty we get 1 bandwidth for each TRX. So, in this task, I’m going to use my 5TRX to get Bandwidth.

Steps:

  1. Copy your wallet Id and paste it on the All filters input box
  2. Select the resources tab. Then click Obtain button. It will pop up Obtain Resources and Tron power screen.
  3. Select Tron and power from the Obtain option
  4. Enter the amount. Here Freezing 5TRX
  5. And Click on the Freeze button. There we must enter our wallet password to do this transaction and can see some Bandwidth is going consume as a handling fee. And after that, you’ll get Token frozen successful message.

1.jpg

2.jpg

4.jpg

5.jpg

6.jpg

7.jpg

As you can see, I got 5 Bandwidth from this transaction.

link.png

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

This is the process where we freeze our TXR and that can be used in performing smart contact transactions. It’s a similar process like we obtain Bandwidth.

  • Follow the same step from 1-5 and in step 3 just select Tron Power & energy from the obtain option instead of Bandwidth.
  • For this operation, I’m freezing 10 TRX from my wallet to get 304.4 energy.

4.jpg

5.jpg

6.jpg

7.jpg

After the energy freeze, I have a total of 2131+304=2435 energy.

link.png

(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)

Normally on the Tron ecosystem for Ordinary transactions consume only bandwidth like when you claim your rewards if you have voted your TRX. And for smart contract transactions like TRC20 and TRX721, it consumes both bandwidth and energy.
Let see an example of consuming both bandwidth and energy. I have already supply 100TRX in the JustLend project.

Steps:

(1) Filter your wallet id in the all filters input box.
(2) Select Transfers tab
(3) Next click on TRX20 and TRC721 buttons.

As I have done many transactions and we can see the transaction list. So, I have 9998 jTRX tokens. That I have supplied 100TRX from JustLend mint function. Below are the screenshots.

1.jpg

2.PNG

3.jpg

As you can see in the 3rd screenshot it consumes total bandwidth of 284 and 80377 energy whereas 2209 from my energy from the wallet and the rest burnt from 10.9TRX that is 78168 energy.

For only Bandwidth consumption.
  • Steps 1 and 2 are the same as from both consumption processes.
  • (1) Step 3 Next click on the TRX&TRX10 button.

As we can see list of all Ordinary transactions.

4.jpg

5.jpg

In the above screenshot, we can see it consumes 286 bandwidths only to complete this transaction.

link.png

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

For this question, I’ll take the example of my previous task of JustLend transaction that is a smart contract transfer. I replayed the USDT and that consume Bandwidth and Energy both in that transaction.

1.jpg

2.jpg

3.jpg

For the above image, we can see clearly commune total of:

Bandwidth: 313
Energy: 87314 (frozen energy 2 + burn energy 87312)
Tron Burnt: 12.22368TRX

link.png

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

In general, energy consume when we do smart contact transact transactions. If you do have sufficient energy/bandwidth in your wallet then it burns TRX to that particular transaction even for bandwidth too. If you have already used 5000 Bandwidth that gets default for every day.

To avoid this there are certain ways.

1 freeze Tron (TRX)

2 Borrow Energy.

I have already explained how to freeze TRX above.

How to Borrow energy

It’s very state forward just click on rent and it will redirect to Tronlending.org. And it’s self-service so you can calculate how much you need. You can rent for 3-30 days. Based on how much you borrow energy they will charge you TXR. For example, if I take 1500 TRX then I must pay 10.98 TRX, and that 1500TRX will be frozen for a day.
How to calculate Energy and bandwidth Obtain.

2.jpg

We can use tronstation.io/calcutor

By freeze: Currently, for each freezing TRX, we can get 30.4 energy and 1.5 bandwidth.

By burn: Whereas by burn we can get 7142.8 energy for 1 TRX. Energy and Bandwidth vary according to the Tron network.

1.PNG

link.png

(7) 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)

To get the real experience I'm using desktop view.

Steps:

  1. Go to Trronscan.org and connect your wallet. Once the wallet gets connected then you can see your Tron wallet Id.
  2. Click on JustSwap from the menu list. That will be landed on the Justswap.org home page.
  3. Enter the amount of USDT that you want to swap from TRX to USDT. In my case, I’m converting 1 USDT.
  4. Click on Confirm swap button. Here some liquidity provider free also will be changed.
  5. Then Click on Accept. If you are using a mobile device then you need to enter your wallet password. But here I’m using Chrome extension so just need to accept.

1.jpg

2.jpg

3.jpg

4.jpg

5.jpg

And you will get a Swap complete message.

6.jpg
After Swap

7.jpg

So, It consumes a total of 350 bandwidth and 55377 energy.

To borrow USDT I’ve performed this step in my previous task so here let see to transaction detail below.

8.jpg

To complete this transaction, it consumes 313 bandwidth and 204506 energy that burn 28.59 TRX.

JustSwap Swap transaction vs JustLend Borrow transaction

44.PNG

link.png

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

Ordinary transactions consume only bandwidth. When we do vote for claiming rewards it consumes only bandwidth. To Identify we must open the transfer menu and select TRC10 and see the transaction list. For example, I’m checking my latest transaction from my wallet.

1.PNG

2.PNG

In the above screenshot, we can see it consume 286 bandwidths only from claiming the rewards,

On another hand when we do any smart contract transfer such as Borrowing or repayment in that case it consumes both Energy and bandwidth. In order to identify select the transfer tab and then TRX20& TRX721. In my case, I’m taking the first one from the transaction list.

In the below screenshot the red box data highlight the total consume 345 bandwidth and 13646 energy and it burns 1.9 TRX.

3.PNG

4.PNG

From these two transactions, we understood that Ordinary transfer consumes only bandwidth whereas smart contract transfer consumes both bandwidth and energy.

Conclusion

After doing all this activity now we have a clear crystal of how the Bandwidth and energy process works on Tron blockchain transaction Ordinary as well as smart contract transfer. Thanks to professor @sapwood for this great lecture.

Thank you.
@sanjeev.kumar

link.png

Cc: @sapwood

Sort:  
Loading...

Coin Marketplace

STEEM 0.16
TRX 0.15
JST 0.029
BTC 56769.47
ETH 2402.64
USDT 1.00
SBD 2.30