I’m glad we are having discussions around the sigmoid function, because there are clearly a lot to talk about here and I don’t think we settled on a solution as a community. I’m going to walk through why I think the current rebase function is imbalanced, and the sigmoid will be too. I will also propose a new function for rebase based on the properties I think we as a community want. Notably, given some changes in market cap we do not want to favor expansion or contraction. That is my designing premise for this rebase function, and when I thought about this and I realized why the history of AMPL has spent more time in contraction than expansion. First lets talk about the problem.
Since February 28, 2019, Ampl market cap has grown from about $10m in market cap to about $120m as of writing, so we have a >10x net growth in market cap. Now lets take a look at the number of rebases in each category (from ampltools.com)
48% of all rebases have been negative, and only 30% have been positive. That means we have had over 50% more negative rebases than positive rebases Yet the supply has increased over 10x during that time… I think this is strange and hints at a big problem with how we rebase. Lets dig in.
Linear function was used to make no assumptions about how supply changes should change, but in fact there was a hidden assumption. Now a linear function is the simplest function and easiest to understand. Looking at a graph, it looks symmetrical , but for this use case it is not . This is because while price can go above 100% price target, the price can never go below 100% of the price target. This creates a lopsided supply adjustment curve, and during periods of supply shocks, whether increasing or decreasing, the supply changes are lopsided towards growth.
Lets take an example, price of AMPL goes to +50% price target, that represents a 50% market cap gain, and results in a 5% first daily rebase. The flips side is -50%, and that results in a 50% market cap loss, and the supply contracts 5%. This seems symmetrical and one might think time in growth and decay on average should be about the same. Now what if we go +100% price target, to about 2$? This means that the supply changes 10%, trying to quickly respond to the change in demand. Now what if we need to correct back down to the previous market cap? Well, the price cant go to 0 for a 10% negative rebase, what gives?
There’s something deeper here, and that if the supply increases 10%, that corresponds to a 100% increase in market cap at the price target, and that means if we want to correct back down to previous market cap, we only need to reduce the market cap by 50%. Therefore it would make more mathematical sense to have this match, the rate of change of supply should be proportionally the same to what it would take to return the previous market cap after expansion . So if the supply increases 50%, the rate of change of supply expansion should match the rate of supply contraction if the market cap decreases 33%. NOTE this is exactly how fixed supply market caps change! 50% increase in price requires a 33% decrease to return to previous market cap . The difference with AMPL is we have rate of change of supply to add to the equation, but that rate of change should be proportionally similar to how the marketcap changes in standard tokens if we really do not want to make assumptions about how the supply should change.
I took this principle and tried to formulate it, and here are my conclusions:
Lets assume x = VWAP / target like @Naguib mentioned in his proposal. So for a 50% price increase from target, that results in a value of 3/2. To return to the market cap before the price increase, e.g, target * supply, we need the price to decrease 33%, or multiplied by a scale factor of 2/3. So therefore ideally this function would have the following property:
F(x) = F(x^(-1)) for 0 < x < inf
x can never go to 0, because VWAP is a price. Alright lets plug this bad boy into wolfram alpha
Boom there we go thanks Wolfram. So the function that holds this property is |log(x)|. Now lets multiply that by a linear constant a. And then we have:
x = VWAP / Target
F(x) = a * | log(x) |
Now as a community we have to decide that is the appropriate value for a, this basically represents the speed at which our rebase will happen. Perhaps we can choose it based on what minimizes the difference form our existing rebase function? But this is math and modeling that I would have to dig into a bit more.
Before I close up, lets take a look at the graph:
So as expected, when there is no need for a rebase (x → 1) | log(x) | is 0. As the price gets closer and closer to 0, the rebase factor goes up very quickly to account for the much smaller market cap. What happens as price increases to very high levels? There is no cap on the supply expansion! The rate of expansion goes up proportionally with market cap, so as the price increases it takes relatively more of an increase to affect the rebase factor, fixing a critical flaw with the current rebase function design.
I think this good because:
- Governanced Minimized There is only one parameter we need to tune, a. (Correction… two, see below)
- Symmetrical with Market Cap Expansions in supply in response to market cap change happen at the same rate up or down, unlike our current function
- Still Simple in Design Its following one core property, rate of change up should match rate of change down relative to market cap. Harder to calculate in your head, but relatively easy to understand why it was chosen.
Thoughts? And please give some recommendations for initializing the parameter a if you are inclined to do so.
I figured out the full formulation to make F(x) return a scale factor that can be multiplied by supply, e.g:
S’ = S * F(x)
Where S is current supply and S’ is rebased supply.
F(x) =max(b, 1 + a * log (x) )
So I lied, there is an additional parameter b that represents the contraction cap. Hopefully we never get there, but that represents as the price gets so ridiculously low what is the maximum we should be able to contract, since going to 0 or below makes absolutely no sense. I went back to my boy Wolfram:
With a = 0.3 and b = 0.5
UPDATE 2: Removed the sign / absolute value functions from the final formula because they cancel each other out
UPDATE 3: @G-Yes95 had a good suggestion for a expansion cap, which makes sense since we have a contraction cap. We can add a expansion cap c that is symmetrical to contraction cap b by taking the reciprocal, because if you multiply something by b, you can undo that change by multiplying it by b^(-1).
b^(-1) = c
This is based on our original note that we are designing this formula to shrink at the same rate that we grow. So for example if b = 0.7, our expansion cap would be 1.4285.
F(x) = min( max( b, 1 + a * log(x) ), b^(-1) )
For a = 0.3, b = 0.7
Alternatively we could cap it based on what price we want it to stop influencing the supply adjustment curve. This would mean if b = 0.7, c = 1.3 since the rate of change of supply (in this case it is 0.3) is set to be equal to its inverse. In this example:
F(z) = b = 0.7, z = 0.367879, F(z^(-1)) = c = 1.3
In my opinion either have good arguments for them, but I’m not sure which one is more optimal.