# Deflationary currencies

Last updated

Last updated

Inflation-indexed currencies are the reason for the existence of the Geminon protocol. The initial design of the protocol aimed to create a fourth-generation stablecoin, with a combination of scalability, decentralization, and security superior to existing alternatives, and also resistant to loss of value due to inflation.

Peg value

Despite its name, Geminon's indexed coins do not track any index, but rather use the predicted value of that index for the next period as a reference value. This detail is important since it allows them to be on the inflation curve, instead of behind the curve.

Monotony

Another important difference compared to a simple inflation index is that Geminon's indexed coins are programmed so that their value can never fall against their base currency: in cases where deflation occurs, their value remains fixed to that of the base currency instead of following the decline in the inflation rate, so that in global terms a monotonically increasing value curve is obtained, that is, a purely deflationary currency.

Index prediction

The PredictIndex contract implements a time series forecasting system based on the Holt-Winters non-seasonal linear trend model. In its recursive form, the model is given by two equations for the smoothing of the series and the trend:

$S_n = \alpha X_n + (1 - \alpha)(S_{n-1} +
T_{n-1})$

$T_n = \gamma (S_n - S_{n-1}) + (1 - \gamma) T_{n-1}$

Where $X$ is the time series, $S$ the smoothed value of the series, $T$ the trend component of the series and $\alpha$, $\gamma$ the model parameters. The prediction of the time series $S$ at the instant $n+m$ is given by the expression:

$\hat{X_n}(m) = S_n + m T_n$

Target value

The target value is the value that the currency should reach on the index prediction date. It is the conversion of the index value into monetary exchange value (expressed in USD). It is obtained by dividing the prediction value by the base value of the index.

This value also expresses the percentage of inflation accumulated from the date of the period used as the base to the present.

Ramp function

The time series of the consumer price index has a monthly periodicity. If the target value were used directly as a reference value for the currency, there would be sudden jumps in its value once a month, coinciding with the publication of the new inflation data. These sudden price jumps, being predictable, would allow temporary arbitrage attacks against the protocol.

To avoid these types of attacks and generate a continuous price change curve, a linear interpolation function is used that generates a continuous ramp between the last target value and the next one:

Variation limiter

Indexed tokens incorporate a security mechanism to prevent excessive variations in their target value in a given period. Each time the token's target value is updated, the contract checks that the token's target value is within bounds:

Lower bound: the lower bound of variation is given by the monotonicity requirement of the price function. The new target value cannot be less than the current reference value of the coin. If the calculated target is lower, the current reference value is taken as the new target, whereby the reference value is temporarily fixed at the current price.

Upper limit: it is a parameter of the contract, which is established by default at 2% per month. If the new target value represents a variation from the previous target greater than 2%, the limit value is used as the target.

Backup value

The ERC20Indexed contract, which serves as the basis for Geminon's inflation-indexed coins, implements a backup mechanism that allows the tokens to function autonomously, fulfilling their function of hedging against inflation even if nobody updates the values of the benchmark index through the PredictIndex contract.

In case of a normal update, the monthly variation rate is calculated as:

To prevent the backup update from being invoked by taking advantage of the window between the date of publication of the new index data and the update transaction, the PredictIndex contract makes the prediction available for the next two periods, so that it is only considered out of date if two consecutive updates fail. The token contract can start making backup updates only when the second prediction date passes without the index data being updated again, that is, when more than two months go by without updating the values.

The $\alpha$ and $\gamma$ parameters are obtained by optimization, selecting the pair that gives the minimum prediction error for a period for the analyzed time series.

$Y_n = \dfrac {\hat{X_n}} {X_b}$

$\delta_{t,n} = \dfrac {t - t_{n-1}} {t_n - t_{n-1}}$

$y_{t,n} = Y_{n-1} + \delta_{t,n} (Y_n - Y_{n-1})$

$V_n = \dfrac {T_n} {S_n}$

Where $T_n$ and $S_n$ are the trend and smoothing according to the Holt-Winters model described above. If we define a constant backup variation rate $V_0$, in the event that in the following period the values of $T_n$ and $S_n$ are not available, a new variation rate would be calculated according to the expression:

$V_n = \alpha V_0 + (1 - \alpha)V_{n-1}$

The variation rate calculated in this way slowly converges towards the default value. If the underlying index stops updating permanently, after a sufficient number of periods, $V_n = V_0$ will be obtained. The new target value would be calculated each period recursively using the backup rate of change:

$\hat{X}_{n+1} = X_n (1 + V_n)$