Crypto Academy Week 13 - Homework Post for [@sapwood]

in hive-108451 •  3 years ago 


image.png

Source

Hello professor @Sapwood and SteemitCryptoAcademy, today I'm handing in the TRON task. I'm grateful to have been able to participate in this activity as always! I hope you enjoy my work, it really helped me learn more about TRON. Best regards!

image.png

Introduction: what is TRON?

TRON is a platform that allows programmers to create or use different protocols through a smart contract. The main intention of this platform is to decentralize the internet using its blockchain-based infrastructure. TRON uses for its blockchain bandwidth and energy that are necessary to perform different transactions. This currency was mainly based on Ethereum and was developed through an ERC-20 protocol. Its main feature focuses on the sharing of rewards and rights for people who develop their content through the internet with the intention of also allowing them to connect directly with their audience, this causes as a benefit that the content is in turn less expensive for viewers. The platform of this network has capacity for approximately 2000 transactions per second. As an additional fact it is curious to mention that TRON is also one of the most recognized blockchains when it comes to creating DApps.

image.png

How do I connect my TRONLINK wallet to tronscan.org?

During this post we will use the TRONLINK platform to effectively access tronscan.org. So the first thing we are going to do is to locate our TRONLINK application, we have different alternatives to use it with their Google Chrome extension or through their mobile app. For practical reasons, we will use the Google Chrome extension that is available in the store.

  • Once we have located the extension we proceed to execute TRONLINK.


image.png

  • Go to the tronscan.org address and click on connect wallet


image.png

  • Select link with TRONLINK


image.png

image.png

How do I freeze TRX to obtain bandwidth?

There are different situations that may lead us to want to freeze our assets in TRX, for example, the need to obtain bandwidth and energy. Freezing TRX means blocking our assets temporarily. Now we explain the procedure to perform this operation:

  • We already know the interface of our tronscan.org wallet. Now it is time to go a little deeper into it, so we will go to the resources option. Within this, we must locate the get button.


We will find the option Tron Power and Bandwidth and once positioned here we will be able to enter the amount of TRX we want to freeze to obtain the bandwidth.


image.png

  • When we have successfully passed the confirmations we can click on freeze.


image.png

image.png

How do I freeze TRX for energy?

TRX requires energy to be able to execute some procedures, such as a smart contract, if it were not necessary to perform one of this type, there is no other real reason out of the ordinary why we should need to freeze our actions. Taking this warning into account, the steps to follow to freeze TRX in exchange for energy are:

  • We go back to the tronscan.org page and look for the resources tab in the menu and go to the section "obtain".


image.png

image.png

  • We look for the second time for the Tron Power and Energy option but this time with the intention of freezing TRX for energy.


image.png

  • In this section we will enter the amount of TRX we wish to freeze as in the previous step.


image.png

  • When we have made the necessary confirmations we will click on freeze to confirm the movement.

image.png

What types of transactions consume only bandwidth and what types of transactions consume both bandwidth and power?

The transactions that require a smart contract are the only ones that use bandwidth as energy, as mentioned above. In the same order of facts, the transactions that only consume bandwidth are those simple TRON blockchain transfers.

  • An example of a transaction that consumes bandwidth as energy:

  • Accessing our virtual wallet through tronscan.org through the blockchain section, we select transfers.


image.png

  • Now we need to indicate the type of transaction


image.png

image.png

  • An example of a transaction that consumes only bandwidth:

  • Again we enter tronscan.org and position ourselves in our virtual wallet.

  • Click on transfers.

  • For this case we also need to indicate what type of transaction we are looking for and it is one that only consumes bandwidth, so we will filter by TRC10.

  • We can select each of the transactions to see the bandwidth.


image.png

image.png

How do I check how much bandwidth and energy is consumed in a particular transaction?

As already mentioned repeatedly throughout this paper, an action that consumes bandwidth with energy is one that is related to Smart Contract Trigger technology and to make this explanation a one-off, we will perform the procedure to measure the bandwidth with energy that we consume in such an operation, then:

  • As usual, we go to the interface of our TRONLINK wallet within the tronscan.org platform.

  • Within the menu, we will try to find the option that allows us to check our transfers


image.png

  • Again we have to select the type of transaction and in this case, as we want to know how much bandwidth and energy is consumed in a transaction, we will use the TRC20 protocol.


image.png

  • Now we only have to choose the transaction of which we want to know its history and we will have access to all the information related to it.


image.png

image.png

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

To avoid burning our TRX assets and losing them forever, it is necessary to take into account several provisions, for example: when we are trying to perform a transaction and we do not take into account the amount of energy and bandwidth that this transaction needs, if we do not have enough, the platform will automatically proceed to burn part of our assets to balance the operation of our task. When the power consumption generated by means of our TRX asset is frozen, it would just be consumed, so that's what we have to do. For that very reason TRONSCAN offers us different options to get bandwidth and to get energy, called Tron Power & Bandwidth and Tron Power and Energy, respectively.

To calculate the energy we will get we can apply the following calculation:


image.png

Include actual example of your interaction with Justlend & Justawap. Indicate how a "swap" function consumes different "energy and bandwidth" than a borrow function.

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

Nice breakdown 👍

I forgot to put it, sorry. @sapwood

Here is the address used:

  • TUcXRaJBYNdFKkpjCmkmCSbFqpNvJbJURz