Range Bound Stability


The Diamonde protocol automatically performs market operations to absorb market price fluctuations of DIA relative to its reserve assets. This system is called Range-Bound Stability (RBS). The original system design operated independently for a single reserve asset and has been deployed to stabilize the price of DIA relative to DAI. The mechanism was originally defined by Zeus et al. in the white paper "Protocol-Enforced Range-Bound Stable Currencies".

RBS involves deploying Treasury reserves in down markets and selling DIA reserves in up markets to stabilize prices. The nature of these actions causes the network to contract and grow to reinforce stability based on market conditions.

Liquidity is a key aspect of the Diamonde system, and the vast majority of DIA liquidity is owned by the protocol. In addition to the market operations performed by RBS, the protocol also has policies to balance the amount of reserves deployed in liquidity and RBS funding to maintain sufficient pricing depth.

Requirements:

Protocol Mandatory Scope

1,Calculate and maintain a moving average price of DIA relative to a specified reserve asset for a configurable duration. The MA price should be updated every system period.

2,Calculate the price floor and ceiling of DIA relative to a specified reserve asset, including "wall" and "buffer" components, based on the moving average price and a configurable spread variable.

3,Allow users to exchange DIA for Reserves at the lowest wall price (WL) and Reserves for DIA at the highest wall price (WH) until the specified capacity of the current wall is reached.

4,The capacity of the lowest wall (bid) in the Reserve shall be the amount of Reserves in the Diamonde Treasury multiplied by the configured bid factor (the percentage of Reserves used by each wall).

5,The capacity of the highest wall (ask) in DIA shall be the capacity of the lowest wall (bid) divided by the highest wall price, scaled by the spread from lowest to highest wall.

6,When capacity is exhausted on either wall, the system shall not allow additional exchanges on that side until it regenerates.

7,When capacity is exhausted on the highest wall (ask), the system shall not restore a new wall with additional capacity until the current price is observed to be below the MA price for X of the past Y system periods, where X and Y are configuration parameters representing the regeneration threshold (X) and the total number of observations (Y). Additionally, the wall shall not regenerate until the configured minimum time has passed.

When the current price of DIA relative to the reserve asset is greater than or equal to the system-period upper buffer price, deploy the bond market to sell DIA for reserves with a capacity equal to the configured percentage of the upper buffer capacity used for buffering.

If the bond market is active during the system-period, the system should close the market when the current price of DIA relative to the reserve returns below the upper buffer price or exceeds the upper buffer price.

  • If the upper buffer capacity is exhausted, the bond market should be closed.

  • The bond market should be exchanged instantly with no vesting.

  • The bond market should start at the upper buffer price and have a minimum price of the upper buffer price.

When the current price of DIA relative to the reserve asset is less than or equal to the system-period lower buffer price, deploy the bond market to buy DIA with reserves with a capacity equal to the configured percentage of the lower buffer capacity used for buffering.

If the bond market is active during the system-period, the system should close the market when the current price of DIA relative to the reserve returns above the lower buffer price or below the lower buffer price.

  • If the lower buffer capacity is exhausted, the bond market should be closed.

  • The bond market should be exchanged instantly with no vesting.

  • The bond market should start from the lower limit wall price, and the lowest price is the lower limit buffer price.

Treasury Rebalancing

  • Maintain a configured target percentage of Treasury Reserve assets for reserves in the designated DIA Reserve liquidity pool.

  • The system shall maintain this balance by using Time Weighted Automated Market Maker (TWAMM) orders that execute at configured times and intervals.

  • The system shall check the current percentage of reserves owned by the Treasury in the liquidity pool every system epoch and enter TWAMM orders to correct imbalances that exceed the configured threshold. If an order is active during a system epoch, a determination shall be made whether to close or continue the order before placing a new order.

User Provided Ranges (Ohmies Wall)

  • Allow users to stake DIA, reserve assets, or both to buffer the price to fund the second wall.

  • The stake should be locked at deposit time.

  • Users should be able to unlock their stake, initiating a configurable cooldown period. After the cooldown period expires, they can withdraw their stake.

  • Maintain a target value ratio between the two assets in the pool, providing enough capital for both walls to support the range.

  • The system should incentivize users to balance the ratio to the target by incentivizing them to contribute the combination of tokens that brings the system closest to the target ratio.

  • The target ratio should adjust based on price movement within the range to avoid stakers being diluted by new stakers due to price movement within the range.

  • Allow users to withdraw their stake and receive a system-defined combination of DIA and the reserve asset based on what best helps them correct the target ratio. The system-defined combination of assets prevents manipulation of incentives and circular incentive calculations for withdrawals.

Pay protocol-defined tokens as staking rewards.

Allow the protocol to configure the rewards that are issued each day.

Only users who lock their stake can receive

Last updated