Quicksilver
Search
⌃K
▶

Epochs Module (Osmosis)

Osmosis’s epochs module defines on-chain timers, that execute at fixed time intervals. Other SDK modules can then register logic to be executed at the timer ticks. We refer to the period in between two timer ticks as an "epoch".
Every timer has a unique identifier. Every epoch will have a start time, and an end time, where end time = start time + timer interval. On Osmosis mainnet, we only utilize one identifier, with a time interval of one day.
The timer will tick at the first block whose blocktime is greater than the timer end time, and set the start as the prior timer end time. (Notably, its not set to the block time!) This means that if the chain has been down for awhile, you will get one timer tick per block, until the timer has caught up.
The Quicksilver development team used the Epochs Module as it is, with some parameter changes to better suit the protocol’s needs.