# Market Lifecycle Example

, "Will it rain tomorrow in London?" setting the Yes and No share prices at $0.50 and $0.50, with

* **Shares Constant Reserve** (SCR): 1,000,000.
* **Yes Pool**: 500,000 Yes Quote Reserve  (YQR). Price is equal to **$0.50**.
* **No Pool**: 500,000 No Quote Reserve (NQR). Price is equal to **$0.50**.

The pools' prices are calculated based on a simple constant product formula:

$$
Price = QuoteReserve / SharesConstantReserve
$$

{% hint style="info" %}
The example's liquidity is artificially low to showcase the price impact and relationship between the two pools. In a real market scenario, the market would have deeper virtual liquidity to allow larger positions yet minimize the price impact.
{% endhint %}

### Trader Opens a Yes Position&#x20;

Trader Alice uses 1,000 USDC to open a **Yes** position with 10x leverage, putting the position's notional value at 10,000 USDC. Based on the constant product formula, Alice receives \~**19,608 Yes shares**.&#x20;

Due to the relationship between the Yes and No pool, the position adjusts the pools to the following:

* **Yes Pool**: 510,000 (**+10,000**) Yes Quote Reserve  (YQR). Yes Price is now **$0.51**.
* **No Pool**: 490,000 (**-10,000**) No Quote Reserve (NQR) . No Price is now **$0.49**.
* **SCR** remains constant to maintain the sustainability of the market.

As Alice is the only trader in the market, her position profitability is the following:

* PnL (realizable on demand): **0$**
* Market Resolution Profit: **0$** real profit, or $1,000 in total as **Alice would receive back her collateral.**

{% hint style="info" %}
In a real market, Alice would also receive the entirety of the accumulated Reward Pool upon the market resolution, since she is the only trader with an open position, assuming she bet correctly.
{% endhint %}

### Another Trader Opens a No Position

Peter used 1,000 USDC to open a **No** position with 10x leverage, putting his position's notional value at 10,000 USDC. Based on the constant product formula, Peter receives **\~20,000** **Yes shares**.&#x20;

Due to the relationship between the Yes and No pool, the position adjusts the pools to the following:

* **Yes Pool**: 500,000 (-**10,000**) Yes Quote Reserve. Yes Price now equals **$0.50**.
* **No Pool**: 500,000 (+**10,000**) No Quote Reserve (NQR). No Price now equals **$0.50**.
* **SCR** remains constant to maintain the sustainability of the market.

Alice's position PnL is now the following:

* PnL (realizable on demand): <mark style="color:red;">-$196.00</mark>
* Market Resolution Profit: $1,000 real profit, or $2,000 in total as **Alice would receive back her collateral + the entire opposite sides' collateral.**

Alice's PnL calculation follows a simple formula:

$$
\text{Stake Returned} = \text{Trader Shares} \times \left( \frac{\text{Quote Reserve}}{\text{Shares Constant Reserve}} \right)
$$

Peter's position profitability is as follows:

* PnL: **$0**
* Market Resolution Profit: **1,000$** real profit, or **$2,000** in total inclusive of his collateral collateral.

### Trader Closes Negative PnL position

Alice decides to close her position, which has a negative PnL. The pools get adjusted to the following:

* **Yes Pool**: 490,196 (-9,804) Yes Quote Reserve. Yes Price now equals \~$**0.490196.**
* **No Pool**: 509,804 (+9,804) No Quote Reserve (NQR). No Price now equals $\~**0.509804**.
* **SCR** remains constant to maintain the sustainability of the market.

Peter's position profitability is as follows:

* PnL: <mark style="color:green;">+$196.00</mark>
* Market Resolution Profit: **+$196.00** real profit, or **$1196,00** in total inclusive of his collateral collateral.
