Steemit Crypto Academy | Season 2 Week 5 Homework Post for @sapwood - Bandwitdh & Energy

Hello everyone. Our world has been fighting a big epidemic for more than a year. I hope all of you are in good health. Stay healthy! Thanks for reading.

Today I will share with you the my homework given by the professor @sapwood

tronenergy.png

How do I connect my TronLink Wallet to Tronscan.org?

STEP 1

First, go to tronscan => https://tronscan.org/
Then click Connect Wallet

image.png

STEP 2

On the page that opens, choose the method you want to connect. I choose TronLink. Then click Connect
image.png

STEP 3

Our TronLink wallet has been successfully connected to Tronscan.org!

image.png


gecis.jpg

How do I freeze TRX to obtain Bandwidth?

STEP 1

Move the mouse cursor over your Tron wallet address on the upper right corner of the Tronscan homepage. Click on your tron wallet address in the first row from the tabs that open.

image.png

STEP 2

On the page that opens, click on Obtain where I marked it.

image.png

STEP 3

Select TRON Power and Bandwidth from the Obtain section in the window that opens.

image.png

STEP 4

Write the TRX amount you want to freeze in the Amount section. The bottom part says how much Tron Power and Bandwidth you will earn based on the amount of TRX you will freeze. Then click Freeze

image.png

STEP 5

Confirm by clicking Accept in the window that opens.

image.png

STEP 6

We've successfully obtain Bandwidth!

image.png

gecis.jpg

How do I freeze TRX to obtain Energy?

STEP 1

Do the same things up to STEP 3 that we do when obtaining bandwidth. Select TRON Power and Energy from the Obtain section in the window that opens.

image.png

STEP 2

Write the TRX amount you want to freeze in the Amount section. The bottom part says how much Tron Power and Energy you will earn based on the amount of TRX you will freeze. Then click Freeze.

image.png

STEP 3

Confirm by clicking Accept in the window that opens.

image.png

STEP 4

We've successfully obtain Energy!

image.png

gecis.jpg

What types of transaction consumes Bandwidth only and what types of transaction consume both Bandwidth & Energy?

Consume Only Bandwidth

  • Transfer: Consumes only Bandwidth when transferring TRX to another wallet.

image.png

  • Freeze: TRX freezing only consumes bandwidth. TRX freezing to obtain bandwidth and energy during homework only consumed bandwidth.

image.png

  • Unfreeze: TRX unfreezing only consume bandwidth. 2 weeks ago, the unfreezing transaction I did after homework only consumed bandwidth.

image.png

Consume Bandwidth & Energy

  • Running Smart Contracts: It consumes both bandwidth and energy when running smart contracts.

2 weeks ago, when I supply TRX, I minted jTrx through the smart contract. While doing this, Bandwidth and Energy consumed.

image.png

2 weeks ago, I collateralized jtokens to borrow USDT. While doing this, Bandwidth and Energy consumed.

image.png

gecis.jpg

How do I check "How much Bandwidth and Energy are consumed in a particular transaction"?

STEP 1

Move the mouse cursor over your Tron wallet address on the upper right corner of the Tronscan homepage. Click on your tron wallet address in the first row from the tabs that open.

image.png

STEP 2

Click more to see all transactions.

image.png

STEP 3

Click Transfers on the page that opens.
Select TRX & TRC10 Transfer or TRC20 & TRC721 Transfer.
Select the transaction you want to look in the hash category on the left.

image.png

STEP 4

You can check how much bandwidth or energy you consume on the page that opens.

image.png

gecis.jpg

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

Gas fee are paid when doing transaction on the Ethereum network. The situation is different in the Tron network. Bandwidth or energy is consumed while performing transactions on the Tron network.

Our transactions consume energy when running a smart contract. If you do not have the necessary energy in your account, TRX will be burned automatically from your wallet and the transaction will take place. By freezing the TRX, we can obtain energy and avoid burning the TRX. After 72 hours, we can unfreeze and use those TRXs again.

From this calculator, we can calculate how much TRX we need to freeze for our transaction and how much TRX will be burned for insufficient energy.

For example, 10000 energy is required for the transaction we will do. In the calculator, we write the amount of energy (10000) required for our transaction in the Energy By Freezing TRX section. Then we can see the TRX amount (331.8221) we need to freeze on the left.

Let's say we have 5000 insufficient energy. In the calculator, we write the insufficient amount of energy (5000) in the Energy By Burning TRX section. Then, we can see the amount of TRX (0.7) that will be burned for insufficient energy.

image.png

gecis.jpg

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

JustLend

I will quickly describe the initial processes we did on the S2W3 homework.

First, go to JustLend and connect your wallet.
Then supply tokens. I supplied TRX.
Then collate jTokens for borrow.

STEP 1

To borrow USDT, click Borrow on the right.

image.png

STEP 2

Enter the USDT amount you want to borrow and click Borrow.

image.png

STEP 3

Click Accept in the popup window to confirm.

image.png

STEP 4

We have successfully borrowed USDT!

image.png

STEP 5

  • Consumed Bandwidth: 313
    I don't need to burn TRX while consuming it because it has free 5000 bandwidth.

  • Consumed Energy:112,868
    Since there was insufficient energy, 15.80138 TRX was burned.

image.png

JustSwap

First, go to JustSwap and connect your wallet.

STEP 1

Click select a token to choose the token you want to swap.

image.png

STEP 2

Find the token you want to exchange easily by typing in the search section.

image.png

STEP 3

Enter the amount you want to swap and click swap.

image.png

STEP 4

Here is the swap information. Confirm by clicking Confirm swap.

image.png

STEP 5

Click Accept to confirm.

image.png

STEP 6

We swapped successfully!

image.png

STEP 7

  • Consumed Bandwidth:350
    I don't need to burn TRX while consuming it because it has free 5000 bandwidth.

  • Consumed Energy:40,377
    Since there was insufficient energy, 5.65222 TRX was burned.

image.png

Conclusion

ConsumedJustLendJustSwap
Bandwidth313350
Energy112,86840,377
  • More bandwidth was consumed when swapping TRX / USDT on JustSwap than when borrowing USDT from JustLend.

  • Much less energy was consumed when swapping TRX / USDT on JustSwap than when borrowing USDT from JustLend. Since 1 energy = 1 microsecond, my borrowing transaction on JustLend took longer than the swap transaction I did on JustSwap.

gecis.jpg

**Explore Tronscan to identify an "ordinary transfer" & a "Smart-contract-operated transfer". **

STEP 1

Move the mouse cursor over your Tron wallet address on the upper right corner of the Tronscan homepage. Click on your tron wallet address in the first row from the tabs that open.

image.png

STEP 2

image.png

STEP 3

You can identify ordinary transfer or Smart-contract-operated transfer in the Transaction Type section.

image.png

STEP 4

Place the mouse cursor over the Transaction type for easier identification.

image.png

for exemple:

image.png

Indicate the difference between the two.

In ordinary transfer transactions, only bandwidth is consumed. However, while running the smart contract, both bandwidth and energy are consumed in the transactions.

CC: @sapwood

Thanks!

Sort:  
Loading...

Coin Marketplace

STEEM 0.25
TRX 0.11
JST 0.029
BTC 69229.38
ETH 3686.26
USDT 1.00
SBD 3.43