# Overview

The AMM is a key module in RAMM. Users can (leverage) trade **`longZCB`** and **`shortZCB`**. When buying a **`longZCB`** token, either from the protocol during assessment or a counterparty post assessment, a user is automatically taking up a junior tranche position of the underlying instrument.&#x20;

The AMM serves to &#x20;

a) aggregate individual decisions that price the risk of an instrument

b) allows participants to speculate or hedge on an instrument’s returns&#x20;

c) in cases where the underlying instrument is a loan, extracting market-driven interest rates.&#x20;

An AMM instance is deployed for each proposed **`Instrument`**, which goes through two phases;

1. **assessment phase:** A positive-sum prediction market where the utilizer is the sole **`longZCB`** issuer and market maker. This is where the managers purchase **`longZCB`** If the managers deem the underlying instrument to have a favorable risk-reward profile. A **`VT`**  holder, who is a passive investor, can "disagree" with the manager if he deems that the risk is underpriced, by buying[**`shortZCB`**](#user-content-fn-1)[^1], thereby relinquishing all potential returns generated by the **`Instrument`**
2. **post-assessment phase**: After the propose&#x64;**`Instrument`** is approved, the AMM morphs into a zero-sum prediction market where any traders can submit limit/taker orders on **`longZCB`** and **`shortZCB`**.&#x20;

{% hint style="info" %}
To prevent certain attacks, there are restrictions set in place when buying **`shortZCB`** tokens. Most importantly, every buyer needs to have invested in and locked its parent vault.&#x20;
{% endhint %}

### shortZCB

The value of **`shortZCB`** is set to be `maxPrice` - the value of **`longZCB`**`.` By buying this token, users can choose to hedge their exposure to the instrument.&#x20;

> Example usage: A borrower proposes a loan with an NFT as collateral. The loan is approved by the protocol. You, a passive vault investor, are bearish on that specific NFT and do not think the borrower will repay once its value plummets. You can purchase shortZCB tokens to hedge against this risk, which will pay off positively when the borrower defaults. If the borrower does not default, you just lose out on some of the profit to be generated from the borrower's repaid interest.&#x20;

**How does shorting work?**&#x20;

<figure><img src="https://3340105099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFXDxq10tgILHm4JAzNTN%2Fuploads%2Fa8Spu05KMlDn0UxcP9NS%2FScreen%20Shot%202023-02-06%20at%204.08.02%20PM.png?alt=media&#x26;token=38daf512-a07a-4025-9ab8-b3f02dc0344d" alt=""><figcaption><p>Example bonding curve for a fixed instrument. Y axis is price, X axis is quantity </p></figcaption></figure>

You can imagine buying **`longZCB`** of (C2-C1) amount as providing collateral with an amount equal to the area labeled with blue. When price of **`longZCB`** is A, a manager would *increment* the price from A to B when he does so, and gain (C2-C1) amount of **`longZCB`**.&#x20;

For a **`shortZCB`** buyer willing to buy the same amount C2-C1 of **`shortZCB`**, he would provide collateral with an amount equal to the area labeled with green, and *decrement* the price from B to A. (Assuming the price of **`longZCB`** was at B). When the redemption price of **`shortZCB`** at maturity is at 0, the entire blue area will be used to capitalize the profit of the C2-C1 **`shortZCB`** buyer.&#x20;

The slope of the curve is the inverse liquidity coefficient, `a`. `a` and the initial price `b` are both determined as a function of proposal parameters when the instrument is proposed and is used to parametrize the AMM during the assessment phase.&#x20;

[^1]:


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://limitless.gitbook.io/ramm/prediction-market-and-amm-technical/overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
