Execution fees

Fees are necessary payments to incentivise an executor to execute a job. The total execution fee is calculated by the corresponding execution module of the job. This amount is split between the executor and the protocol. The ratio in which the execution fee is split is stored in the protocol and is subject to change by rule of the protocol.

The rewarded number of tokens to the executor RexecutorR_{executor} is calculated as follows:

Rexecutor=fee(r1)rR_{executor} = \frac{fee * (r-1)}{r}

And the protocol reward RprotocolR_{protocol} is calculated as:

Rprotocol=feerR_{protocol} = \frac{fee}{r}

Here rr is the ratio stored in the JobRegistry contract and feefee is the calculated execution fee by the execution module. Note that the sum Rexecutor+Rprotocol=feeR_{executor} + R_{protocol} = fee.

Note: The execution fee is always paid by the sponsor. If no sponsor was set duing creation of a job, then the creator (msg.sender) will be set as sponsor.

Last updated