# Pricing Curve(vAMM)

![Pricing Curve of OrderNChaos vAMM](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtdivp3k2xwmx8ysUH8l%2Fuploads%2Fm8jykdNx01UANDxlhTgE%2Fimage.png?alt=media\&token=ab3def8d-43a3-47b6-8cf5-5e3b18cba896)

## Glosary

| Glossary        | Description                                                                                         |
| --------------- | --------------------------------------------------------------------------------------------------- |
| Total Reserves  | Total value of diverse reserve of stablecoins Locked in vAMM                                        |
| Current Supply  | Total supply of `$CHAOS`                                                                            |
| K               | The slope of market price raising and supply increment, Adjustable variable according to the market |
| Market Price    | Current market price of `$CHAOS` on the curve                                                       |
| Floor Price     | The floor price of `$CHAOS` controlled by vAMM, Ajusted by vAMM floor raising mechanism             |
| FSL             | Floor supporting liquidity = `Floor Price * Current Supply`                                         |
| PSL             | Price supporting liquidity = `Total Reserves - FSL`                                                 |
| Floor raise PSL | A threshold set on vAMM to trigger floor price raise, when `PSL >= Floor raise PSL`                 |
| Base PSL        | A target value of PSL when floor price raised                                                       |

## Floor raising algorithm

The intrinsic value of `$CHAOS` changes over time and only ever increases. The floor price can only “ratchet” up, and can never recede.

The floor is encoded in the protocol's AMM price curve.  The spot market for `$CHAOS` allocates its liquidity such that there is always liquidity to pay back `$CHAOS` at the floor price.  Surplus liquidity gets re-allocated into raising the floor for all tokens.

![Floor price of $CHAOS raising over time](https://630714549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtdivp3k2xwmx8ysUH8l%2Fuploads%2FQxkb2iNCSy4VprdiH1HM%2Fimage.png?alt=media\&token=99e9d689-8d06-4131-b8fc-e40e9180d804)

The floor can rise with net buys of `$CHAOS`, since buying `$CHAOS` *adds* surplus liquidity to the AMM.  When `$CHAOS` is being sold off back to the AMM, the AMM is returning its liquidity in payment, and so will not be gaining surplus reserves to raise the floor.

### **When and by how much does the floor rise?**

At the heart of OrderNChaos' protocol is a novel AMM with an adjustable price curve that serves two main purposes:&#x20;

1. To support OrderNChaos' fundamental guarantee that every `$CHAOS` token in circulation can be sold back to the protocol for an advertised minimum floor price while remaining solvent, and&#x20;
2. To provide adequate liquidity around the current market price so that a healthy portion of holders can safely exit their position at any moment without plunging the market price for everyone else.

To this end, a balance must be struck for the price curve to uphold this dual mandate. Before a portion of the reserves is reallocated to raising the floor for every `$CHAOS` token, a minimum amount of liquidity around the current market price must be met. This minimum liquidity as a portion of the total reserve value is defined as **Floor raise PSL**, when this threshold of **PSL** is met, a portion of the reserves is reallocated to raising the floor in an amount that lowers the **PSL** to **Base PSL**. Every time **Floor raise PSL** is met, the floor will be raised by the same algorithm just described.  Currently the default value of **Floor raise PSL** and **Base PSL** are set as follows:

| Variable            | Default Value         |
| ------------------- | --------------------- |
| **Floor raise PSL** | 32% of Total Reserves |
| **Base PSL**        | 30% of Total Reserves |

The act of **raising the floor** comes at the expense of PSL.  Raising the floor is simply taking the liquidity from the PSL region, and distributing it to the floor, causing the floor to rise.

## **Range adjustment algorithm**

The floor is able to rise when the actual PSL ratio hits a specific trigger T%(**Floor raise PSL ratio**).  When it hits this trigger, the system removes X%(**Floor raise PSL ratio** - **Base PSL ratio**) of liquidity from the PSL region, and allocates it to the floor, leaving (T - X)%(**Base PSL ratio**) in the PSL region. &#x20;

The range of `[ Base PSL, Floor raise PSL]` is conditioned by market behavior.  Increases in **PSL** through buys push the range upward.  Time pulls it downward.

* `Floor raise PSL` increase at a rate of 0.25% when `Floor raise PSL` is *hit* &#x20;
* `Floor raise PSL` decreases with *time* at rate of 1% per day.

At the extreme case, the value range stops decreasing when **Base PSL ratio** is equal to min PSL ratio(initially 8%).

### Economic effects

If the market pushes the price higher, the expanse between the floor & spot price will increase.  This effect tracks with the market's sentiment around the risk & value of holding `$CHAOS`.

If the price is not trending up, the time-determined contraction of the PSL ratio will cause the floor to rise nearer to the market price, counterbalancing its downward movement.
