The formulas below present the price at which a trader could open a long position at a price PO,Lā or a short position at a price PO,Sā with an initial margin M (other notations have been introduced in theoretical pricing).
Side
Price to open a position
Contango protocol provides a price improvement compared to the theoretical formulas presented in theoretical pricing:
Since Mā[(1+rQ,bā)Tā1]>0, the price to open a long position is at a lower price, i.e. more favourable to the trader.
Since Mā[(1+rQ,lā)Tā1]>0, the price to open a short position is at a higher price, i.e. more favourable to the trader.
Example
Let's consider a contract on ETHDAI expiring in 3 months (T=1) and where the traders posts 50DAI as margin:
Given one could borrow DAI at a yearly fixed rate of rQ,bā=10.10%ā, lend ETH at a yearly fixed rate rB,lā=2.90%and buy ETH on the spot market at SLā=100.10DAI then the price at which a trader could open a long a position is:
Given one could borrow ETH at a yearly fixed rate of rB,bā=3.10%ā, lend DAI at a yearly fixed rate of rQ,lā=9.90%and sell ETH on the spot market at SSā=99.90DAI then the price at which a trader could open a short position is:
Let's consider that a trader wants to buy 1 expirable (the numerical values are taken from the above example). In this demonstration, we will present the steps to replicate the cash flows of a expirable position. Let's figure out the price of the expirable, i.e. the DAI money needed, to get 1 ETH at expiry:
Short
Let's consider a trader who wants to sell 1 expirable (the numerical values are taken from the example above). This means she would give 1 ETH at expiry, let's figure out the steps and how much money she would need to receive at expiry:
Pricing with margin ratio
Formulas
Example
1. To receive 1 ETH at expiry, the trader needs to lend (1+rB,lā)T1āETH, i.e. 0.9929ETH
2. To get that ETH, the trader first swaps (1+rB,lā)TSLāāDAI, i.e. 99.39DAI.
3. Since the trader has already some margin, she only needs to borrow (1+rB,lā)TSLāāāMDAI, i.e. 49.39DAI.
4. The debt D the trader owes at expiry (principal + interest) is: D=[(1+rB,lā)TSLāāāM]ā(1+rQ,bā)TDAI, i.e. D=50.59DAI.
5. Hence, the money needed to receive 1 ETH at expiry is the sum of the debt and the margin provided: [(1+rB,lā)TSLāāāM]ā(1+rQ,bā)T+MDAI or SLāā(1+rB,lā1+rQ,bāā)TāMā[(1+rQ,bā)Tā1]DAI, i.e. 100.59DAI.
1. The trader will give 1 ETH at expiry to reimburse a debt. Hence the trader borrows (1+rB,bā)T1āETH, i.e. 0.9924ETH.
2. The trader swaps the ETH to get (1+rB,bā)TSSāāDAI, i.e. 99.14DAI.
3. The trader lends the DAI from the swap and her margin. At expiry the trader receives an amount L=[(1+rB,bā)TSSāā+M]ā(1+rQ,lā)TDAI, i.e. L=152.70DAI.
4. The amount of money the trader will receive at expiry, which is also the price of the expirable, is the difference between the amount L and the margin: [(1+rB,bā)TSSāā+M]ā(1+rQ,lā)TāMDAI or SSāā(1+rB,bā1+rQ,lāā)T+Mā[(1+rQ,lā)Tā1]DAI, i.e. 102.70DAI.
the margin for a long position could be expressed as M=MRāPO,Lā, e.g. if the price to open a long position is PO,Lā=100DAI and if the trader wants a margin ratio of 50%, then the required margin is M=50DAI
the margin for a short position could be expressed as M=MRāPO,Sā, e.g. if the price to open a short position is PO,Sā=100DAI and if the trader wants a margin ratio of 50%, then the required margin is M=50DAI
Replacing the margin M in the main pricing formula to open a position, we find new expressions depending on the collaterisation ratio MR :
Side
Price to open a position
Let's consider a contract on ETHDAI expiring in 3 months (T=1) where the trader puts a 50%MR:
Given one could borrow DAI at a yearly fixed rate of rQ,bā=10.10%, lend ETH at a yearly fixed rate rB,lā=2.90% and buy ETH on the spot market at SLā=100.10DAIthen the price at which a trader could open a long a position is:
Given one could borrow ETH at a yearly fixed rate of rB,bā=3.10%, lend DAI at a yearly fixed rate of rQ,lā=9.90%, and sell ETH on the spot market at SSā=99.90DAI then the price at which a trader could open a short position is: