🤖Keeper Fees

All Avantis orders are executed by a network of decentralized keeper bots.

Dynamic Gas Fee Module

Keepers are bots that pick up transactions sent by users via the Avantis smart contract, and execute them on chain. For this, an execution fee is paid to the keeper upon opening or closing a trade. These fees are directly paid to the blockchain by the keeper, and not to the Avantis smart contract.

In order to ensure fairness for both the keeper (whether this is a keeper run by Avantis or the community) and the trader, we calculate keeper fees dynamically every time a user places a trade or closes it. This ensures:

  1. Keepers are not covering the gas cost of a transaction personally.

  2. The trader is not overpaying for gas.

Keeper Fee in Action

The below screenshot should be a helpful explanation on keeper fees for opening a trade. As you can see below, the "Estimated fee" is the gas fee (42 cents) of including a user's txn to the L2 (in our case, this L2 is Base). As a part of this txn, the user sends the keeper fee (81 cents in this case) to the keeper bot who then executes this transaction as a second step.

Last updated