# Stablecoin Pricing

<figure><img src="https://4218441614-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FELWhdDzed20vSGIA6D04%2Fuploads%2FGttAKvyhXRJQopS6KU65%2Fa%CC%82sdasdasd.jpg?alt=media&#x26;token=3842b685-5a3e-4dfe-92c1-ba4b939f8884" alt=""><figcaption></figcaption></figure>

In case the price of a stablecoin depegs from 1 USD:

In case the price of a stablecoin depegs from 1 USD:

1. Opening and closing short positions during this time would incur a cost on the collateral based on a spread of 1 USD to the Pyth price of the stablecoin. For example, if the price of the chosen stablecoin depegs to 0.95 USD, opening a position using 1000 of that stablecoin would result in a position collateral of 950 USD based on a price of 0.95 USD, when closing the position, 950 of the stablecoin would be withdrawn based on a price of 1 USD, this is to prevent front-running issues during a depeg since collateral is stored as a USD value and converted to tokens based on the latest price.
2. To ensure that profits for all short positions can always be fully paid out, the contracts will pay out profits in the stablecoin based on a price of 1 USD or the current Pyth price for the stablecoin, whichever is higher.
3. For swaps using the depegged stablecoin, the spread from 1 USD to the Pyth price of the stablecoin will similarly apply.

* Long positions should not be affected though there may be a spread if swapping from a depegged stablecoin into the long collateral needed for the position, e.g. to long VIC, VIC collateral is needed. Alternative swap platforms could be used to execute the swap before opening the long position. The interface should show a warning if there is a large spread for this.
