PeggedLinearAuction
Last updated
Last updated
The PeggedLinearAuction
fee module builds upon the same core ideas of LinearAuction
but utilizes EIP-1559 and EIP-3198 to peg the execution fee to the current base fee. This fee module calculates the total gas cost of the execution, multiplies it with block.basefee
and uses a price oracle to convert the amount in ETH to the amount of the user specified execution fee token. During the execution window, PeggedLinearAuction
performs a reverse dutch auction similarly to LinearAuction
but over the percentage overhead from the calculated base fee in execution fee tokens. The overhead is represented in basis points (bps), such that 10000 bps corresponds to 100%.
The overhead basis points as a function of time within execution mode is calculated as follows:
The fee function is then:
The input bytes to the onCreateJob
function should follow the structure:
priceOracle
is a contract implementing IPriceOracle
which will provide price data of the token. oracleData
is arbitrary data which can be used by the price oracle.
Note: Price oracles have the purpose of finding the price of the execution fee token in terms of ETH.
Warning: PeggedLinearAuction
is only deployed on EVM chains supporting EIP-1559 and EIP-3198.