Since our last proposal (and the one Do put forth right after), the Terra ecosystem has continued it’s hockey stick trajectory upwards. The previous proposals have helped increased elasticity to take the UST float from ~$10m to it’s current $2B mark, but the usage of stablecoin and the liquidity and volume in LUNA have continued to increase dramatically. Time for a fresh look at the on chain parameters.
As mentioned on the previous proposal, some of the most heinous attacks on the system can occur when on chain liquidity driven off the oracle price is larger than liquidity off chain. Additionally as the elasticity of the system grows, the profits to be gained from temporary mispricing can also start to get large. Luna validators and holders effectively take the other side of these trades and thus they are important for the ecosystem to protect against. The current oracles update every ~30s, and the 95th percentile price returns on that time horizon are ~30bps. The off chain liquidity curve below is shifted upward by 30bps to reflect this and serve as mitigation against unconstructive arbitrage. As the oracle speeds increase over time, this curve could be shifted down further and allow for more liquidity and a lower min spread for tighter tracking.
We can see below that with a ~3x increase in base pool size and the 30bps buffer, the on chain swap liquidity is still more conservative than the off chain component and offers a margin of safety against oracle attacks.
Off chain trading volumes are up by a factor of 30 since the last proposal. The instantaneous liquidity has increased greatly, as indicated by the plot above, but the increase in volume suggests that the rate at which this liquidity is refreshed has also increased significantly. This brings us to the PoolRecoveryPeriod parameter. Using $350M USD as an estimate of the ADV, setting the recovery time to ~5 minutes would enable roughly as much notional to be traded within 2% of the best on the on chain swap platform.
Additionally, as your favorite IT admin will tell you, for high value systems it’s always worth exploring defense in depth.
One of the scariest attacks on the on chain market goes as follows →
- Bid off chain reference markets up heavily on not too much size
- Oracles report high prices
- Sell a lot of LUNA for UST on chain
- Sell it back down off chain
- Buy a lot of LUNA for UST on chain. End up with more LUNA, diluting other holders
- Repeat
Having higher liquidity off chain vs on chain makes it so that the above attack is unprofitable as it takes more capital to move the price than you can try to exchange on chain. That, of course, is a large part of the analysis above. A further mitigant would be to split out the TerraPoolDelta parameter into TerraPoolDeltaBid and TerraPoolDeltaAsk. In the example above after step 5, TerraPoolDelta is back to being close to zero. This means step 6 - Repeat, can just go again if the conditions are suitable and continue to hemmorage the system.
The on chain trading system is meant to be a means by which to expand and contract the money supply and not as a place of exchange (Terrswap, KuCoin and other exchange platforms that list UST serve that function). Thus there is no reason for the on chain market maker to ‘skew’ back into line once it sees 2 sided flow. This safety hatch is one that should hopefully never need to be hit, but provides another line of defense and some more time for the community to respond in the event on attack.
Summary of the Proposal
- Increase BasePool size to 32,500,000 SDR
- Reduce PoolRecoveryPeriod to 49 blocks
- Split out TerraPoolDelta into TerraPoolDeltaBid and TerraPoolDeltaAsk.
Note: Since we wrote this proposal, the market downturn has destabilized the peg downwards. This proposal is just as necessary for contractions in the other direction to help maintain the peg. Stability of the peg through dramatic movements is necessary (but not sufficient), to the success of UST and the Terra ecosystem in the long run