PerlinX & UMA Synthetic PxAsset Minting

CY Tan
PERL.eco
Published in
11 min readOct 13, 2020

Part 2: All the Calculations & Values You Need to Know

PerlinX Community Calculator

Check out the very handy new community-made PerlinX Calculator for you to play with. Just make a copy or download the excel file.

TLDR:

  • All new mints must meet the Global Collateralization Ratio (USD) a.k.a “GCR (USD)”
  • If your position’s Collateralization Ratio a.k.a “CR” falls below the Liquidation Ratio, you might lose your collateral. Add more collateral when it starts getting near the Liquidation Ratio.
  • You can soon withdraw excess collateral in the PerlinX V2.2 Update.
  • In case you missed it, check out Part 1 of the series:
    Introducing PxUSD & What You Can Do With It

All the calculations you need to know to start minting Synthetic Assets (pxAssets)

For all the examples below, PERL will have an initial price of 0.02 USD.

PxAssets: Synthetic assets minted on the PerlinX interface. Currently, token sponsors can mint pxUSD. Others will be added over time based on community and trader demand.

Global Collateralization Ratio (USD): The current ratio in USD of all collateral (PERL) used to mint the pxAsset, divided by market capitalization of the pxAsset. This is the ratio that needs to be met by all new minters.
Abbreviated as GCR (USD).

Example: There’s 24300 USD worth of PERL used as collateral, and a total of 10000 USD worth of pxUSD minted. This results in a ratio of 2.43:1 (PERL value in $USD:pxUSD) is required for your minting of pxUSD. So to mint 1pxUSD, you need to use $2.43USD worth of PERL as collateral.

Global Collateralization Ratio (Token): The number of tokens ratio of pxAssets/collateral.
Abbreviated as GCR (Token)

Example: For the example above with GCR (USD) = 2.43. We use the assumption that each PERL = 0.02 USD.
We can calculate that the

This means that to mint 1 pxUSD, you need to use 121.5 PERL as collateral

Collateralization Ratio (USD): The value of the collateral (PERL) used to mint the pxAsset in user’s position/value of pxAsset the individual has minted.
Abbreviated as CR.
Note: Not to be confused with Global Collateralization Ratio.

Example: If a user minted 1000 pxUSD with $2200 worth of PERL, the user’s CR would be 2200/1000 = 2.2

Liquidation Ratio (Collateral Requirement): The ratio of pxAssets to collateral (PERL) in USD that needs to be maintained to avoid liquidation.

If the collateral ratio falls below the collateral requirement, the token sponsor can lose all their collateral, incurring liquidation penalty.

The difference between the Liquidation Ratio to 1, is the maximum Liquidation Penalty. For pxUSD with Liquidation Ratio = 1.25, you will be penalised by up to (1.25–1) / 1.25=20% when you fail to maintain sufficient collateral.

Example: You have minted 10000 pxUSD with 24300 USD worth of PERL (1,215,000 PERL). PERL price dropped such that the PERL used as collateral is only worth 12499 USD (each PERL at 0.01028 USD).

If a liquidation request is submitted on your position, you will be liquidated and lose access to all 1215000 PERL used as collateral. However, with your 10000 pxUSD that you still have in your wallet, you can sell it to the liquidity pool to get (10000 / 0.01028724 = 972,762 PERL) or wait for settlement to get (10000 / PERL_price_at_settlement)

We can see that 972,762 PERL is ~80% of 1,215,000 PERL. Showing that being liquidated at liquidation ratio of 1.25 does result in losing 20% of the collateral.

Minimum Sponsor Token: The minimum amount of synthetic tokens a token sponsor must owe against the protocol. This includes the balance after minting or partial liquidation.

Example:

  1. Partial redemption
    You have minted 150 pxUSD, where minSponsorToken = 100. Assuming you have 150pxUSD in your wallet, you can redeem only 0 to 50 pxUSD, or do a full redemption of 150 pxUSD.
    Redemption of 50.1 to 149.9 is not allowed as it would violate the requirement of minSponsorToken = 100.
  2. Partial liquidation
    You have minted 150 pxUSD, where minSponsorToken = 100. Assuming PERL price drops below liquidation ratio, and someone else who has 100pxUSD in their wallet tries to liquidate you.
    They can only liquidate 0 to 50 pxUSD of your position.
    While they can also do a full liquidation of 150 pxUSD, they do not have sufficient pxUSD in their wallet to do so.
    Liquidation of 50.1 to 100 is not allowed for him as it would violate the requirement of minSponsorToken = 100 for you.

Expiry: When the pxAsset expires, and all token holders can redeem the pxAsset for the underlying collateral for the price of PERL at the time of expiry and the remaining of their collateral.

All the values you need to know about joining liquidity pools

Divergence/Impermanent loss: The article here by @pintail who coined the term ‘impermanent loss’ (later updated to ‘divergence loss’) explains what it is in-depth.

TLDR: In liquidity pool pairs, the bonding curve will always result in the asset that is relatively increasing in value being sold, to acquire more of the asset that is relatively decreasing in value. This results in you missing out on the potential gain on the asset that is potentially increasing in value. This is called ‘divergence loss’.

Calculation of divergence loss: Here’s a good calculator that you can use to estimate what the loss will be at any given time.

NOTE: Due to divergence loss, you may end up having less pxUSD when you withdraw, than when you deposit the pxUSD and PERL in. This may result in you having insufficient pxUSD to pay for the debt and redeem your collateral. In that case, you will need to buy some pxUSD from the pool, or wait for the settlement to get back the excess collateral.

All the values you need to know about buying or selling into liquidity pools

Yield Dollar: The yield for pxUSD changes depending on whether you’re buying it as a lender, looking for stable yield; or selling it as a borrower, looking to gain leveraged exposure on your PERL.

As a Yield Dollar, PxUSD should usually trade below $1 USD worth of PERL. The price difference between PxUSD and $1 USD represents the interest rate receivable by the lender (i.e. buyer of PxUSD).

Where n is time in years until expiry, or 57/365. The rate for this pxUSD trading at 0.98 USD and 57 days from expiry is

If pxUSD is trading below $1.

The market is functioning properly and that if anyone wants to borrow, they need to pay interest to the buyer of pxUSD.

If pxUSD is trading above $1.
The market is not really functioning properly and that if anyone wants to borrow, they are actually paid to do so (negative interest rate).

Summary

Now that you understand all the terms, you can use the calculator that you can download here to help you estimate what the numbers will be at different scenarios: https://drive.google.com/file/d/1osIohmr7yq20yjTBfAmTtX0cAESxlYEv/view?usp=sharing

Read more about what you can do with pxUSD in Part 1 of the series.

Liquidity farming Instructions

  1. Purchase PERL on an exchange or on PerlinX.
  2. Use PERL to mint PxUSD. Use https://app.perlinx.finance/assets.
  3. Deposit PxUSD and PERL into the PerlinX / Balancer pool to earn BAL, PERL, and UMA tokens

Alternatively, here’s our guide to minting and providing liquidity.

Process to Leverage

  1. Follow the steps above.
  2. Then use PxUSD to swap for more PERL, which will increase your exposure to PERL.

Managing Your Position

Price of PERL varies over time. Users are advised to monitor their positions to take certain actions to react to the market.

If PERL price drops, your CR (USD) drops. Same goes to GCR (USD).

If your CR (USD) drops below liquidation ratio (or collateral requirement), your position can be liquidated and you will lose all your collateral. To avoid liquidation, you will need to maintain your position by adding more collateral.

On the other hand, when PERL price rises, your CR (USD) and the GCR (USD) will also rise.

As new mints will always have to meet GCR (USD), this would make the entry for new token sponsors (minters) higher as more collateral is required to mint.

In PerlinX v2.2, users will be able to withdraw their excess collateral to lower their CR (USD) to a comfortable level and in turn, lower the GCR (USD) to more effectively utilize your capital.

More about excess collateral withdrawal will be outlined in the future part of the series.

Detailed Example:
Here’s the non-exhaustive example of what would happen to someone’s balance with his different actions and under different market conditions.

In the example below, there are two users: Perlin Admin (data shown in green rows) and Bob (data shown in blue rows). The data highlighted orange is computed using both Perlin Admin’s data and Bob’s data (or data that is controlled by market forces) and is hard for any single individual to manipulate.

The Perlin Admin has deployed a new synthetic called pxUSD_Dec2020 which expires on 31 Dec 2020, at the point where PERL is trading at 0.2 USD.

pxUSD_Dec2020 has its Liquidation Ratio set at 1.25.

1. The admin first minted 10,000 pxUSD with $20,000 USD worth of PERL.

In the scenario above, we can see clearly the difference between individual CR and Global CR. Individual’s action will not change the value of other individuals.

What happens to the GCR when PERL has the following price movement?
i) stay constant
If PERL price stays the same at 0.02 USD, there is no change to the CR/GCR.
ii) moves up
If PERL price moves up 50% to 0.03 USD, the GCR(USD) will move up by 50% as well, but GCR(Token) would not change since the amount of collateral token (PERL), and amount of pxAsset minted (pxUSD) did not change.

iii) moves down [still above Liquidation ratio]
If PERL price moves down 50% from 0.03 USD to 0.015 USD, the GCR(USD) will move down by 50% as well, but GCR(Token) would no change as the amount of collateral token (PERL), and amount of pxAsset minted (pxUSD) did not change.

iv) moves down [below liquidation and someone gets liquidated]
7. PERL Price went down 46.7% from 0.015 USD to 0.008 USD.

In this example above, Bob has CR(USD) lower than 1.25 and can be liquidated. However, Perlin Admin’s CR(USD) is still above the liquidation ratio of 1.25 and is thus safe from liquidation.

and how does it affect me if I’m in the liquidity pool

If you put pxUSD and PERL into the pxUSD<>PERL pool, the only value you need to consider is the divergence loss. By using the divergence calculator linked above, you’d incur about 2.02% of divergence loss.

Assuming the current price of PERL is 0.02 USD, GCR = 2. Charles has 3,000,000 PERL in the wallet.

i. Charles first minted 10,000 pxUSD with 20,000 USD worth of PERL.

ii. PERL price increased by 50% after staking in the liquidity pool.

You can see that Charles’ dollar value in the liquidity pool has decreased from $25,000 to $24,494, incurring a divergence loss of 2.02%.

iii. Charles withdraws all his PERL and pxUSD from the liquidity pool to his wallet.

iv. Charles then withdraws 50% of his collateral by repaying 50% of the pxUSD he minted.

By repaying 50% of his pxUSD, Charles gets to withdraw 50% of his excess PERL collateral to his wallet as well.

v. Charles waited until settlement to redeem his remaining 7247 pxUSD for $7247 worth of PERL and the remaining of his excess collateral subsequently.

Note that Charles can also repay the remaining of his 5000 pxUSD debt and since he wouldn’t have any more debt to repay after that, Charles has to wait until settlement/expiry to redeem the other remaining (7250–5000) = 2250 pxUSD.

vi. Charles sent in his PERL that he sent to another wallet earlier from step 3.

Below is the full calculation in one picture.

Value changes in each row are in bold.

You can also download this calculation along with the calculator here.

Have feedback?

Send it to us!
Join our Discord community discussion channel HERE or our Telegram discussion group HERE!

Useful Guides:

PerlinX & UMA Synthetic PxAsset Minting

Part 1: Introducing PxUSD & what you can do with it
Part 2: All the Calculations & Values You Need to Know
Part 3: How do I Manage My Position?

PerlinX User Guides:

Other PerlinX links:

Recent Updates:

Other Useful Links:

Warning

This post is not investment advice. As with exposure to all assets, there are risks involved in trading synthetic tokens, which you need to assess for yourself before participating. Minting synthetic PxAssets using PERL means that you will be exposed to the price volatility of both the PERL and the PxAsset (both upside and downside!). Always do your own research and don’t use any funds you can’t afford to lose.

Stay tuned for more updates and announcements on our channels:

Twitter | Discord | Telegram Announcements | Telegram Discussion

--

--