Steemit Crypto Academy | Season 2: Week5-- Bandwidth & Energy (Tron) | Homework : @suralla

in SteemitCryptoAcademy3 years ago

Good morning Professor @sapwood, here is my homework where you can see the different bandwidth and energy consumption (Tron), according to the types of transactions performed.


banner.jpg

1 (2).png

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

To connect my TronLink wallet I installed the extension in Google Chrome, for this I put the wallet name, Tron password and finally the Private Key.


1.jpg

Then I opened the Tronscan page, went to the top right and clicked on connect wallet.


2.jpg

It appears to choose the option to open with tronlink , when I click on connect, it automatically connects to Tronlink, because the Tronlink session is logged into the Google Chrome session.


3.jpg

There I can see the characteristics of my account, among them energy and bandwidth.


4.jpg

This way I have synchronized my Tronlink wallet with Tronscan.


1 (2).png

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

To freeze TRX and obtain Energy, I follow the steps below.

  • I go to the resource box located in the center of my account, as shown in the image, and click on get.


1.jpg

A pop-up window appears. Where I have to put the amount of TRX to freeze, I fill the box providing 1 TRX and it tells me that I will have 1559 Bandwidth.


2.jpg

  • I confirm, freeze and accept the verification.


3.jpg

  • A pop-up box then appears indicating that the token was successfully frozen.


4.jpg

  • Then click OK and verify in the left panel under Resources the information of how many TRX were frozen.

5.jpg


1 (2).png

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

To freeze TRX and obtain energy, we enter Tronscan, in the left panel, choose the "Resources" option and then click on "Obtain".


1.jpg

Then a pop up window appears, to get Resources and Tron Power, then in the drop down menu, we change the option to get to "Tron Power and Energy", I chose for the purpose of the task 1 TRX and then accept and freeze.


2.jpg


3.jpg

Another pop-up window appears approving the operation performed. Then I go again to resources in the left panel, to verify the obtained energy.


4.jpg

As we can see, with 1 TRX, we obtained 30 Energy.


5.jpg


1 (2).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)

According to what was learned in this conference, there are two types of transactions:
(a) Ordinary transactions or transfer, these are the ones that consume only bandwidth. In this case each Tron Blockchain account gets 5000 free bandwidth every 24 hours. Another way to get bandwidth is to freeze TRX.

How does TRX consumption work for ordinary transfers?
In this case, freezing the TRX consumes the bandwidth points, in case, this frozen bandwidth is not enough then the free bandwidth will start to be consumed. Now if the above are not sufficient, TRX will be frozen to accommodate the bandwidth points needed.

(b) Smart contract transaction, this consumes both bandwidth and energy when making a smart contract call, in this case, energy can be obtained by freezing TRX. This energy will depend on the liquidity of the entire network and the total amount of TRX frozen in the Tron Network.

How does the energy consumption work?

First the energy is consumed by freezing TRX, if this is not enough then it will burn TRX to accommodate the energy needed for the transaction.

EXAMPLES OF BOTH TYPES FROM YOUR WALLET.

ORDINARY TRANSACTION

For the Ordinary transaction where only Broadband is consumed, and to demonstrate, I transferred 8TRX from Tronlink to my ProBit wallet and the screenshot shows a Broadband consumption of 714.285 and burned 0.1 TRX for 714.285 bandwidth.


3 ba.jpg


tronscan.jpg

EXAMPLE SMART CONTRACT TRANSACTION

In the screenshots in Just Lend are the transactions performed by the Mint call method and, for a value of 5TRX there was a Broadband consumption of 284 and an energy consumption of 80,377 TRX 11.24858 were burned.


4.2.jpg
4.3.jpg
4.4.jpg
4.7.jpg


1 (2).png

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

To answer this question, we took as an example, the smart contract transaction using (The Mint calling method) to
supply jTokens. For this we supplied 5 TRX to acquire a token amount of 499.837674 tokens. We verified by copying my wallet address into the Tronscan search bar, then I went to TRANSFERS / TRC20&TRC721 Transfer .

Inside the smart contract hash we see the details:

Number of JTRX: 499.83767492

Bandwidth Consumption: 284

TRX Burned to obtain energy: 11.24858 TRX

Power Consumption: 80,347

4.7.jpg

Calling method (Borrowing)

preg 6 pedir prestado.jpg

I did not have enough TRX to support the loan, but when I tried there was:
Value: 0 TRX
Bandwidth Consumption: 345
Power Consumption 22,677

There was no loan to repay. However, if a loan could have been achieved, there would have been a repayment and reflected bandwidth and power consumption and TRX burned to accommodate power.


1 (2).png

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

To avoid burning TRX and accommodate the energy needed in a transaction, freezing TRX is required, and this depends on the liquidity of the entire network and the total amount of TRX frozen on the Tron Network blockchain, therefore a sufficient amount of TRX must be frozen to avoid additional TRX burns.


1 (2).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)

When I tried to make the exchange transaction in JustWap , it appeared that this was failed, I assume because I no longer had enough TRX in the wallet, however there was power and bandwidth consumption, even though the transaction failed. so I did not continue trying but I show you the data.

7.jpg

JUSTLEND

just.jpg

JUSTWAP

jwap.jpg


1 (2).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 TRANSACTION.

preg 8.jpg
screenshot Tronscan

SMART CONTRACT TRANSACTION.

preg 8.1.jpg
screenshot Tronscan

Here are the screenshots that identify an ordinary transfer and a transfer operated by Smart Contract. In them we can see the differences between the two.

Differences:

In the Ordinary Transfer, we can see that there was only Bandwidth consumption. As we can see:

Consume Bandwidth= 714.285
Burn 0.1TRX for Bandwidth TRX=714.285

In the Smart Contract Transfer there was Bandwidth and Energy consumption:

a) Freeze/Free Bandwidth Consumption =284
b) Consume energy =80,377energy
c) Consume energy frozen by the user= 30energy
d) Burn 1124858TRX to obtain energy =80,347
Conclusion
In the Ordinary transfer only Bandwidth is consumed while in the Smart Contract Transfer bandwidth and energy are consumed.

1 (2).png

CONCLUSIONS:

In ordinary transactions, only bandwidth is consumed.

In smart contract transactions, bandwidth and energy are consumed.

When there is a failed smart contract transaction, there is also bandwidth and energy consumption.

To acquire energy, it is necessary to freeze TRX to avoid burning trons during a transaction.


All screenshots, are from my wallet and belong to me.

@suralla

Sort:  
Loading...

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63030.98
ETH 2594.62
USDT 1.00
SBD 2.74