Bandwidth Energy & Tronscan
How to connect Tronlink Wallet to Tronscan
- Go to your Tronlink Wallet dApp
- Click on discover and search for the Tronscan icon
- Click on the Tronscan dApp
- On the Tronscan page click on the three lines at the top right corner, it would bring out a list of actions to take.
- Click on Wallet
- Click on the wallet address, it would take you directly to the Tronscan dApp resources.
- Viola! You have successfully connected your Tronlink Wallet to Tronscan.
How to freeze TRX to obtain Bandwidth
- After you have logged in to Tronscan using your Tronlink Wallet, you would see a display like this. Click on resources.
- Click on obtain, then a list of things to follow would pop out.
- Choose Tron power and Bandwidth since we want to freeze TRX to obtain Bandwidth. Then choose the amount of TRX you want to freeze.
- It would take you to this place, click on continue.
- Click on confirm
- Input your Tronlink Wallet password and click done. It would show that the transaction is processing.
- Congratulations! You have successfully frozen TRX to obtain Bandwidth.
How to freeze TRX to obtain Energy
The process is the same when trying to freeze TRX to obtain Energy.
- After you click on obtain, here you choose Tron power and Energy.
- Then you follow the same steps above till you successfully complete the process.
Transactions that consumes only Bandwidth and transactions that consumes both Bandwidth & Energy
In the Tron network, normal transactions such as freezing TRX for either bandwidth or energy consumes Bandwidth only. From the exercise above I froze TRX to get bandwidth and also energy. Both transactions were powered by the free bandwidth that the TRX platform give daily which amounts to 5000 per day. So when a transaction that consumes bandwidth only occurs, it could be seen as free because you won't have to consume both energy and bandwidth and you also won't have to burn TRX for the transaction either.
Here the bandwidth resources used was 286. Soms TRX was burned in the process.
While smart contracts powered transactions consumes both Bandwidth and energy.
From last week's exercise I used the JudtLend platform using my Tronlink Wallet to borrow TRX funds from the TRX market pool in the form of jToken i.e jTRX and this transaction consumed both bandwidth and energy. This happened because it is a smart contracts powered transaction.
How to check how much Bandwidth & Energy is consumed in a transaction
- Copy your Tronlink Wallet address from your app.
- Go to the Tronscan dApp on your device, click on the search bar and paste your wallet address and click on the search icon.
- On the display screen, scroll down to where you have the Transfer tab and click on it.
- After you click on it scroll down to where you would see two tabs. One indicating TRX&TRC10 and the other TRC20&TRC721.
- Click on TRX&TRC10 to get details of transactions that consumes only bandwidth.
- Also click on TRC20&TRC721 to get details of transactions that consumes both energy and bandwidth.
How to avoid burning TRX to accommodate the Energy required for a transaction
For us to avoid burning TRX in order to accomodate the Energy required and thus facilitate a smart contracts related transaction, because any transaction that has to do with energy is powered by a smart contract, we need to freeze TRX to allow such transaction take place without burning TRX.
To get the accurate amount of Energy from freezing TRX, we would employ the natural formula:
Energy gotten = amount of TRX frozen by user/total amount of TRX frozen in Tron × total energy limit.
However you can also get the information on how much Energy you get when you freeze TRX. And how much Energy is consumed when the transaction burn TRX.
Go to tronstation.io/calculator.
Interactions with JustLend and JustSwap
Interacting with JustLend
Last week exercise on JustLend, I was able to borrow jTokens and froze some amount of TRX as collateral.
Interacting with JustSwap
On the Tronlink Wallet dApp,
go to discover, click on it and look for the JustSwap icon. Click on it, and it would direct you to the JustSwap application.
From the Information above we can see that the JustLend transaction consumed
Bandwidth - 284
Energy - 80,377
While the JustSwap transaction gave
Bandwidth - 348
Energy - 30,881
We can safely conclude that JustLend transaction consumes less bandwidth and more energy while JustSwap transaction consumes more bandwidth and less energy.
Identifying an ordinary transfer and a smart contract based transaction using the Tronscan app
Copy and paste your Tronlink Wallet address on the Tronscan dApp and click on search.
It would take you to your account and from there you can see the activities that have been going on with your account.
To check for 'ordinary transfer' and 'smart contract enabled transfer' click on transfer tab on the Tronscan display after searching for your account.
There are two buttons to click on TRX&TRC10 - for checking ordinary transfer/transaction; TRC20&TRC721 - for smart contract enabled transaction/transfer.
The TRX&TRC10 tabs shows transfers which are basically ordinary transactions such as
- Freezing of TRX in order to obtain Bandwidth or Energy in order to avoid TRX being burned.
- You can also make transfer to an exchange, peer to peer eg from the example above I received TRX from Steemit.
While the TRC20&TRC721 are smart contract induced transactions. They include interactions with smart contracts dApps such as JustLend and JustSwap. Operations on such platforms consumes both Bandwidth and Energy.
Thanks @sapwood for the opportunity to take on this exercise.