This article is a detailed explanation of the principles of OKTC’s contract handling fee distribution project (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.
Order | Participant type | Action | Effect |
---|---|---|---|
1 | Contract user | Call contract | No effect, no additional handling fees will be charged |
2 | Contract deployer | Deploy contractGas Back Participate in Gas Back | Needs 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 |
3 | Validator node | Handling fee dividend | Profit from handling fee dividends will lessen |
split_fee= tx.GasUsed * tx.GasPrice * DeveloperShares
Among which:
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:
For example, if the system dividend distribution ratio isDeveloperShares=0.5
,account a
(Deployer ofcontract A
)register to Gas Back function, and setaccount b
as withdraw.
Calltx1
ofcontract A
to consumegas=41624
,Specifiedgas price=0.1gwei
, with account b
and throughtx1
can obtain:
Dividend distribution ratio amount = 41624 * 0.1gwei * 0.5 = 0.000002081200000000 (OKT)