Commissions on TON

Commissions on TON

The Daily TON

Recently, we’ve received a question from our subscriber desiring to know more about fees on TON. We thought it would be a great idea to look into this matter and create a couple of educational posts.


First, every TON user should keep in mind that commission depends on many factors. According to the docs, commissions on TON are calculated by this formula:


transaction_fee = storage_fees + in_fwd_fees + computation_fees + action_fees + out_fwd_fees


storage_fees is an amount you pay for storing a smart-contract in the blockchain. In fact, you pay for every second the smart-contract is stored in the blockchain. Your TON wallet is also a smart-contract, which charges the rent every time you receive or send a transaction. 


in_fwd_fees is a charge for importing messages from outside the blockchain. Before processing any message, it must be delivered to the validators of the final shardchain. Every time you make a transaction it must be delivered to those validators who will process it. For example, each transaction you make with your wallet app (like Tonkeeper) must first be delivered among validation nodes.


computation_fees is an amount you pay for executing code in the virtual machine. The virtual machine receives the input parameters from the sent message and executes the smart-contract code. The more instructions will be executed, the more commission will be. For example, each time you send any transaction with your wallet (which is a smart-contract), you execute the code of your wallet contract.


action_fees is the fee for processing the list of actions received after the smart-contract code execution. With this process, outgoing messages are sent to other smart-contracts or other visible actions made in the blockchain.


out_fwd_fees – stand for a charge for sending messages outside the TON Blockchain to interact with off-chain services (e.g., logs) and external blockchains. The charge goes to the validators of the final shardchains. Not used since not implemented.


All commissions are nominated and fixed in a certain gas amount, but the gas price itself is not fixed (currently, 1 gas unit costs 1000 nanoTONs). The gas fee, as many other parameters on TON, is configurable* and may be changed by a special vote made in the mainnet. Changing any parameter requires getting two-thirds of the validator votes.


Does it mean that one day gas may become 1000 times higher or even more? Technically, yes, but in fact, no. Validators receive a small fee for processing transactions, and making higher commissions will lead to a decrease in the number of transactions which will make the validating process less beneficial. That’s why there is no point in increasing the fees. 


Commissions on TON are difficult to calculate in advance, as their amount depends on transaction run time, account status, message content and size, blockchain's network setting – and also on many variables that cannot be calculated until the transaction is sent. And that is why NFT marketplaces usually take an extra amount of TON just in case and return it later


It’s important to keep in mind that on TON you pay for both the execution of the smart-contract, and for the used storage (bytes*second). It means you have to pay the rent for having the TON wallet (usually it is very-very small). However, if you have not used your TON wallet for a significant time, you will have to pay a significantly larger commission than usual


The average number of TON transactions per second, according to tonmon.xyz, is currently 1.4, but fees, unlike on other blockchains, will stay the same if this value increases significantly. According to the official TON website, blockchain is capable of performing millions and, if it becomes necessary, tens of millions of transactions per second, thanks to sharding support.


Today, every transaction costs about ≈0.005 TON. Even if TON’s price increases 50 times, transactions will remain cheaper than on other blockchains. And do not forget that validators may lower this value if they see commissions have become expensive.


Thanks to our subscriber for this question. We were very interested in learning this very comprehensive aspect of TON. We welcome questions and feedback from all our subscribers via our bot. We are always happy to dive deeper and clarify any points about TON.


*The current gas amount is written in the config file. You can see all the formulas for calculating commissions and their size by this link.


We thank Nick Nekilov and Ivan Nedzvetskiy, the Scaleton’s founder and the Getgems’ developer, for their assistance in the preparation of this post. Special thanks to Dr. Andreas for consulting on commissions on the TON Blockchain.


At copying, please, leave a source link.


@thedailyton


Report Page