# Arbitrageurs Guide

<mark style="color:blue;">**Scenario A**</mark>: Swapping **within Beta Region** where price of stablecoin in other pools are **higher** than that in our FxPool

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6utITMNjJXVJJVMgUpbZ%2Fuploads%2Fva3j3EzxWge3mJOzOQdp%2FScreenshot%202022-10-07%20at%2012.39.29%20PM.png?alt=media&#x26;token=84834cb8-2959-4a65-bd0e-a4a13cec5395" alt=""><figcaption></figcaption></figure>

In scenario A, arbitrageurs can gauge the maximum amount that they can trade such that the stablecoin will not face any price slippage thereby allowing for more accurate estimation of the profits they can gain.

<figure><img src="https://997825278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNhFlKNuknOuWZlAweU6%2Fuploads%2FRXDx2A4lCvGaMjrAva3L%2FScreenshot%202023-12-12%20at%204.29.50%E2%80%AFPM.png?alt=media&#x26;token=e93814bc-5ffb-4b2a-8a01-730512b8eec4" alt=""><figcaption></figcaption></figure>

Given that the initial state of the reserves is 50:50, this implies that there is 500 000 USD worth of each stablecoin in the liquidity pool. This means that the maximum amount that can be swapped such that the price of the stablecoin will follow the existing price oracle will be 240 000.\
\
Let's assume that in this scenario the Price of XSGD on UniSwap = **0.72**

This means that arbitrageurs can swap out **240 000 USDC to 342,857.142857 XSGD** in our <mark style="color:blue;">**FXPool**</mark> and swap out **342,857.142857 XSGD to 246,857.1428571429 USDC** in the <mark style="color:red;">**UniSwap**</mark> pools thereby allowing an arbitrageur to earn a profit of **6,857.1428571429 USDC**.

<mark style="color:blue;">**Scenario B**</mark>: Swapping **within Beta Region** where price of stablecoin in other pools are **lower** than that in our FXPool

<figure><img src="https://997825278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNhFlKNuknOuWZlAweU6%2Fuploads%2F4RDY6J14glasb4r22TBF%2Fimage.png?alt=media&#x26;token=f1b3d6b7-e514-4c74-b5fa-0da1049e18b7" alt=""><figcaption></figcaption></figure>

Using the same understanding in <mark style="color:blue;">**Scenario A**</mark>, there is still an arbitrage opportunity that can be extracted when trading within the Beta Region of the FXPool.&#x20;

Given that the initial state of the reserves is 50:50, this implies that there is 500 000 USD worth of each stablecoin in the liquidity pool. This means that the maximum amount that can be swapped such that the price of the stablecoin will follow the existing price oracle will be 240 000.\
\
Let's assume that in this scenario the Price of XSGD on UniSwap = **0.68**

This means that arbitrageurs can swap out **233,142.8571428571 USDC** to **342,857.1428571429 XSGD** in the <mark style="color:red;">**UniSwap**</mark> pools and swap out **342,857.1428571429 XSGD** to **240 000 USDC** in our <mark style="color:blue;">**FXPools**</mark> thereby allowing an arbitrageur to earn a profit of **6,857.1428571429 USDC**.

<mark style="color:blue;">**Scenario C**</mark>: Swapping **towards the Beta Region** where price of stablecoin in other pools are **higher** than that in our FxPool

<figure><img src="https://997825278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNhFlKNuknOuWZlAweU6%2Fuploads%2FbxnKzrK970QzYpUJEcNl%2Fimage.png?alt=media&#x26;token=655f2434-61d6-4fe8-9440-a1e86d9ffb83" alt=""><figcaption></figcaption></figure>

This scenario is likely to occur given the limited liquidity of XSGD tokens that exists in other AMMs which results in holders of XSGD being subjected to a natural tendency to swap XSGD to USDC even if the price of the asset in the AMM is lower than the value of the underlying asset. Nonetheless, in this scenario, our AMM will encourage arbitrageurs to trade back to the Beta Region where the FX AMM respects the chainlink oracle price of SGD for the underlying XSGD stablecoin.

For instance, swapping out **300,000 USDC** in our FXPool will enable arbitrageurs to earn **301,562.74610586700 USD** worth of XSGD. This means that arbitrageurs will earn **1,562.74610586700 USD** worth of profits.

Furthermore, given that the price of XSGD in other pools is higher than that of our FXPool, arbitrageurs can maximise their profits by swapping their XSGD to USDC.

For instance, let's assume that the price of XSGD:USDC is **0.72**, the XSGD received from trading towards the Beta Region can be swapped out for **310,178.8245660346 USDC** thereby resulting in an overall profit of **10,432.2386383925 USDC**.

\
\ <mark style="color:blue;">**Scenario D**</mark>: Swapping **towards the Beta Region** where price of stablecoin in other pools are **lower** than that in our FXPool

<figure><img src="https://997825278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNhFlKNuknOuWZlAweU6%2Fuploads%2FlgyLMKy31kMsBatOfsLJ%2Fimage.png?alt=media&#x26;token=5d807be7-9102-41bd-9e4c-27002eb99fda" alt=""><figcaption></figcaption></figure>

Similar to <mark style="color:blue;">**Scenario C**</mark>, in this scenario, our AMM will reward arbitrageurs to trade back towards the Beta Region where the FX AMM follows the the chainlink oracle price of the SGD for the underlying XSGD stablecoin.

For instance, swapping out **300,000 USD** worth of XSGD in our FXPool will enable arbitrageurs to earn **301,562.74610586700 USDC**. This means that arbitrageurs will earn **1,562.74610586700 USD** worth of profits.

Furthermore, given that the price of XSGD is higher in other pools as compared to the FXPool, arbitrageurs can maximise their profits by swapping their XSGD to USDC.

For instance, let’s assume that the price of XSGD:USDC is **0.68**, the USDC received from trading towards the Beta Region can be swapped for **310,432.2386383925 USD** worth of XSGD thereby resulting in an overall profit of **10,432.2386383925 USD** worth of XSGD.
