DeFi Derivatives

 

Instructors:           Andreas Park & Zissis Poulos
 

 

Commercial Paper/T-Bill like securities

Yearn

  • basic idea: zero-coupon loans
  • You have:
    • target asset
    • collateral
    • y-token trading at discount price 
  • examples: yDAI
  • expires in 1 year
  • price: $.92
  • backed by ETH
  • buying = you earn 8/92 cents=8.7% RoR

Yearn example

1 ETH = 150 DAI
collateralization ratio 125%

seller

buyer

Assumptions

supplies 1 ETH collateral today

mints (=borrows) 100 yDAI to be repaid in 1 year

y

receives 92 DAI today

pays 92 DAI today

y

receives 100 yDAI

repays loan with 100 DAI

deposits yDAI and receives 100 DAI

Yearn example: scenarios

seller

buyer

Scenario 1: ETH \(\ge\)125 DAI

deposits 100 yDAI

withdraws 100 DAI

receives balance of 1 ETH - 100 DAI

What does the seller own (ignore keeper fee)?

  • 92 Dai (the loan)
  • 0.2 ETH x price(ETH)=25 DAI (assume price=125)

seller

buyer

Scenario 2: ETH falls to <125 DAI

keeper

closes undercollateralized position \(\to\) sells 0.8 ETH for 100 DAI

receives 100 DAI early

receives balance
of 0.2 ETH

Futures-like securities

Perpetual futures on Bitcoin on dYdX

  • perpetual future = futures contract without a settlement date
    • can be long or short
    • index price based on Binance, Bitfinex, Bitstamp, Bittrex, Coinbase Pro, Gemini, and Kraken
  • dYdX:
    • decentralized exchange with L2  solution
    • stores signed orders off-chain
    • liquidates underwater positions transparently on-chain

Perpetual futures on dYdX

  • Why? Access returns on non-native assets (Bitcoin, Solana) on the Ethereum blockchain
     
  • Goal of perpetual futures: keep price close to index
     
  • funding fees:
    • futures price>index: long pay short
    • futures price<index: short pay long
       
  • two margins: 
    • initial: 10%
    • maintenance: 5%

Example

Date: Oct 27, 2021

Example

  • 1 ETH       = 2,000 USDC
  • open long of 1ETH when 2,000 USDC with 200 USDC margin

Scenario: ETH \(\downarrow\) 7.5% to 1,850
 

1 ETH=
1,850 USDC

1,800 USDC

\(\frac{1,850}{1,800}-1=2.78\%\)

Scenario: ETH \(\uparrow\) 10% to 2,200
 

1 ETH=
2,200 USDC

1,800 USDC

\(\frac{2,200}{1,800}-1=22\%\)

Options for the trader

  1. Withdraw up to 200 USDC to bring margin to 10%
  2. Close the position with a 200 USDC profit = 100% return

What will happen

  1. position is below 5% maintenance margin
  2. keeper liquidates position: sells 1 ETH and pays 1,800 to contract
  3. keeper keeps $50 as reward

long balance
(what you will get)

short balance
(what you owe)

margin
 

1 ETH=
2,000 USDC

2,000-200
=1,800 USDC

\(\frac{2,000}{1,800}-1=11\%\)


Beginning
 

Smart Contract Derivatives with Synthetix

  • creations of Synths
    • tokens linked to underlying price feed provided by a Chainlink Oracle
    • long asset: sToken (sETH, sBTC)
    • short asset: iToken (iMKR, iAAV)

Note: this screenshot is from June 2021; the equity synths have since been removed

Smart Contract Derivatives with Synthetix: how does it work?

  • single collateral asset SNX \(=\) utility token
     
  • you first need to buy SNX tokens and stake them using Mintr
     
  • you can mint sTokens against SNX holdings (over-collateralization: 750%) (fluctuations in SNX and Synths both matter!)
     
  • you incur debt as proportion of total debt of the system

Example for Synthetix

assets

price

quantity

fraction of debt

BTC

ETH

USDC

10,000

1,000

1

2

20

20,000

total debt: 60,000

33% of 60,000=20,000

33%

33%

2 sBTC

20 sETH

20,000 sUSDC

minted

gain/loss

Example for Synthetix: prices for ETH and BTC up

assets

price

quantity

fraction of debt

BTC

ETH

USDC

20,000

5,000

1

2

20

20,000

total debt: 160,000

33%=53,333

2 sBTC

20 sETH

20,000 sUSDC

minted

gain/loss

33%=53,333

33%=53,333

40,000-53,333
=-13,333

100,000-53,333
=46,667

20,000-53,333
=-33,333

you effectively bet that your position outperforms the pool

Example for Synthetix: prices for ETH and BTC down

assets

price

quantity

fraction of debt

BTC

ETH

USDC

5,000

500

1

2

20

20,000

total debt: 40,000

33%=13,333

2 sBTC

20 sETH

20,000 sUSDC

minted

gain/loss

10,000-13,333
=-3,333

20,000-13,333
=7,777

33%=13,333

33%=13,333

10,000-13,333
=-3,333

what is dydx?

main product:
BTC perpetual futures contract

initial margin =
amount of collateral needed to be posted

maintenance margin =
amount of price movement after which collateral needs to be replenished

Source: Harvey, Ramachandran, and Santoro (2020)

ETF-like securities

Securities Creation: Tokensets

idea: create new mutual fund like asset 

Securities Creation: Tokensets

@financeUTM

andreas.park@rotman.utoronto.ca

slides.com/ap248

sites.google.com/site/parkandreas/

youtube.com/user/andreaspark2812/

DeFi Derivatives

By Andreas Park

DeFi Derivatives

This slide deck provides an overview of DeFi protocols for derivatives (broadly defined). It draws insights from Harvey, Ramachandran, and Santoro (2020) "DeFi and the Future of Finance"

  • 161
Loading comments...

More from Andreas Park