Crypto Academy Week 13 Homework Post for [ @sapwood]. Bandwidth and Energy (Tron) .
(1) How do I connect my TronLink Wallet to Tronscan.org?(Screenshots needed)
Open Tronlink wallet. At the bottom panel of the main page, click on "Discover".
Next a page of DApps will load. look for Tronscan.
Click on Tronscan and it will ask you permission to enter into third party agreement. Agree by clicking "Enter" and you will land in main page of Tronscan.
Click on top right corner, "Register/ Log in " option is there at top. Click on it.
There are 2 ways to log in, one is via e-mail and other is via phone number. Both need an OTP to login. Choose either of two and enter OTP sent to you.
Next you will see " Wallet successfully connected" notification.
(2) How do I freeze TRX to obtain Energy? (Screenshots needed)
Go to TronLink wallet . On the main page just below TRX balance, we got to see Energy and Bandwidth. As you can see in screenshot below, my energy at the beginning is 305.
To obtain more energy, click on energy balance ( encircled on screen shot below).
On next page, details like energy, bandwidth etc are shown. Scroll down and we got to see option to enter amount of TRX to be froozen and below that it shows amount of enrgy we get for amount frozen. I wanted to freeze 5 TRX and for 5 TRX frozen , i got 154 TRX.
Click on freeze and confirm transaction by entering the TronLink wallet password.
Next check your energy balance. In my case, energy before freezing TRX was 305 (approx) and by freezing TRX, i got 154 energy ( approx) . So the collective energy at the end is 460 .
During this process , 247 bandwidth was consumed. So the bandwidth left will be 247 less than 5000.
(3} How do I freeze TRX to obtain Bandwidth? (Screenshots needed)
Again go to TronLink wallet as above. Click on bandwidth this time. I have 4753 Bandwidth at the beginning. Out of 5000 bandwidth that we get every 24 hours, 247 was consumed in obtaining energy'. So we are left with 4753.
Next a page will load which shows details like energy, bandwidth. Scroll down and enter the amount of TRX to be frozen to get bandwidth.
I tried to freeze 5 TRX to obtain bandwidth and for 5 TRX, it shows 8 bandwidth will be obtained.
Confirm transaction with the help of TronLink password.
To perform this transaction 245 bandwidth was consumed. So at rhe end of this transaction, i should have bandwidth equal to 4753 + 8 -245 = 4516. That is exactly there in my wallet.
(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)
Ordinary Transfer
Only Bandwidth ( 268) was consumed.
To check for transaction that trigger smart contract and therefore consume both energy and bandwidth, in question 5 answered belowsupply , burrows,
and repay transactions have been explained along with amount of bandwidth and energy consumed. So to avoid repetition, i beg your pardon and request you to go through Q 5 for smart contract details
(5) How do I check "how much Bandwidth and Energy are consumed in a particular transaction"?(Screenshots needed)
Go to Tronscan.org
In the main page, a search field is provided at the top, enter your Tron Wallet Address.
Account details will be fetched.
Scroll down to look for "Transfer. "Click on Transfer.
Two subcategories are there -- TRX & TRC10 Transfer & TRC20 & TRC721 Transfers. click on TRC20 and TRC721.
Next we will look for transactions performed on JustLend last week like Supply (TRX for jTRX) , Burrow (USDT) and repay burrowed
asset.
Now let's look for transaction hash of all smart contract triggers like, Mint , Borrow , Repay.
Method of calling- Mint(Supply)
I supplied 20 TRX to mint 1999 jTRX tokens
Txn Hash- dbdd17fc0d870bf856d8e2abcfe0a31f0f2a59e144477e09fbee9ca867d4e09e
Consumption of Bandwidth- 284
Consumption of Energy- 80,377
TRX burned to accommodate Energy- 11.2312
Method of calling- Borrow
I borrowed 1 USDT from JustLend.
Txn Hash- 49d753d91ec2c0972703c8b7578d3ba316ac3be003cc2b7ae80ecf21974b3f82
Consumption of Bandwidth- 313
Consumption of Energy- 126,818
TRX burned to accommodate Energy- 17.746
Method of calling- Repayment
I repaid 1 USDT.
Txn Hash- 01ab004c73cd83408845ff975748479984d0bb12f575211be81039c821db37b8
Consumption of Bandwidth- 313
Concumption of Energy- 87 , 314
TRX burned to accommodate Energy- 12.22
(6) How do I avoid burning TRX to accommodate the Energy required for a transaction?
- Go to https://tronlending.org/
- Fill the rental amount and duration, and finally Pay and that is it.
We get 100k energy for 1 day for just 8 TRX. As seen above, that in none of the transactions ( supply, burrows, repay) , TRX burned is less than 8. So this is the cheaper way out.
(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)
Next select the tokens , say TRX and USDT. "From TRX To USDT".
Select amount of USDT. I entered 1 USDT.. For 1 USDT 6.96038 TRX has to be paid.
Click on swap and select authorisation type and complete transaction with the help of TronLink wallet password.
Now let's check for the same on TronScan.
Proof from Tronscan
Consumption of Bandwidth- 350
Consumption of Energy- 40 , 377
TRX burned to accommodate Energy- 5.65
Consumption of Bandwidth- 313
Consumption of Energy- 126,818
TRX burned to accommodate Energy- 17.746
Summary Table
Resource | JustSwap | JUstLend |
---|---|---|
ENERGY | 40376 | 126 818 |
BANDWIDTH | 350 | 313 |
TRX BURNED | 5.65 | 17.746 |
So from above table, we concluded that, bandwidth, energy and TRX burned are more on JustSwap than JustLend. it means burrow function performed on JustLend took more time than swap function on JustSwap because we know 1 Energy - 1 microsecond.
(8) Explore Tronscan(check your own wallet) to identify an "ordinary transfer" & a "Smart-contract-operated transfer"? Indicate the difference between the two?
- Go to tronscan.org
In the main page, a search field is provided at the top, enter your TronLink Wallet Address.
Tron wallet details will be fetched.
Scroll down to look for"Transfer. "Click on Transfer. Two subcategories under transfer are -- TRX & TRC10 Transfer & TRC20 & TRC721 Transfers. click on TRC20 and TRC721. Ordinary transactions are under TRX and TRC10. Smart contract triggers are under TRC20 and 721. However, it is not necessary that all TRC 20 transactions are smart contract triggered.
Other simpler way is to click on transaction, than look for transaction type and click on it, a drop down menu will appear , select " Trigger Smart contracts " .
TRC 20 & TRC 721 transaction
TRX and TRC10 transactions
Ordinary transfer
Smart contract triggered.
Very good attempt. Sir you cover all the questions and give answer to all question in detail. I like your work.
(Worst ) i think it is your mistake bro
Thank you for correction. English is not my native language. I keep learning english every moment. Thank you again.
Always check before posting something
So great of you to have taken time to go through it.
@affable