Keepers
Keepers
Keepers do the work of making sure that the KIBT yield is always at the highest possible rate that is backed by existing bonds in the KUMASwap
contract, and that all bonds in the KUMASwap
contract can be bought with the circulating KIBT supply. This is done through relying on keepers to call the following functions:
`KUMASwap.expireBond()` when a bond held by the `KUMASwap` contract has reached maturity but hasn't been bought. This adds the expired bond id to the set of `_expiredBonds` and sets the `KIBT` accrual rate to 0% (corresponding to a yield of 1e27) until all expired bonds are bought.
`KIBT.refreshYield()` when the KIBT rate needs to be updated to reflect that of the bonds held in the `KUMASwap` contract and the central banks bond rates. This can sometimes occur after the central bank oracle rate is updated.
Keeper Incentivization
Keepers can call the refreshYields
and expireBonds
methods in the KUMAKeeper
contract to keep the expired bonds and KIBT yields up-to-date. Through calling these functions when needed, keepers earn rewards and gas reimbursements through ETH stored in the KUMAKeeper
contract. The contract obtains gas prices from a real-time Chainlink gas oracle, which that are used to calculate how much Ethereum to reimburse keepers. To avoid unreasonably expensive gas costs, the KUMAKeeper
limits gas prices to a maxGasPrice
. The KUMADAO
sets the maxGasPrice
and replenishes Ethereum to the KUMAKeeper
contract.
Keeper Failures
Keepers have until the end of the epoch of the expiration of a bond to call _expireBond()
. The time a keeper is given to call _expireBond
can vary considerably (e.g. if one bond expires near the end of an epoch, but another bond expires near the start of an epoch, keepers will have much less time to call expireBond
on the former bond than the latter). The following problems occur if keepers fail to call _expireBond()
within the epoch of the bond expiration:
If the expired bond doesn't generate a clone bond when it is bought using
buyBond
, the buyer will have to burn moreKIBToken
s than if a keeper called_expireBond()
on time.If the expired bond generates a clone bond token, the clone bond has a higher principal than it should have.
Last updated