The TEA Project’s latest WebAssembly upgrade to Wasmer has allowed us to make major improvements in our billing system. A major impetus for the upgrade is that we wanted the ecosystem to be fair, namely that end-users and app owners pay for the exact resources they use. Up until now we couldn’t calculate billing with exact precision so we could only charge a fixed rate for compute tasks. With our Wasmer upgrade completed, we can now bill precisely according to resource utilization. The rest of this post will go over the billing structure and the responsible parties for transactions on the TEA network. At the end of the article, we hope you’ll come to understand who pays what and where those funds are drawn from.
Four Types of TEA Billing
The TEA Project has two types of billing: charges to end-users who use the TApps and charges the billing to the TApp that uses TEA’s state machine. The description of the billing charges and the revenue destination is as follows.
- Gas fee: End-user pays to the hosting miner(s).
- TApp usage fee: End-user pays to the app.
The gas fee technically goes to the accrued balance before hitting the bonding curves of all the CML miners who were utilized during the transaction. And the TApp usage fee goes to the accrued balance before being sent to the TApp’s bonding curve. If the accrued balance is positive, all of its TApp token holders receive token dividends at the next distribution. If the accrued balance is negative, then al TApp token holders will have their token amounts reduced according to the balance owned.
The following two types of billing are charged to the TApp, specifically to the TApp’s bonding curve.
- Txn fee: TApp pays to the state machine maintainers.
- Memory tax: TApp pays to the state machine maintainers. This payment is based on computing resources consumed as well as state storage used.
The above txn fee and memory tax are the fees paid by the TApp to use the state machine. These two payments go into a collection pool that are paid out at regular intervals to the state maintainers.
For more technical details about the TEA Project’s billing system, please visit our documentation site: