Upkeep & Autoclaim
Keepers are Pool users that initiate the transfer and the execution of the period's commits (collectively, a rebalance). This function is known as Pool upkeep.
Upkeep can be performed when one period has passed since the last rebalance.
Upkeep first triggers the transfer, which updates the Pools' internal long and short balances according to the transfer amount
, then the execution of burn commits, which removes funds to escrow at the updated rate, and last the execution of mint commits, which adds funds to the Pool at the updated rate (and mints tokens).
This process is known as the rebalance.
Keepers are paid to perform upkeep. The payment factors for the cost of upkeep, which the keeper is reimbursed, and a tip. The tip is calculated as 5% of the cost to upkeep and increases by 5 percentage points with every block that upkeep remains eligible. The maximum keeper tip is 100%.
The keeper reward is calculated by
where
fixedGasOverhead
is the amount of gas that is unreachable by gasleft() due to an error handling function and is equal to 80195.gasSpent + fixedGasOverhead
is equal to the total amount of gas paid by the keeperb
is the number of blocks elapsed since the pool's updateInterval has passed and is capped at 20 for a maximum multiplier (brackets right of first multiplication) of 2, capping the tip at 100%.
In practice, a Keeper is a bot that monitors the Pool for an opportunity to perform upkeep. Want to run a keeper? Find our implementation on Github or talk to the team about developing your own.
Please note that this section describes the functionality of a feature that has not been implemented yet. Currently, users need to manually claim tokens from escrow.
Autoclaim allows users to get a Pools token directly to their wallet without having to claim it separately from escrow. This is an opt-out feature on the user interface and an opt-in feature on the contract level. Users who wish to save on gas costs may choose to opt out and trade using escrow only.
Autoclaim can be performed by a keeper, known as a Claimer, immediately following a rebalance.
Users pay ahead of the mint and burn to have their claim automated. The payment factors for the cost of claiming, which the claimer is reimbursed, and a tip.
In practice, a Claimer is a bot that monitors escrow for a profitable opportunity to perform autoclaim. Want to run a Claimer? Find our implementation on Github or talk to the team about developing your own.
Last modified 7mo ago