> For the complete documentation index, see [llms.txt](https://docs.ees.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ees.xyz/fee-modules/linearauction.md).

# 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:

```solidity
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`.

<figure><img src="/files/jnpsBdMAXGg1suqBrxqW" alt="" width="563"><figcaption><p>Abstract graph of the fee function.</p></figcaption></figure>

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) = \frac{(maxFee  - minFee) }{executionWindow - 1} \cdot (t - executionTime) + minFee
$$

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