You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the x/mint module calculates the token issuance (affected by inflation) based on block times i.e., users need to calculate how many blocks they will have in a year which is influenced by block times.
Proposal
To improve consistency and predictability in token issuance, we propose migrating away from block-based issuance and adopting time-based issuance using epochs in the x/mint module.
Currently, we use BlocksPerYear param to calculate the provisions for a block and to determine the rate change for inflation. This should be adjusted to epochs time intervals rather than blocks per year. Define the duration of each epoch and adjust the issuance calculation accordingly.
Steps to follow:
Modify the issuance calculation logic in the x/mint module to use time-based metrics instead of block numbers.
Implement a mechanism to calculate issuance on a per-epoch basis, considering factors such as target inflation rate, epoch duration, and total time elapsed.
Define epochs on-chain timers that execute at fixed time intervals (e.g., days, weeks, months) to serve as the basis for calculating token issuance. We register the logic to be executed at the timer ticks.
Set module hooks: on hook receiver function, we need to filter epochIdentifier and only do executions for only specific epochIdentifier. Filtering epochIdentifier could be in Params of modules so that they can be modified by governance.
NOTE: Every timer has a unique identifier. end time = start time + timer interval.
Eg:
likhita-809
changed the title
migrate away from blocks influencing issuance
x/mint: Migrate away from blocks influencing issuance to use epochs
Apr 4, 2024
Summary
Currently, the x/mint module calculates the token issuance (affected by inflation) based on block times i.e., users need to calculate how many blocks they will have in a year which is influenced by block times.
Proposal
To improve consistency and predictability in token issuance, we propose migrating away from block-based issuance and adopting time-based issuance using epochs in the x/mint module.
Currently, we use BlocksPerYear param to calculate the provisions for a block and to determine the rate change for inflation. This should be adjusted to epochs time intervals rather than blocks per year. Define the duration of each epoch and adjust the issuance calculation accordingly.
Steps to follow:
NOTE: Every timer has a unique identifier.
end time = start time + timer interval.
Eg:
The text was updated successfully, but these errors were encountered: