Overview of stability fee parameters, timing, frequency, amounts, management, and updates.
Parameters Governing the Stability Fee
inflationPeriod how long to wait between rounds of applying inflation
inflationRate the multiplier by which the inflation factor is adjusted per
Timing, Frequency, and Amount of Fee
inflationRate is the multiplier by which the
inflationFactor is increased per
inflationPeriod. It is initially set to
1 which leaves it to governance to enable the stability fee later on.
inflationRate as well as the
inflationPeriod, are specified for a given stable token and subject to changes based on governance decisions.
Stability Fee Levied on Balance
Each account’s stable token balance is stored as ‘units’, and
inflationFactor describes the units/value ratio. The Celo Dollar value of an account can therefore be computed as follows.
Account cUSD Value = Account cUSD Units / inflationFactor
When a transaction occurs, a modifier checks if the stability fee needs updating and, if so, the
inflationFactor is updated.
Updates to the Inflation Factor
To apply periodic inflation, the inflation factor must be updated at regular intervals. Every time an event triggering an
inflationFactor update(eg a transfer) occurs, the
updateInflationFactor modifier is called (pseudocode below), which does the following:
- Decide if on or more
inflationPeriodhave passed since the last time
- If so, find out how many have passed
- Compute the new
inflationFactorand update the last updated time:
# inflationPeriods since last update
Changes to Inflation Factor
Desired inflation rates may vary over time. When a new rate needs to be set, a governance proposal is required to update the inflation rate. If successful, the above function is called, which ensures
inflationFactor is up to date, then updates the
Inflation Factor Update Schedule
updateInflationFactor modifier is called by the following functions: