Profit/Loss Guide

Perpetual IRS PnL

Perpetual IRS Profit/Loss is calculated as follows
$profit/loss=funding\space pnl + trading\space pnl$

Funding PnL

Your funding PnL is calculated based on your entry price and the reference floating yield.
Funding PnL is calculated as follows (for longs, opposite for shorts)
$funding \space pnl_{long} =Notional*\sum_{i=1}^{t}\frac{floating\space rate_{i}-entry\space price}{30}$
Example
You are currently long a swaps position from 1.6%, the current lending rate for USDC on AAVE is 2.4%. You would receive (2.4% - 1.6%)/30 = 0.0267% funding each day.
If the lending rate for USDC on AAVE changes to 8.8%, you would receive (8.8% - 1.6%)/30 = 0.24% funding each day.

Trading PnL is calculated based on the difference between your entry and exit prices:
Trading PnL is calculated as follows (for longs, opposite for shorts)
$trading \space pnl_{long}=Notional*\left(exit\space price-entry\space price\right)/exit\_price$

How to Understand

• Total PnL has 2 components (below are for long, for short it is the negative)
• The funding PnL of IRS is similar to the funding cost on BTC perp futures. It is the difference between the floating rate and the fixed rate of your position
• In the short run, trading PnL dominates, while in the long run, funding PnL dominates.
• Trading IRS is similar to trading on BTC perp futures. When you go long, and the market fixed rate goes higher, your position will profit from trading PnL.
• If you go short, and the market fixed rate goes lower, your position will profit from trading PnL
• Similar to BTC perps, when actual market fixed rate trades higher or lower, long IRS positions will make or lose money.

Example

1. 1.
A trader goes long 90,000 notional with 9x leverage, using 10,000 collateral
2. 2.
his entry level is 8.40%
3. 3.
his exit level is 10.00%
4. 4.
floating rate = 5.60%
5. 5.
his trading pnl = (10%-8.4%)/10%*90,000= $14,400 6. 6. his funding pnl = (5.6%-8.4%)*90,000/30 = -$84 every 24 hours
7. 7.
after accounting for slippage and trading fees, if he closes his position his realised trading profit is $14,316 after 24 hours. 8. 8. once he closes his position, he will also receive his collateral of 10,000 back 9. 9. as a result, his cash balance =$24,316
10. 10.
he made a profit of \$14,316
11. 11.
and a return of 143.16% in 24 hours
12. 12.
If the trader gets liquidated, he will only lose his collateral, so the risk is capped at -100% while profits are not capped.

Why is my funding pnl small relative to trading pnl?

1. 1.
Funding pnl is accumulated from the initiation of the contract until now, which can be a short period of time; trading pnl captures the immediate marked to market value. In the short run, trading pnl will dominate your pnl, while in the long run, funding pnl will dominate your pnl.
2. 2.
Here is a technical breakdown:
1. 1.
The duration level of a perpetual IRS is (1+Yt)/Yt. For example, at 10% yield, the duration of perpetual IRS that pays 10% fixed yield annually will equal to 1.1/0.1= 11 years. However, at an 8% yield, it will equal 1.08/0.08= 13.5years. This principle makes it obvious that duration may differ based on the APY% level. The maturity of the perpetual IRS is infinite, while the duration of the instrument at a 10% yield is only 11 years. The cashflow early on in the life of the perpetual IRS, aka the trading pnl dominates the trading position pnl. Given the duration together with leverage, the actual amplification of perpetual IRS can be leverage*duration of the trading position

Do you have any plans to increase the portion of funding pnl?

At the moment, we will observe trading patterns, user profiles as well as your feedback to decide if we want any other product that fits traders’ preferences better. We remain flexible and open to suggestions.

How is the market fixed rate calculated?

The market rate is calculated by the AMM based on market long/short ratio that reflects the market's view of the future expected average floating rate.

Why am I liquidated?

Your position is liquidated when your margin ratio is less than 5%.
margin ratio = (collateral + unrealised PnL) / notional
A higher leverage may give you higher profit with lower capital committed, but also higher chance to be liquidated if the market moves against you.