NEAR Gas Guzzlers

    What contracts are users spending the most gas on to use? How has this changed over the past week? Past month?

    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...

    Transaction fees

    Each transaction takes some amount of bandwidth to be included in the block and computation to be executed. Both of these resources are combined into a unified measure called “gas” that Validators must spend to execute a transaction.

    NEAR uses WebAssembly Virtual Machine (VM) to execute transactions and provides a mapping from each VM operation to the amount of gas it spends. The goal for gas is to represent a unified measure of resources spent to receive, execute, and propagate a transaction on default hardware.

    Users who want to send such a transaction must pay a transaction fee, which is computed based on the amount of gas that the transaction will require multiplied by the current gas price.

    Gas price is defined systemwide and changes from block to block in a predictable manner. Specifically, if the previous block used more than ½ of the gas limit for that block, the gas price is increased by a small margin. Otherwise, the gas price will decrease. There is also a minimum gas price which provides a floor for the price.

    Minimum gas price is selected to provide a cheap transaction price for users and developers, with the expectation of collecting ~0.1 Ⓝ per full chunk (part of the block from a shard, see Nightshade for more detail). This is designed to make blockchain usage more accessible. Instead of the economy of the scarcity of transaction processing (how it works in Bitcoin and Ethereum), the goal of this system is to hit the economy of scale by increasing the number of shards.

    Validators when including transactions do not use fees for ordering, instead, there is a deterministic ordering based on transaction hash. As explained in the “Issuance” section, fees that are collected from transactions are burned instead of being redistributed within the network of Validators.

    This is done for a few reasons:

    • In the Proof-of-Stake network, every validator does the same amount of work by executing and validating transactions; the block producer is not all that special to be rewarded. In the case of a sharded network, it’s even more complicated to distribute these fees, as there are also receipts between shards where gas is bought when a transaction arrives but executed by different Validators.
    • Validators are still incentivized from burning transaction fees as that directly increases their yield. For simple example, let’s say total supply is 100, 50 of which is staked. Let’s 5 tokens are paid in epoch reward, then if there are no fees – yield is (55/105)/(50/100)-1~=4.76%. While if there were 5 tokens of fees burned, yield would be (55/100)/(50/100)-1~=10%.
    • This also incentivizes locking of tokens in other applications by offsetting the issuance.

    Methodology

    I used flipside_prod_db.mdao_near.transactions table to find contracts and the amount gases users are spending to use the contracts.

    I will compare the results with the actual graphs from .

    In the following, I will try to find the daily used gas and the all-time most gas-used contracts and compare them with the related graphs from the official Near explorer. We can see that the results are the same for both graphs, which shows we find the results accurately.

    The following graph shows the all-time top ten contracts with the most gas used.

    Aurora is the first contract in the case of used gas. The second one is the Nearcrowd, and the third and fourth are Nearapps versions one and two.

    In following, I will try to give a brief definition of some of the top contracts.

    Aurora

    Aurora is an Ethereum Virtual Machine created by the team at the NEAR Protocol, delivering a turn-key solution for developers to operate their apps on an Ethereum-compatible, high-throughput, scalable and future-safe platform, with low transaction costs for their users.

    Nearcrowd

    NEAR Crowd is a service that allows people earn Ⓝ by completing small tasks. While tasks are provided and funded by a centralized entity, called the Requestor, NEAR Crowd significantly limits the power that the Requestor has, and moves the power to the community instead.

    Nearapps

    these contracts belong to deapps on the Near protocol.

    Paras.id

    Paras is an NFT marketplace that focuses on digital collectibles. Paras started with digital art cards that were inspired by real-world trading cards and has expanded its digital collectible marketplace to other kinds of assets.

    ref-finance

    Ref Finance is an automated market maker (AMM) and stableswap marketplace—essentially an AMM specifically for stablecoins—built atop Near Protocol. The platform aims to bring together DeFi tools including a decentralized exchange (DEX), lending protocol and synthetic asset issuer in a "one stop shop".

    The following graph shows the daily number of active contracts, and we have the actual chart from the Near explorer. If we compare the two graphs, we will quickly notice that they show the exact amount that delivers the accuracy of our work.

    In the following chart we will try to find the top ten active contracts in the past 14 days and compare it with Near explore.

    The following chart shows the change in the top ten most used gas contracts during the past week. The chart clearly shows that the Aurora platform we defined before consumes most of the gases, followed by the Nearcrowd platform.

    The following chart shows the change in the top ten most used gas contracts during the past month. The chart clearly shows that the Aurora platform consumes most of the gases, followed by the Nearcrowd platform.

    Also, Aurora has the first rank in the cumulative form of the top ten used gas contracts.

    Also, Aurora has the first rank in the cumulative form of the top ten used gas contracts during past month with about 71 percent.

    Conclusion

    We tried to find the contracts on which users spend the most gas to use and how it changed over the past week and past month.

    Also, we compared the results with the actual amount from Near explorer and found that the outcome is accurate.

    During the past week and month, Aurora, a bridge platform, has the first rank in case of used gas by its users, followed by Nearcrowd, a learn-to-earn platform.

    db_img
    db_img
    db_img
    db_img