-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Hi,
I’ve been looking into this dynamic weight pools, really interesting.
I wonder what would be the problem of using this alternate approach: leave all weights the same except Ampleforth’s one, which would be the target. I.e.:
Weights: {w_ampl, w_t1 ... w_tn}
*
* Rebase_change: x% (Ample's supply changes by x%, can be positive or negative)
*
* Ample target weight: w_ampl_target =
*
* w_ampl_new = (100+x)/100 * w_ampl
* for i in tn:
* w_ti_new = w_ti
Maybe I’m missing something, but if it works, the advantage would obviously be that it’s much simpler, in particular avoids the need for square roots, which is problematic in Solidity.
If we call y = x/100, before we had:
w_ampl_new = w_ampl * sqrt(1+y)
w_ti_new = w_ti / sqrt(1+y)
while now we would have
w_ampl_new = w_ampl * (1+y)
w_ti_new = w_ti
So if we divide w_ampl_new / w_ti_new, in both cases we get 1+y (which is the supply change), meaning that he proportion between weights will be the same, and I think that’s what we want to ensure in the new approach. In particular, that means that prices will be the same too with the new approach.
Let me know if I’m missing something, and in that case, I would love to get more context of why that original approach with the geometric mean instead of the target was chosen.
Thanks.