Modeling the Range Bound Stability System in cadCAD
This article looks at the first iteration of modeling work carried out by the BlockScience team on behalf of OlympusDAO, in order to better understand the impacts and effects of the Range Bound Stability (RBS) system, an automated price stability mechanism (PSM) deployed in OlympusV3. After some background context on the concepts involved, we will describe the work and initial results from the cadCAD modeling and simulation efforts by the BlockScience team. Finally, we will lay out further model extensibility that could be built up by the Olympus community, in order to further the capacity to test and analyze new mechanisms in the OHM ecosystem. (Read more here for further information on cadCAD, but essentially it can be understood as a tool to help us understand and navigate complex systems with data-driven analysis.)
Background on Olympus: What is it, and Why does it Matter to DeFi?
Olympus (OHM) is a decentralized cryptocurrency governed by the Olympus DAO, with the stated aim to serve as a reserve currency for the Web3 financial ecosystem. It proposes to do this through the OHM token, which aims to preserve price stability to act as a reliable medium of exchange. The value of the OHM token is supported by manual and algorithmic treasury operations that mitigate volatility via price stability mechanisms governed by Olympus DAO.
OlympusV1 popularized a novel form of token issuance and distribution via their bond system. These are zero-coupon bonds that effectively offer discounted tokens in exchange for various other assets, from stablecoins to Liquidity Provider (LP) tokens representing various AMM-pooled assets. Observing the trends of ‘mercenary liquidity’, where stakers only provide liquidity for high-yield returns until a better opportunity becomes available (which, for 70 percent of stakers, was about three days), Olympus made a case for Protocol-Owned Liquidity. Liquidity pool trading fees that were previously being free-ridden by speculators chasing high yields were now feeding (often significant) revenue into the Olympus treasury.
While market downturns cleared out much of the speculative mania around the OHM token, Olympus continued innovating with Olympus V2 adding flexible vesting periods for bonds, which would allow for a more dynamic response to market demand. Gauntlet wrote a paper on the OHM bonding mechanism as a potential tool for the inclusion of optimal control mechanisms in DeFi liquidity management and treasury diversification.
“The appearance of optimal control and model predictive control in DeFi appears to have originated in the Ω (OHM) protocol.” - Chitra et al.
Olympus positions the OHM token somewhere between a stablecoin and a price-fluctuating crypto asset. While fiat-pegged stablecoins have become ubiquitous, establishing themselves as a popular liquidity layer across Web3, they still have some significant limitations. The underlying reference currency is often controlled by governments or financial institutions, which means that they can be subject to changes in monetary policy that can lead to depreciation in the value or redeemability of pegged tokens. This creates uncertainty for users who transact using these stablecoins, and may also lead to a loss of purchasing power over time. Olympus aims to solve this problem by creating a decentralized, non-pegged reserve currency that is backed by a basket of assets (50+ unique tokens in treasury, including LP tokens and balancer portfolio tokens), and establish itself as a reserve currency for the Web3 ecosystem.
How does Olympus propose to maintain stability in the System?
Olympus V3 introduced Range Bound Stability (RBS), which lies at the heart of the new chapter of price stabilization of the OHM token. The mechanism operates by automatically executing market operations under specific conditions to absorb volatility in the market price of OHM.
The RBS system is comprised of several mechanisms and parameters, explored further in the Olympus documentation and education materials. In summary, automated market operations operate similarly to ‘guardrails’ on the OHM token price, either buying and burning OHM tokens using reserve assets in the lower (or ‘bid’) cushion, or minting and selling more OHM tokens in exchange for reserve assets at the upper (or ‘ask’) cushion. The upper and lower cushions operate using a Sequential Dutch Auction system, which offers a dynamically increasing discount on OHM tokens until someone executes a swap, at which point the discount resets and continues to increase until the next swap order, as long as the token price remains within the cushion. In contrast, the upper and lower walls act more like market orders, where arbitrageurs can trade directly with the treasury to buy or sell OHM tokens at the stated wall prices.
A percentage of treasury reserves, called the Reserve Factor, are deployed in the cushions and walls of the RBS system to ensure there is sufficient liquidity to protect the token price, without risking draining the entire treasury. If either cushion runs out of available assets, a six-day window is required to reinstate the funds into the Range Bound Stability system, which re-engages at the newly found OHM token price range. The protocol also enacts policies to balance the amount of reserves deployed between liquidity pools and treasury, to ensure sufficient pricing depth on secondary markets.
How Does the RBS System Work?
When the price of OHM exceeds the upper cushion price, a bond market is deployed to sell OHM for reserves. The bond market is closed if the price goes back below the upper cushion price, or if it exceeds the upper wall price in the case that the upper cushion and wall have been depleted. Similarly, when the price of OHM falls below the lower cushion price, a bond market is deployed to buy OHM with reserves. This bond market is closed when the price goes back above the lower cushion price, or if it drops below the lower wall price in the case that the lower cushion and wall have been depleted. Both bond markets are instant-swap with no vesting. Initial parameters for RBS were suggested after some analysis of the OHM ecosystem, and were updated further in OIP-125.
The RBS system uses the 30-day simple moving average (MA) price to determine the target price for OHM, which is how the upper and lower cushion and wall prices are set for the RBS system. The spread from the target price to either cushion currently stands at 7.5 percent, and parameters are configurable through Olympus DAO governance.
In the event that the OHM token target price (given by the 30-day MA) drops beneath the ‘Liquid Backing Price’ of OHM tokens (meaning the price denoted by all liquid reserve assets that are able to be sold to repurchase OHM tokens), the target price in the RBS system changes from the 30-day MA to the ‘Liquid Backing Price’ based on liquid assets held in reserve. The RBS system is designed to automatically execute market operations to absorb volatility and maintain stability in the price of OHM whenever the price exits the range between the cushions.
Initial RBS modeling
The team at Olympus began to model and simulate the various effects of new mechanisms on the OHM token ecosystem in python, producing several reports on their early analysis of the Range Bound Stability system. Ultimately, they wanted to understand how different parameterizations of the RBS system impacted the price, market cap, liquidity, reserves, and volatility of the OHM token, in order to reduce risk to the Olympus treasury. Some of their conclusions included initial parameterizations for the RBS system, as well as suggestions of alternative price stability mechanisms making use of Time-Weighted AMMs (TWAMMs) or Bollinger Bands to dynamically adjust the wall spread based on recent market volatility.
Another of their conclusions was that model functionality could be extended into a cadCAD model where more rigorous simulation and analysis could take place, including Monte Carlo analyses, parameter sweeps, and further post-processing of experiments. One benefit of this type of development is that it allows for modular functionality going forward, so users can swap out different policies or mechanisms to experiment with.
The BlockScience team designed several experimental scenarios to analyze and test the impacts of different vulnerabilities on the RBS system, including a Soros-style currency attack and a panic-selling event. The Olympus team also requested modeling the implementation of OHM Bonds in place of the current OHM staking mechanism, all of which will be discussed further in the next section.
Early Model Analysis & Results
The cadCAD model builds out the foundational infrastructure for different kinds of analysis of the OlympusDAO mechanisms. In this section, we will look at how the model works in more detail and some of the research that has been done with it thus far.
This video gives an introduction to the structure of the cadCAD model, and walks through the Github repo file structure. This will be very helpful information for community members who wish to replicate or extend the experiments and research carried out thus far. The video works through the fundamental concepts of running one's first cadCAD model from single parameter sweep to utilizing cartesian product sweeping to test a wide range of parameter combinations.
Running simulations with different parameters allows one to explore how the system behaves under various conditions, thereby gaining insights into how it might respond to real-world scenarios. By examining the results of these simulations, one can identify potential strengths and weaknesses in the model, and use that information to make improvements or modifications to the system.
Now that we’ve covered the basics of the cadCAD model, we’ll turn to consider a possible currency exploit and how RBS guards against it, a study of OHM bond issuance and its effects on volatility, and a study on the impacts of panic selling with and without the RBS system providing stabilization.
Panic Selling Scenario
Panic selling can be defined as a feedback cycle where a falling price encourages selling behavior, which further decreases the price, which encourages further selling, etc. Various panic-selling scenarios were simulated in this experiment, with behavioral heuristics defined and multiple parameters selected to analyze a range of possible outcomes.
This video delves into further detail on the panic selling scenario modeling, including: What degree of panic selling pressure could pose a risk of the Olympus treasury being drained? Does the RBS system and its parameterization impact the safety of the treasury under these different scenarios? How many times did RBS intervene in a given panic-selling scenario?
Some of the conclusions drawn from the research thus far are that only very extreme (and rather unrealistic) panic-selling scenarios pose a risk of draining the treasury. It was also noted that simply increasing the Reserve Factor (or Bid Factor, which is the percentage of reserves allocated to the RBS system at any given time) works well when there is manageable sell pressure, but is not necessarily going to work when there is extreme sell pressure due to panicked selloffs.
Future research can further explore other factors like Reinstatement Windows (i.e. how often the cushions and walls of RBS are replenished) in the stabilization of the treasury. Alternative non-RBS mechanisms could also be implemented to address strong selling pressure, which would be an interesting area of further exploration using this model. Other further experimentation on this model could be around adding more parameters in defining panic selling, such as a special probability distribution for panic selling to engage, which would more accurately represent how these events might play out in the real world.
Pseudo-Soros Attack
A Soros attack is a form of currency manipulation where pressure is put on a currency via large long and short positions by an attacker, who seeks to profit off of the market instability caused by their actions. Since Olympus is not a pegged currency, this simulation is more of a ‘pseudo’-Soros attack, but we are still interested in whether strategic token positions could take advantage of the RBS system for profit. We will examine scenarios wherein a large token holder tries to influence the price of OHM by buying and selling tokens into the RBS system, to determine if it was possible to profit off of the volatility caused and thus profit off of exploitative trades against the RBS system.
This video explores the simulation that tests the response of the OHM ecosystem in the event that a large token holder takes out a short position on the OHM token and the community responds in either a correlated or anti-correlated direction. A baseline scenario is defined without the short-selling behavior, in order to compare the revenue earned by the short seller to regular buying and selling scenarios, to determine whether the RBS system could possibly be exploited.
Some of the conclusions from this model were that the RBS system seemed to be an effective counter to a large short-selling attack strategy. With the RBS system supporting the price of the OHM token in a downward-trending market, this meant that when short positions had to be closed and OHM repurchased, it was often at a higher price, causing a loss to the attacker. Simulations also demonstrated that tighter constraints on the walls and cushions of the RBS system can be helpful for guarding against this kind of attack.
There are several opportunities to extend this model, for example by combining it with various panic-selling scenarios to provide more realistic system responses to such events. Different attack behaviors could also be modeled and run over large parameter sets, to understand the potential variety of attack surfaces.
Replacing Staking with OHM Bonds
The Olympus team is also interested in exploring the addition of OHM bonds, which would replace the current OHM staking mechanism with an internal bond mechanism. ‘Internal’ OHM bonds would operate very much like ‘external’ Olympus bonds, but with the quote token (i.e. the token used to purchase the bond) denominated in OHM instead of DAI or LP tokens. This mechanism is proposed as a form of liquid interest rate market for the native OHM token. OHM Bonds would reduce the liquidity of the current staking paradigm, and ensure more predictable liquidity around internal bond maturity dates.
This video lays out the further exploration of this topic that was carried out by the BlockScience team in modeling the impacts of OHM bonds on the Olympus ecosystem. The first experiment that was run on the model examined how different bond values and release schedules impact the price volatility of the OHM token, and whether they incurred a risk of draining the Olympus treasury.
Although the bonds did not appear to pose a risk of draining the treasury under the initial run parameters, the face value of the bonds was the largest factor impacting the price volatility, and how much the bonds were front-loaded also had an impact on volatility levels. These outcomes are constrained by the fact that initial runs did not use very large bond amounts. In the next experiment, a larger range for the total amount of bonds could be explored, as well as changing the tenor of bonds (i.e. same starting dates, different release dates). The model could also be augmented with the existing staking mechanism to further inform the relative improvement offered by OHM bonds versus the current system as a baseline.
A second experiment was run to determine whether bonds of more extreme face values (i.e. how much the bond is worth at maturity) or different tenors (i.e. same starting date, but differing time to maturation) would impact the price volatility of the OHM token or risk draining the treasury. We found that for very high face value, bonds are much more likely to pose a risk of draining the pool. In a more reasonable face value range, we also introduced the alternative feature of "max_single_bond_value" which predicts the price volatility well. This experiment could be further extended by analysis of the impact of bonds on the net flow of assets in the OHM ecosystem, further randomization of overall market activity, and comparing results with and without the RBS system to better understand the effect it has on OHM bonds.
Conclusions & Next Steps
From these early modeling results, we can conclude that the Range Bound Stability system can be an effective tool to stabilize the volatility of the OHM token by performing market operations using treasury assets. Additional stabilization mechanisms could be further explored, including TWAMMs or Bollinger Bands, or other proposed price stability mechanisms.
One of the goals of this work is to provide a greater deal of extensibility to the legacy model. This cadCAD model can be seen as an upgradeable tool for the Olympus community which can be used to explore different questions and scenarios, helping to make data-driven decisions. A lot of the model development work centered around creating as much flexibility for future research questions, such as generalizing signals that could be used for things like bond disbursements in the future. The approach allows for the separation of different research streams while still utilizing the same underlying core model. For example, the pseudo-Soros attack model uses all the core functionality but adds behavioral substeps to mock up what an exploiter might do. This makes it so that the model can be consistent but still extensible. We look forward to continuing our research alongside the Olympus team to further test and protect against vulnerabilities in OHM ecosystem mechanisms.
More detailed information on the model and associated research can be found on Github:
Github Repo:
https://github.com/OlympusDAO/olympus-digital-twin
Model Analysis:
https://github.com/OlympusDAO/olympus-digital-twin/tree/main/research/20230210%20Exploratory%20Research
Article authored by Jeff Emmett, Hashir Nabi, Sean McOwen, and Zhiwei Li, with edits and publication by Jessica Zartler and Lila Langsford.