NEAR Gas Guzzlers
What contracts are users spending the most gas on to use? How has this changed over the past week? Past month?
Method :
Using ==near.core.fact_transactions== in order to find the contract and the amount of gas for each transaction, naturally, by adding them up, i can find the largest gas consumer contract.
- gas units in the table are divided by pow(10,12), which is the unit of Tgas.
- transaction_fee is in yoctoNEAR and divided into pow(10,24) in the table and it can be measured as NEAR.
Introduction : How is gas fee calculated in NEAR blockchain?
-
Gas units:
internally, transaction fees are not calculated directly in NEAR tokens, but instead go through an in-between phase of "gas units". The benefit of gas units is that they are deterministic – the same transaction will always cost the same number of gas units.
-
Gas price:
gas units are then multiplied by a gas price to determine how much to charge users. This price is automatically recalculated each block depending on network demand (if previous block is more than half full the price goes up, otherwise it goes down, and it won't change by more than 1% each block), and bottoms out at a price that's configured by the network, currently 100 million yoctoNEAR.
-
Attached Gas :
Gas units are based on computational complexity for a given operation, which can be affected by a smart contract's state. This is hard to predict ahead of time. And gas price is adjusted each block based on how busy the network was during the previous block, which is also hard to predict ahead of time.
In fact, given that the gas price could be adjusted slightly while operations are being applied , a slight amount extra is attached, and any beyond what's necessary gets refunded.
What contracts are users spending the most gas on to use?
In the charts below, we can see which contracts have consumed more gas(Tgas) and fee in ⓃNEAR, as can be seen from the bar chart the top 5 are:
1.auora : 2.11B Tgas consumed and Burned 210,000 NEAR for Transaction fee
2.app.nearcrowd.near (NEAR Crowd allows users to earn Near by performing simple tasks) : 381M Tgas consumed and Burned 37,000 NEAR for Transaction fee
3.v2.nearapps.near : 2.11M Tgas consumed and Burned 9,939 NEAR for Transaction fee
4.v1.nearapps.near: 63.8M Tgas consumed and Burned 6,127 NEAR for Transaction fee
5.x.paras.near (NFT Marketplace for Digital Collectibles on NEAR): 63.6M Tgas consumed and Burned 6,233 NEAR for Transaction fee
How has this changed over the past Month?
The changes in the last month have been interesting, still aurora and NEAR Crowd have the most gas consumption.
but in the next ranks there have been changes in the past month, Zomland (a Play-To-Earn NFT game on near) and Price Oracle (a decentralized Oracle on near) and The NEAR-Bridge has been of interest.
in the last month, the 5 contracts that have consumed the most gas are:
1.auora : 100M Tgas consumed and Burned 9,911 NEAR for Transaction fee
2.app.nearcrowd.near : 18M Tgas consumed and Burned 1,820 NEAR for Transaction fee
3.zomland.near : 4.7M Tgas consumed and Burned 457 NEAR for Transaction fee
4.priceoracle.near: 3.8M Tgas consumed and Burned 373 NEAR for Transaction fee
5.client.bridge.near : 3.7M Tgas consumed and Burned 375 NEAR for Transaction fee
How has this changed over the past Week?
As can be seen in the weekly chart below, we haven't changed much compared to last month.
What can be noticeable in the weekly statistics is the interest of Wrapping NEAR (wrap.near contract) and placing Ref Finanace (a decentralized exchange in NEAR) in the sixth place.
In the last week, the status of 5 high-use contracts was as follows :
1.auora : 29M Tgas consumed and Burned 2,894 NEAR for Transaction fee
2.app.nearcrowd.near : 5M Tgas consumed and Burned 489 NEAR for Transaction fee
3.zomland.near : 1.2M Tgas consumed and Burned 124 NEAR for Transaction fee
4.priceoracle.near: 970K Tgas consumed and Burned 95 NEAR for Transaction fee
5.client.bridge.near : 812K Tgas consumed and Burned 80 NEAR for Transaction fee
As shown in the opposite table, Function Call of the contracts consumed the most Gas.
after that, Transfer tokens consumed the most gas, and Stake tokens consumed less gas than others and were not popular.
Conclusion :
- It is clear that aurora consumes the most gas in the NEAR blockchain, followed by NEAR Crowd, which consumes the most gas in the network.
- In the past month, on June 28 and 29, gas consumption reached 2 million units.
- Over the past week and month, Zomland (a Play-To-Earn NFT game on the NEAR) has been trending upward.
- Function calls (interacting with contracts) consume the most gas in the NEAR blockchain