Parity Stability Module
General Design
The Parity Stability Module (PSM) is a mechanism designed to maintain the stable value of the $oUSD token (fixed at 1:1 ratio).
It acts as a bridge between $oUSD and other stablecoins (e.g., $USDC, $USDT). Every issued $oUSD is always backed by stablecoins held within the PSM. This means the value of $oUSD is supported by the value of more stablecoins.
Detailed Design
// is stablecoin has a 1:1 ratio with USD
type Stablecoin struct {
// denom of stablecoin
denom string
// limit total stablecoin module support
limitTotal sdk.Int
// price is the amount of stablecoin to exchange for 1 unit of nomUSD (very close to 1)
price sdk.Dec
// fee swap stablecoin to $nomUSD
feeIn sdk.Dec
// fee swap $nomUSD to stablecoin
feeOut sdk.Dec
}
Params
The PSM module will need to set these params:
type Params struct {
// limit total token $nomUSD mint
limitTotal sdk.Int
// acceptable price deviation without affecting the supply and demand of the token pair
acceptablePriceRatio sdk.Dec
}
More details on the AcceptablePriceRatio:
For example acceptablePriceRatio = 0.001 :
- case 1 price 0.99USDT = 1 nomUSD:
ratio = 1-0.99 = 0.01 > acceptablePriceRatio
This requires fee in support.
- case 2 price 0.9999USDT = 1 nomUSD:
ratio = 1-0.9999 = 0.0001 < acceptablePriceRatio
This is a great price.
Flow
Add a stablecoin ($USDT, $USDC) via gov
Exchange stablecoins for $oUSD: Users can exchange accepted stablecoins (such as $USDT, $USDC) for $oUSD at a 1:1 ratio. Before receiving $oUSD, the transferred stablecoins will be locked.
Exchange $oUSD for stablecoins: Users can exchange $oUSD for other stablecoins at a 1:1 ratio, and unlock previously-exchanged stablecoins.
Changing the fee in and fee out to increase or decrease the supply of $oUSD and stablecoins to keep the ratio at 1:1. Alternatively, we can use the reserve funds (stablecoin pair, $oUSD) to stabilize the 1:1 ratio, when the ratio deviates from 1:1 the system can use the reserve to buy or sell $oUSD and stablecoins to bring the ratio back to balance.
Last updated