This article is a detailed explanation of the principles of OKC's contract handling fee distribution project (Gas Back).
1. What is Gas Back?
Gas Back is a new function added to OKC v188.8.131.52, which supports the proportional distribution of handling fees between block producers and contract deployers. The handling fee for calling a contract is distributed proportionally to the deployer of the contract.
Gas Back aims to encourage more developers to deploy contracts on OKC and enrichen the OKC ecosystem.
2. The influence of Gas Back on OKC participants
3. Rules for calculation of Gas Back handling fee dividend distribution
split_fee= tx.GasUsed * tx.GasPrice * DeveloperShares
split_fee A single transaction, the amount of handling fees the contract deployer can distribute out
tx.GasUsed Amount of gas the transaction consumed
tx.GasPrice Gas price of the transaction
DeveloperShares handling fee dividend distribution ratio, this value is controlled by 2 variables:
- From the system parameters of the Gas Back module, the default value is 0.5, which can be modified by initiating a parameter modification proposal. Usually all contracts are calculated according to this ratio.
- In respects to the Gas Back dividend distribution ratio modification proposal, this proposal can modify the dividend distribution ratio of a single contract. After the entire network votes, the contract will calculate the dividend distribution ratio according to the new specifications, in place of the system parameters which will no longer be used to calculate the dividend distribution ratio.
- This proposal can be used to either lower（≥ 0）or raise（≤ 1）a contract's dividend distribution ratio.
For example, if the system dividend distribution ratio is
account a(Deployer of
contract A)register to Gas Back function, and set
account b as withdraw.
contract A to consume
gas price=0.1gwei, with
account b and through
tx1 can obtain:
Dividend distribution ratio amount = 41624 * 0.1gwei * 0.5 = 0.000002081200000000 (OKT)