LinearAuction

The LinearAuction fee module creates a reverse dutch auction upon time of execution of a job. The input bytes to the onCreateJob function should follow the structure:

address executionFeeToken;
uint256 minExecutionFee;
uint256 maxExecutionFee;

The executionFeeToken field is the token which execution fee will be paid in. During the auction period, the execution fee will grow linearly every second from minExecutionFee to maxExecutionFee.

More precisely, the execution fee can be calculated as follows, where t is the number of seconds the job is within the execution window:

fee(t)=(maxFee minFee)executionWindow1(texecutionTime)+minFeefee(t) = \frac{(maxFee  - minFee) }{executionWindow - 1} \cdot (t - executionTime) + minFee

Here fee(t)fee(t) is the execution fee and tt is the UNIX time in seconds of the execution (measured as block.timestamp in the contract). This is not to be confused with executionTimeexecutionTime which is the time from which the job can be executed.

Last updated