1 of 19

Contingent Claim AMMs�

Patrick Kiefer, Ed Mehrez, Preston Rozwood,�Daxi Li, Mehdi Salehi, Colin Finkbeiner, Robert Leifke, Sylvain Bellemare, Dheeraj Chakilam, Zhengxun Wu, Yang Wang

Special Thanks: Patrick McCorrey and Austin Liu.

2 of 19

Overview of Contingent Claim AMMs

  1. Contingent claims are assets that give their owner a claim to a specific state dependent payoff in the future. Prediction assets that payoff 1$ if the event occurs and 0$ otherwise are one example. Call and put options are another.

  • Automated market makers (AMMs) are protocols that quote buy and sell prices for a particular asset without having to match buyers and sellers through a limit order book (LOB)�
  • Contingent Claims AMMs are automated market makers that quote prices for contingent claims
    1. Contingent Claims AMMs set prices that are paid into pools used to fund the claims at expiration

3 of 19

Why are Contingent Claim AMMs Important?

  • Contingent claims that scale with the state like options, health insurance and property damage insurance are critical economic infrastructure

  • Current centralized methods for pricing insurance are opaque and the criteria for payment are often obscured and/or modified ex-post by humans with interests that conflict with the insured.

  • Having trustless AMMs that can price contingent claims and maintain solvency when claims come due is an early step toward creating novel blockchain applications to manage real world risk in any jurisdiction.

4 of 19

Two Main Objectives for IC3

  • IMPLEMENT HEDGING PORTFOLIO
    • Pricing through constructing hedging portfolios is a well-established theoretical approach as we will discuss below
    • Write a smart contract to rebalance a hedging portfolio corresponding to option liabilities
      1. Obtain positions in the underlier on Uniswap
      2. Run these calls on Arbitrum to reduce transaction fees

  • VERIFY OFF-CHAIN COMPUTATIONS
    • Run off-chain computations for the pricing AMM using Black-Scholes-Merton as a stand-in for more sophisticated AMMs requiring tools like Monte Carlo simulations or ML models
      • Set up an SGX enclave to compute BSM and generate a key pair associated with the enclave
      • Run price requests through the enclave and have the enclave response include a signature that can be checked by verifier.sol against the enclave public key

5 of 19

Architecture Diagram

6 of 19

SGX Circuit

7 of 19

Enclave Initialization�

  • Send quote including information about source code to Intel for remote attestation�
  • Enclave produces a unique public key for each version of source code

8 of 19

Calling the Enclave

Calculate BSM in enclave and sign output

9 of 19

Daxi Li Console -

Hedging Contract Demo

10 of 19

Handling Computations for CC AMMs

  1. SGX
    1. Can handle advanced computations immediately
    2. Some compromise in terms of guarantees

  • ZKP
    • Requires approximating BSM with polynomials
    • Requires mapping polynomials to QAPs
    • Both are tedious and ad-hoc
    • As the technology improves, likely ZKP will become the best option�
  • Optimisitic Rollups
    • Two-week dispute period problematic for AMMs
    • Computations still done directly on EVM
    • Much better for transaction costs that mainnet

11 of 19

Motivation for Current AMM Structure

  • For simplicity, we pursued a hedging AMM approach
  • Inspired by a large literature in both academic finance and practice for derivatives markets
  • Most famous model of this and the one we used is Black-Scholes-Merton model.
    • Used by TMMs to create hedging portfolios when ‘writing’ derivatives
  • Tractible yet still statistically sophisticated as we will see below
  • Gives us an explicit way to compute hedging portfolios

12 of 19

13 of 19

Brief Discussion of BSM Model

  • Main assumption is that prices follow a geometric brownian motion with constant drift and diffusion terms.
    • This translates to the distributional assumption on log gross returns:

  • Using replication payoff arguments, BSM gives us a way to hedge called delta hedging and it involves dynamically trading in the underlier to cover the eventual payoff of the option.

14 of 19

Brief Discussion of BSM Model

To remove the price risk from a short call position under the BSM model , we buy the following amount of the underlier

Where

  • \Phi Is the standard normal CDF (normal cumulative distribution with mean 0 and standard deviation 1)
  • S is the underlier asset price
  • K is the ‘strike‘ price
  • r is the continuously compounded ‘risk-free’ interest rate, T is the time to maturity
  • \tau is the time to expiration
  • \sigma is the underlier’s volatility (diffusion term of the Brownian motion)

15 of 19

To see more about each project: https://bit.ly/CCProtocols

Option protocol taxonomy

16 of 19

Computational challenges for CC markets

  • Calculations needed for general CC AMMs can involve estimating expected values
  • In the absence of on-chain stand ins for these quantities, statistical forecasts must be made
  • Monte-Carlo simulations and ML are not feasible to implement on-chain with the current state of the technology
  • Off-chain computations must be made to accommodate CC AMMs
  • These off-chain computations need to be guaranteed, ideally as trustless as on-chain computations.
  • Trustless computation appears to be the short term solution

17 of 19

Future Directions: Indifference Pricing

  • When there exists unhedgeable risk (i.e. markets are incomplete), one approach is to determine the indifference price (certainty equivalent) of taking on a liability
  • The indifference price of a liability is the minimum amount of money that is required to make an individual indifferent between taking on an additional liability and not.
  • Accounts for hedgeable and unhedgeable risk
  • Formally, we can express the indifference price of a liability as

  • L represents the liability,
  • rho is the certainty equivalent function,
  • Delta is the portfolio strategy over time (portfolio weights)
  • S is the value of the underlier asset
  • C is the cumulative trading costs for the strategy Delta.
  • H represents the available set of trading strategies

18 of 19

FDs: Intelligent Market Makers (IMMs)

  • Classical indifference pricing relies on strong parametric assumptions on the distribution of the underlier as well as the form of market frictions that hinder hedging
  • Tools in machine learning, in particular, reinforcement learning facilitate relaxing the assumptions on the distribution of the underlier and the form of market frictions
  • Recent advances in deep reinforcement learning allow learning of both simultaneously given a monetary risk measure (certainty equivalent function)

19 of 19

TEAM!

Patrick Kiefer

Edward Mehrez

Preston Rozwood

Daxi Li

Mehdi Salehi

Colin Finkbeiner

Robert Leifke

Zhengxun Wu

Yang Wang

Sylvain Bellemare

Help me!

Dheeraj�Chakilam