Reweight Without Reweights (using cumulative deviation)

Thanks, I fixed the typo.

I imagine that the inherent limit to the liquidity in pools other than ETH/FEI likely changes these dynamics.

This is a great point. The PCV will always wield huge market power, since any additional FEI has to be minted through the bonding curve and add to the PCV. I still believe that any mint/burn incentive with burn greater than mint is a net burn that is shared by both buyers and sellers. Even if ETH-FEI were the only place for trading FEI, implementing mint/burn would increase the price for buyers and decrease the price for sellers relative to no mint/burn. But the market power greatly changes how much revenue the PCV can get from the traders by charging higher fees (which may or may not be implemented by burning sellers). Even if the PCV charged say 0.5% per trade instead of the usual 0.3%, sufficiently large traders would still prefer to trade there. The community could have a very productive discussion about how to make use of this market power to provide liquidity while growing PCV.

On a related note, when we think of ways to generate yield using PCV, we should make sure the benefit is greater than the cost of reducing the liquidity provided at the Uniswap pool. And I think Uniswap V3 may have potential to free up a lot of the PCV to be used elsewhere or be diversified.

2 Likes

we could adjust the algorithm to have a shorter time to reweight when we are further from the peg

Agreed! Thinking about how exactly the time to reweight should depend on the price distance, I think we are led to the question: how does a history of past prices map to time to reweight? For example, we would need to decide whether a declining price history of (0.9, 0.8, 0.7) warrants a quicker reweight than an increasing history of (0.7, 0.8, 0.9), and how they compare to (0.8, 0.8, 0.8). The criterion of A(t)>C provides one answer, but it is a very simple one because we are only allowed to tweak two parameters. We could consider richer functional forms as we observe how the market reacts to the simpler mechanisms.

2 Likes

I don’t understand why you think that even if ETH-FEI were the only place for trading FEI, implementing mint/burn would increase the price for buyers and decrease the price for sellers relative to no mint/burn.

Ignore mints for a moment. I’ll argue that just with burns, the price for buyers is as good as without burns. Mints can then only make the price for buyers even better.

I’m going to argue in two scenarios that are easy to think about. Both make a couple of important assumptions: (1) the liquidity pool has $1B FEI in it; (2) the incentivized market is DAI/FEI (to simplify the calculation of the invariant product and prices); (3) the deviation from peg before any trades happen is m_{start} = 0; (4) as claimed in the docs, the burn mechanism is path independent.

The AMM invariant product is k = (10^9)^2 = 10^{18}.

The first scenario will assume that there’s a supply of x FEI that will be sold on the incentivized pool regardless of price. The second scenario will assume that there’s an unlimited supply of FEI that will be sold until the market’s price drops to p.

In the first case, the final deviation from the peg will be

m_{end}(x) = 1 - \frac{(10^9 - x)^2}{10^{18}}

A few relevant examples are m_{end}(1,000,000) \approx 0.002 and m_{end}(10,000,000) \approx 0.02.

We can move forward with a simple version of this proposal, thoughts on tradeoffs between 4, 8, and 24 hour distances between reweights?

My first reaction is that 4 hour is best for the time being, since we may need to relieve a lot of sell pressure quickly. Doing some back of the envelope calculations now.

[updated]

The initial reweight will burn at most 300M FEI from PCV. But the actual number will be much closer to 0, since price will rise as soon as reweights are announced.

Assuming the worst case scenario that we burn 300M FEI in the first reweight, if people exit during the first interval until FEI price is 0.99, a minimum of 4.8M FEI can exit. That is, 4.8M is the amount of FEI that can exit just by trading with PCV if price is 0.99 right before the second reweight.
If this price is 0.95, 24.8M FEI can exit.
If this price is 0.90, 50.9M FEI can exit.

Exits given price levels will be smaller in future reweights.

But these are minimum levels, because as long as there are bots buying at lower prices, many people will be able to sell to these bots.

And even in the off chance that no one buys, I don’t think it makes much sense for people to sell at 0.90 (or even 0.95), if they can wait a few intervals to sell at a price much closer to 1.

I don’t see a reason why any of the intervals may fail to peg. Perhaps the 4-hour interval gives a stronger assurance of frequent reweights. The 24-hour would require people to maintain their exposure overnight if they chose not to sell today. And it may be tricky to set a single time of the day that works for everyone around the globe.

2 Likes

I don’t understand why you think that even if ETH-FEI were the only place for trading FEI, implementing mint/burn would increase the price for buyers and decrease the price for sellers relative to no mint/burn. (SPOILER: after writing this post, I do understand why you think this; you’re right! :wink:)

Ignore mints for a moment. I’ll try to argue that just with burns, the price for buyers is as good as without burns . Mints can then only make the price for buyers even better. I might discover you’re right along the way! In that case I’ll still leave my thought process here for any other skeptics to see.

I’m going to argue in two scenarios that are easy to think about. Both make a couple of important assumptions: (1) the liquidity pool has $1B FEI in it; (2) the incentivized market is DAI/FEI (to simplify the calculation of the invariant product and prices); (3) the deviation from peg before any trades happen is m_{start} = 0; (4) as claimed in the docs, the burn mechanism is path independent.

The AMM invariant product is k = (10^9)^2 = 10^{18}.

1. The first scenario will assume that there’s a supply of x FEI that will be sold on the incentivized pool regardless of price. The second scenario will assume that there’s an unlimited supply of FEI that will be sold until the market’s price drops to p.

In the first case, the final deviation from the peg will be

m_{end}(x) = 1 - \frac{10^{18}}{(10^{9}+x)^2}

I’m omitting the derivation of this because it’s just the standard AMM price calculation. (And after making that statement I sure hope it’s right! :sweat_smile:) For example, m_{end}(10,000,000) \approx 0.02. The key observation is that m_{end}(x) does not depend on how much is burnt. This is because, as is stated in the docs, “The entire trade size including the burn is used to calculate the slippage for the end deviation from the peg.” In other words, in this first scenario, the burn only affects the price that sellers get. The final marginal buying price
1 - m_{end}(x)
is the same whether or not there are burns. The conclusion we can draw from this first scenario is limited: if sellers are not responsive to price, then the final marginal buying price is not affected by burns.

2. The second scenario is more complicated. If there are no burns, the sellers will sell x FEI, where x must satisfy

(10^9 + x)(10^9 - px) = 10^{18}

for fixed p. By distributing and rearranging, we can see this holds if and only if

px^2 + (10^9p - 10^9)x = x(px + 10^9p - 10^9) = 0

The solution x = 0 is meaningless. So we get

x(p) = 10^9 \left(\frac{1 - p}{p}\right)

This leads to a marginal buying price of

1 - m_{end}^{unburnt}(p) = \frac{10^9 - px(p)}{10^9 + x(p)} = p^2,

nicely enough. Now what if there are burns? Then if B(x, m_{start}, m_{end}) is the burn function, x must satisfy

[10^9 + (x - B(x, 0, m_{end}^{burnt}(p))](10^9 - px) = 10^{18} \mbox{ (1)}

The burn function in the docs is expressed as an integral, but in the case when m_{start} is 0, the integral can be evaluated to give

B(x, 0, m_{end}^{burnt}(p)) = \frac{100 (m_{end}^{burnt}(p))^2 x}{3}

We can show with tedious algebra that x satisfies (1) if and only if

x(xp\phi(p) + 10^9p - 10^9\phi(p)) = 0

where

\phi(p) = 1 - \frac{100(m_{end}^{burnt}(p))^2}{3}

Again, the solution when x = 0 is meaningless. So we get

x(p) = 10^9\left(\frac{\phi(p) - p}{p\phi(p)}\right)

where the notation x(p) emphasizes that x depends on p. This leads to a marginal buying price of

1 - m_{end}^{burnt}(p) = \frac{10^9 - px(p)}{10^9 + x(p) - B(x(p), 0, 1-p)} = \frac{10^9 - px(p)}{10^9 + \phi(p)x(p)}

What we’re looking for is an expression for m_{end}^{burnt} in terms of p. The best I can do, by first replacing x(p) with it’s expression in terms of p and \phi(p), then replacing \phi(p) by it’s expression in terms of m_{end}^{burnt}(p), and finally doing a bunch of algebra I’ll spare you, is arrive at a fifth degree polynomial:

\frac{-1000}{9} m^5 + \frac{1000}{9}m^4 + \frac{600}{9}m^3 - \frac{600}{9}m^2 - m + 1 - p^2 = 0

where I denoted m_{end}^{burnt}(p) by m to save space.

Back to the original question. Are buyers better or worse off when the protocol burns? I don’t know! Hehehe! Let’s find out. I let Wolfram Alpha solve this polynomial for me for different values of p. The polynomial has several solutions for each value of p. I always picked the smallest positive solution. Any of the bigger positive solutions gave nonsensical results. Here’s a table of what I found:

\begin{array}{ccc} p & 1 - m_{end}^{unburnt}(p) & 1 - m_{end}^{burnt}(p) \\ 0.99 & 0.9801 & 0.9886 \\ 0.98 & 0.9604 & 0.9819 \\ 0.97 & 0.9409 & 0.9765 \\ 0.96 & 0.9216 & 0.9721 \\ 0.95 & 0.9025 & 0.9681 \\ 0.94 & 0.8836 & 0.9645 \\ 0.93 & 0.8649 & 0.9612 \\ 0.92 & 0.8464 & 0.9581 \\ 0.91 & 0.8281 & 0.9552 \\ 0.90 & 0.8100 & 0.9525 \end{array}

The most unintuitive result for me is that none of the formulas in the second scenario depend on the liquidity in the AMM. If I had to make a bet an hour ago, I would’ve bet that the greater the liquidity, smaller the gap between the burnt and the unburnt marginal buy prices.

That’s a very precise way of saying: you’re right! Burns punish the buyer! In restrospect, your intuitive argument is spot on! I think the conclusions we can draw from this are that direct incentives potentially work to return the price to the peg when sellers will sell x FEI independently of the price of FEI. This assumption probably holds true when FEI is within a fraction of a percent of the peg. However, as deviations from the peg become larger, the amount of FEI sellers will sell depends largely on what price they can sell it at. In this case, direct incentives punish buyers as well as sellers, and thus likely create an obstacle for the restoration of the peg. So a solution like the one you (@fei.saver) are proposing, that triggers reweights when the price hasn’t deviated too much from the peg for too long, should be able to work nicely with direct incentives that are only triggered when the price is a little bit off peg.

ALSO: I figured someone had to abuse MathJax sooner or later! :innocent:

8 Likes

I thought about this a little longer and found something interesting. So on the entirety of the last post I ignored mints. And after I published it I started to wonder whether, with burning, it would be possible to mint enough so that the buy price was as good as without burning, while simultaneously not minting as much as we were burning. So I derived a formula for the marginal burnt sell price at any given deviation from the peg and found the following: the marginal burnt sell price for any choice of p is considerably smaller than the unburnt buy price for that choice of p. I’m including a table with some representative values. The way I’m currently interpreting this is that it is possible to have mint rewards that make the buy price as good as if there weren’t any incentives without those mint rewards being as large as the corresponding burns. I won’t include another derivation unless someone expresses interest. At the moment it’s possible I’m talking to myself on this issue.

\begin{array}{cccc} p & \mbox{ unburnt buy price } & \mbox{ burnt buy price } & \mbox{ burnt sell price }\\ 0.99 & 0.9801 & 0.9886 & 0.9758 \\ 0.98 & 0.9604 & 0.9819 & 0.9497 \\ 0.97 & 0.9409 & 0.9765 & 0.9226 \\ 0.96 & 0.9216 & 0.9721 & 0.8964 \\ 0.95 & 0.9025 & 0.9681 & 0.8696 \\ 0.94 & 0.8836 & 0.9645 & 0.8429 \\ 0.93 & 0.8649 & 0.9612 & 0.8165 \\ 0.92 & 0.8464 & 0.9581 & 0.7899 \\ 0.91 & 0.8281 & 0.9552 & 0.7635 \\ 0.90 & 0.8100 & 0.9525 & 0.7376 \end{array}

Lots of heavy algebra happening here!! If sellers have perfectly inelastic supply (i.e. they always want to sell exactly x amount of the good regardless of the price), they will bear all of the burn, and nothing would change for the buyers. The seller would sell at the same nominal price and pay the burn. This is sort of a corner case, where we have sellers “aping” into the pool to sell so hard that they would sell even if the burn was 99%. The other corner case is when sellers have perfectly elastic supply (your second scenario), in which sellers would now sell until price is p + burn. Here the exact opposite happens and the buyers bear all the burden by paying a higher price.

I think what the fourth column on the table in the last post shows is that when the supply is perfectly elastic, sellers sell until the price is considerably smaller than p + burn. If I understand correctly, the burn is the first column minus the fourth column. So, for instance, when p = 0.95, the burn is 0.0804. In this case p + burn = 1.0304 > 0.9681. In particular, we could incentivize the buy with mints up to the unburnt buy price without minting as much as we would burn in a sale.

If the sellers did that, they should have been willing to accept less than p without the burn, since they are receiving less than p by selling at less than p+burn and then paying the burn!

They didn’t sell at less than p. The marginal price after a large transaction on uniswap can be lower than the average price of the the transaction. This is true even in the unincentivized case. In that case, the largest possible sell starting at peg with average price p leaves the market at marginal price p^2 < p.

But why would the seller ever sell at marginal prices below p? He should sell so that after the sell, the market price is exactly p, rather than selling more so that his average price is p.

Really loved this idea. Had to read it a few times to understand it more clearly. I shared it on the governance channel with hope that others will take the time to go through it.

1 Like

Hmm. That’s interesting. So, for instance, I did a 100% preswap on genesis. I would say I paid $3.25 per Tribe on that swap. Your argument is that I paid less than $3.25 for some TRIBE and more than $3.25 on others. But on average I paid $3.25. Similarly, you’re saying a rational actor only willing to sell FEI above $0.99/FEI would not agree to swap x FEI for an average of $0.99/FEI if that leaves the marginal price at $0.9801/FEI because that would mean she sold some FEI below $0.99/FEI. That seems like the wrong model. Ignore the mechanics of Uniswap for a moment. If I’m only willing to sell FEI above $0.99/FEI and find some nutter in the streets that’s willing to pay me $0.99/FEI for every FEI in my possession, would I not? I fail to see what’s different when the buyer’s a Uniswap AMM. I think your model applies if markets were made of infinitesimally small frictionless sales. The larger the liquidity and the smaller the transactions, the better your model fits a uniswap market. But the kind of dumps that we saw compromise the ability of the incentivized pool to keep its peg do not fit your model. A bag with 10M FEI to sell, willing to sell at above $0.99/FEI, might easily, reasonably cause the marginal price to reach $0.9801 even in the unincentivized market.

Mirroring the sentiments of many in discord; these new reweight mechanisms are sorely needed. On a separate note many, and myself included, believe that a form of reweight should be reimplemented ASAP without a DAO/snapshot vote; because reweight, and manual reweight as part of the guardian protocol is already outlined in the whitepaper. Executing elements of the white paper should not require any vote.

3 Likes

@Ferdinand_Fuzzgellan
Thank you for the shout out!

@Inaniel
I agree, this model applies precisely when the traded object is infinitely divisible. But the Uniswap pool is really close to such an ideal market! Tokens are obviously divisible, and sellers can always choose the exact amount that they sell. So if you never want to sell below 0.99 (for example, because your friend has promised to buy from you at 0.99, in whatever quantity you may choose), then you should indeed sell until the market price becomes 0.99. If someone has to sell 10M even if this bring his marginal price to below 0.99, then he is in fact willing to sell at prices lower than 0.99, otherwise he would just sell less.
On the other hand, if there is no liquid market like Uniswap and you need to trade over the counter with some “nutter”, and this nutter says he will buy only if you sell him 10M tokens when you only wanted to sell 9M, then you may indeed have to choose between selling 10M and not at all. Even if you choose to sell, your willingness to accept for those marginal 1M tokens may well have been lower then the average price you received. But in Uniswap, you can always choose to sell 9M.

Great discussion happening here! :clap:

I see FEI works as an insurance company, insuring that you will receive your $1 dollar in maximum every 4/8/24 hours, according to these interesting ideas you are discussing here. If everyone want to redeem at the same time, it is a problem, because we can dive in a spiral death.

In times of high selling pressure, it seems that it is better to go first for something like an undo proposal and a dutch auction with balancer smart poll. Now the system is unbalanced. I may be wrong, but the “reweight without reweights” seems to work well when we are not with this magnitude of sell pressure. As you said, FEI needs to mature, have strong use cases to operate undercollateralized. It would be great to listen what do you think about it.

Kudos! Great proposal. @fei.saver

I think we can all benefit from a interactive demo of this model, to get the intuition of this mechanism.

@Inaniel It sounds like you have the coding skill, are you interested in building a notebook at observable?

I personally would love to do it, but am occupied at this point, won’t be available until weekend.

Thanks. I think a lot of the current sell pressure is there because we haven’t implemented a reweight mechanism yet. If we can guarantee that reweights happen regularly, a lot of people will be happy to hold FEI for a few more days to exit at $1 rather than something like $0.95. Some people who have an immediate need for liquidity will still want to exit right now. But there will be a lot of smart money moving in to buy from these people at $0.95, hold for a few days or even weeks, and make an easy 5% gain with little risk other than a spectacular crash of ETH. This means people can exit at prices pretty close to $1, but PCV is not drained because these people sell FEI to others rather than to PCV. The people who exit will be essentially paying a small interest to others who have no immediate need for liquidity.

I think the undo proposal is a fair way to return the funds to the investors. But if we implement the undo before enabling reweights, a lot of people will exit and drain the PCV. If we enable reweights first and bring the price of FEI closer to $1, most investors will no longer ask for a refund.

3 Likes