Developer Dividend Project#

Introduction#

This article is a detailed explanation of the principles of OKTC's contract handling fee distribution project (Gas Back).

What is Gas Back?#

Gas Back is a new function added to OKTC v1.6.5.1, 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 OKTC and enrichen the OKTC ecosystem.

The influence of Gas Back on OKTC participants#

OrderParticipant typeActionEffect
1Contract userCall contractNo effect, no additional handling fees will be charged
2Contract deployerDeploy contractGas Back Participate in Gas BackNeeds to register for Gas Back, pay a certain amount in handling feesAfter registering, the contract's handling fees will be proportionally distributed to the deployer
3Validator nodeHandling fee dividendProfit from handling fee dividends will lessen

Rules for calculation of Gas Back handling fee dividend distribution#

split_fee= tx.GasUsed * tx.GasPrice * DeveloperShares

Among which:

  • split_feeA single transaction, the amount of handling fees the contract deployer can distribute out

  • tx.GasUsedAmount of gas the transaction consumed

  • tx.GasPriceGas price of the transaction

  • DeveloperShareshandling 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 isDeveloperShares=0.5account a(Deployer ofcontract A)register to Gas Back function, and setaccount bas withdraw.

Calltx1 ofcontract Ato consumegas=41624,Specifiedgas price=0.1gwei, with account band throughtx1can obtain:

Dividend distribution ratio amount = 41624 * 0.1gwei * 0.5 = 0.000002081200000000 (OKT)