Please note this is not a technical document, but mainly describes quota and quota-related topics. Technical details will be introduced in the yellow paper.
The Definitions of Terms:
In Ethereum, transactions have to compete with each other by specifying attractive gas price as transaction fee. The higher gas price the bigger chance the transaction has to be processed by the miner. This is a typical bidding model. In principle, the gap between supply and demand can be effectively balanced by price. However, because it is difficult for users to determine the current supply and demand before bidding, in addition to the impossibility of predicting other competitors, market failure could be caused often. Moreover, since all the competing bids are simply applied to transactions, no effective solution is implemented to allocate TPS resources among accounts. In Vite, a certain amount of quota is consumed when the user initiates a transaction, such as transfer, deploying smart contract, invoking smart contract method, issuing new token, registering SBP, retrieving mining rewards, voting or staking. Vite has designed a quota model to balance between resource supply and demand.
Users are able to acquire quota in two ways:
If the user only needs to send a transaction, he may calculate a
We recommend users to obtain quota by staking.
Different transactions consume different amount of quota. In Vite TestNet, the quota required for various transaction types are as follows:
|Transaction type||Quota consumed|
|Send a transaction without comment||21000|
|Receive a transaction||21000|
|Update SBP registration||62200|
|Revoke SBP registration||83200|
|Retrieve mining rewards||238800|
|Stake for quota||21000|
|Issue new token||104525|
|Mint additional token||69325|
|Transfer token ownership||58981|
|Change token type||63125|
In addition, comment consumes additional quota - 4 quota for zero character and 68 quota for each non-zero character.
For example, given hex encoding is used, to send a transfer transaction with the comment of 0x0001 (having two characters in total while the first is zero and the second is non-zero). The consumed quota is:
Quotas are calculated by the following formula:
In TestNet some are constants,
For the convenience in actual calculation, only
|The maximum number of uncommented transactions can be sent in a snapshot||Approximately equivalent to how much ||Approximately equivalent to how much |
For example, without calculating
Users can obtain quota by sending a stake transaction to built-in contract. When the transaction is received and confirmed, the specified quota recipient account will be granted with the corresponding quota.
The user can obtain an one-time quota by computing a
In the TestNet, we have built a
For example, if
Yes. You need to send multiple staking transactions to different quota recipient addresses. Each staking can have different expiration.
Yes, the staking amount for this recipient will be accumulated. Staking expiration time = height of snapshot block referenced by the response block of last staking transaction + 259200.
Yes. After stake expires, staked
No. However, the stake can be retrieved at any time after it expires.
Quota obtained through staking is related to staking amount and snapshot block height difference during the period in which no transaction has taken place, and continues to be effective as long as the staked
Yes. The received quota is the sum of the staking amount that has applied to this recipient address.
Yes, an individual receiving transaction consumes 21,000 quota.
If you don't have