Hedging
Last updated
Last updated
In the pricing section, the pricing formulas were derived to ensure that neither the protocol, nor the trader, could lock a risk free arbitrage profit (minus transaction fees). Hence, the protocol will follow some steps to hedge the long or short position taken by a trader. These steps will be realized atomically, i.e. in one transaction each time a trader buys or sells a futures. If for any reason the transaction fails then no position will be taken neither by the trader nor by the protocol.
Example
Given the price of ETHDAI on the spot market is 100, the borrowing rate on ETH is 4%, the borrowing rate on DAI is 5%, we have derived the bid and ask prices in the previous example for a futures expiring in 3 months, i.e. the bid price is 99.00 DAI and the ask price is 101.26 DAI. Each time a trader buys or sells a future, the protocol will realise the following steps supposing that no leverage is used, i.e. that the position is fully funded.
Bid
Ask
Now
Trader sells 1 unit of the base currency on the futures
Protocol borrows exp(-rBT) of the base currency from the liquidity pool
Protocol sells the borrowed amount on the spot market to synthesize a sell short position
Trader buys 1 unit of the base currency on the futures
Protocol borrows the amount needed of the quote currency from the liquidity pool to buy 1 unit of the base currency on the spot market
Protocol buys a unit of the base currency with the borrowed funds
At expiry
Protocol settles with the trader
Protocol gives back the borrowed funds including the accrued interest to the liquidity pool
Protocol settles with the trader
Protocol gives back the borrowed funds including the accrued interest to the liquidity pool
Bid
Ask
Now
Trader sells 1 ETH for 99.00 DAI on the futures market
Protocol borrows 0.99 ETH from the liquidity pool at 4% and hence will owe 0.99*exp(0.04/4)=1ETH in 3 months
Protocol sells 0.99 ETH in the spot market for 99 DAI
Trader buys 1 ETH at 101.26 DAI on the futures market
Protocol borrows 100 DAI at 5% from the liquidity pool and hence will owe 100*exp(0.05/4)=101.26 DAI in 3 months
Protocol buys 1 ETH with the borrowed DAI
At expiry
Scenario 1: price at expiry is 150. The protocol makes 51 DAI of profit on the futures position. The total amount of DAI available is 99+51=150 DAI to buy 1 ETH
Scenario 2: price at expiry is 50. The protocol loses 49 DAI. The total amount of DAI available is 99-49=50 DAI to buy 1 ETH
By extrapolating the above scenarios, no matter the price at expiry, 1 ETH will be returned to the liquidity pool to cover the principal borrowed plus interest
Scenario 1: price at expiry is 150. The protocol loses 48.74 DAI on the futures position and, by selling the 1 ETH, the protocol gets 150 DAI, resulting in a total of 150-48.74=101.26 DAI
Scenario 2: price at expiry is 50. The protocol makes a profit of 51.26 DAI on the futures position and, by selling the 1 ETH, the protocol gets 50 DAI resulting in a total of 101.26 DAI
By extrapolating the above scenarios, no matter the price at expiry, 101.26 DAI will be returned to the liquidity pool to cover the principal borrowed plus interest