The Building Blocks Options, Derivatives and Beyond in Web3 Patrick Kiefer
Ethereum Denver·Sun, Oct 9, 2022, 12:00 AM
Transcript
hey everyone i can't it won't let me unless i connect to the internet and the internet is not working yeah this is as close as i could get to full screen okay so hey everyone i'm i'm very happy to be here and i also want to kind of thank all of the organizers um so far from what i've seen this event this event is a great opportunity for everyone here certainly for us more and more of our team will be filtering in over the next week or so so really looking forward to everything happening so i'm going to talk about how to use options as building blocks this is a concept that exists you know in finance independently of web3 but its power is kind of amplified in the context of web3 and so i'll dig into that during the course of our talk so give you a little background about myself and aero markets so i'm the co-founder of aero markets i have a background in math and economics i did my phd in finance uh and then started just you know building things in web 3 a couple years ago and just kind of fell in love with it and haven't looked back since my co-founder ed mares has a similar story so i'm really excited to kind of continue to dig into this space so i'm going to also tell you a little bit about arrow markets before i dig into you know how to use options as building blocks so in fact aero markets is named after our namesake is the norbe nobel laureate economist kenneth arrow and ken arrow had this very powerful uh result dating back even as far as the 50s that you could use options as these building blocks to reconstruct essentially any type of payoff profile that you would want um and so we really you know this kind of idea really animates uh what we're doing and you know that's why it kind of you know makes sense that it's that it's our namesake so i'm gonna what i want to do in this talk is just kind of walk through some very simple examples of how to use options to build up different types of payoff profiles and then how to use the arrow sdk to actually implement those portfolios first quickly i will talk about um how you know what some of the challenges are in building options in web3 you know it is a non-trivial task you know the options in web 3 haven't completely taken off yet um and there are some real serious technical challenges associated with building these this technology out so here i just want to talk about at a high level some of these trade-offs so one trade-off is between amms so automated market makers and limit order books so one advantage of a limit order book is um you know price discovery operates in this very nice way but you need to have sufficient liquidity on the buy side in the sell side in order for the price discovery to work so for a particular asset you need a lot of interest you need a lot of people coming in making bids and asks in order for the price discovery to operate you can do an amm in a way that does not rely on that kind of targeted liquidity so that's something that we take advantage of another kind of high level trade-off here is with regards to how you do settlement so um at a high level there are kind of two ways that you could do it the way it's happening in centralized markets is very much this kind of bilateral enforcement way so um you match counterparties to particular contracts and then you need some mechanism for dynamically enforcing the liabilities that are created in that system so you know margin calls um another way to do it the way that we do um at aero is doing a peer-to-pool model the disadvantage of the peer to pool model is you need to um you know take some steps to hedge the risk that the pool is taking on uh in that context and um so there are you know a bunch of challenges with doing that aero did take this approach as i've alluded to so aero markets uses and a difference pricing based amm in a peer-to-pool model uh the contracts run on an evm so right now we're just live on the avalanche c chain sorry the avalanche test net so it's like the c chain test net uh fuji and we have custom oracles that facilitate the indifference pricing calculation so a lot of these calculations that need to be done for this amm are fairly sophisticated so we need to interact with some off-chain resources to make that happen i want to say a little bit more about the amm but it's not really the focus of this talk so you know we have put a lot of work into thinking about how this indifference pricing mechanism works um and so i would encourage any of you who are interested uh in those details to reach out to me or any of the team or you know go to our website or our discord channel and ask questions there because you know a lot of work went into that but for the purposes of this talk i'm going to be kind of taking the prices as given so assume we have some options that we're able to create and price how can we use those to form portfolios that replicate other types of payoff profiles so earlier there were a few people talking about exotic derivatives structured products and so forth so all of those things you can reconstruct using portfolios of options and so that's kind of what i want to focus on for this talk but again you know to the extent people are interested in learning more about the indifference pricing amm you know please reach out to us okay so um i talked about this so so one advantage of the amm we have again is that price discovery does not rely on liquidity at the level of the asset so if i want to price a call option with a particular strike i don't need to worry about there being you know a lot of interest on the buy side in the sell side for price discovery to operate i can just ask the amm to flash a price for that option and that actually is really powerful in the context of using options as building blocks because then i can tailor my portfolio very precisely if there's some very precise type of cash flow pattern i want to replicate not having to rely on liquidity at the level of the asset is a very powerful tool okay so now i'm just going to kind of dig into how to use options as a tool to replicate payoffs so there is a distinction here that's worth making between composability and replication so uh you know they're related but you can you know do composable you can kind of implement composability that doesn't involve replication and you can also do replication that doesn't involve composability of course you can do replication that does involve composability so they're related so composability is the ability to programmatically interact with third-party project contracts deployed on the blockchain so if some project already exists that is able to create some type of asset you know we can access those methods programmatically from our smart contracts that's composability replication is a little different replication just says we can re we can construct new asset payoff profiles by combining portfolios of of other types of more primitive assets and so the the type of asset we really want to dig into as the primitive asset here are the options okay so i'm just going to quickly walk through a simple example don't get scared the math is very simple trust me and i'm just kind of using it as kind of a um you know guidance so i hope to be able to relay these ideas qualitatively to you as well and then you know some of you who are familiar with some of these tools you might get a little more of a rigorous explanation as well so in what sense are options basis assets well let's think of a case where we have a price that can take one of two possible values tomorrow little s not and little s1 and let's consider the following two assets one asset that pays off one if the price is s not and one asset that pays off one if the price is s1 these are called digital options it turns out their payoffs span the same space as call options and we'll come back to that the reason that's important is because the way arrow works is we actually just create call options call and put options so you need to be able to translate this logic from digital options to call options and put options okay so let's see what we can build with these simple digital assets how about a bond can we build a bond with a portfolio of options it may seem counter-intuitive but it turns out this is kind of the simplest case of something that you can build with a portfolio of options so let's define this new asset this new asset pays one in each state of the world that pays one if the price is s not and it pays one if the price is s1 how can we recreate these payoffs using the digital assets that we talked about it's very simple we just create a portfolio that has a weight one in the first digital asset in a way two and the second digital asset so this portfolio that has a weight one in the first digital asset and a weight one in the second digital asset replicates the payoff of the bond exactly right this portfolio pays off one in every state of the world so let me back up a little also and just kind of um you know talk about why bonds they're very simple example of things we can build with options um but um you know i think they're also relevant for defy there's a lot of interest in yield based products in defy and there's a lot of kind of debate and a lot of different ideas that people have about how to put those together how to build those um so here's a very simple kind of primitive based way to build a yield product is to use these portfolio of options to create a risk-free bond so this price of this portfolio will be less than one and the portfolio will pay one tomorrow in every state of the world so we can use that to back out the yield so this portfolio of options has a yield equal to one over the price of the bond and so magically we've used options to create a fixed yield product um so let me just quickly say a few things about how this price is determined so we're assuming again as i mentioned in the beginning you know a lot of this stuff about the amm is is very interesting and we put a lot of work into that but right now we're just assuming that the prices exist so assuming the prices exist it has to be that the price of the bond equals the price of this portfolio of options because their payouts are identical and you can appeal to something called no arbitrage to make that argument so we can if we can infer the price of the bond from this portfolio of options and that's how we get the yield we can generalize this a little more so so far we've abstracted from time to expiration um so we can think about you know when do these digital options expire we just assumed those ones that we were looking at you know maybe they expire tomorrow but we can say they expire at time t t1 so what if we had a whole set of them some expired t1 some expireds t2 some expired t3 we can kind of reproduce this argument for forming risk-free payoffs for each of those time horizons and we can back out a term structure so now we can use portfolio of options portfolios of options forms formed in these clever ways to back out actually an implied term structure and so then from this you can build a lot more complicated yield profiles you can actually build coupon bonds you can very much customize the yield profile that you want okay so the goal of that was to kind of quickly the points the goal of just kind of using this two-state example but it's not necessarily practical because you know we're writing options on eth for example so ethereum takes values on the continuum it doesn't just take two possible values right so how do we do this in practice we need a way that works when the options are written on underliers that take values on the continuum so there are several ways to do this several ways to replicate a constant payout using call and put option defined over continuous state space so i'm just going to talk about one it's called an overlapping spreads portfolio so for those of you who aren't familiar these are the payoffs of calls and puts when the underlier in this case we're assuming the underlying takes a value on the continuum so the call pays off a call with a particular strike pays off the maximum of zero and the amount by which the underlier exceeds the strike at expiration and the put pays a maximum of zero in the amount by which the strike exceeds the underlying at expiration so here's a very simple combination we can form of puts and calls to give us a risk free payout so we just form a call spread long k1 short k2 and a put spread long k2 short k1 this portfolio has a constant payoff this portfolio pays off the difference between these two strikes in every period so now we've replicated the the risk-free payoffs with portfolios of options defined over the continuum and we can extend this to the case where we have multiple expirations where we want to do something like form coupon bonds so again you can just take two different expirations here t1 and t2 you can form these same overlapping spreads portfolios each of them pay off this fixed amount and now you can back out a term structure so in this case to replicate a two period coupon bond with a ten percent coupon rate and a face value of a hundred we just pick k2 equals k1 plus 1 so the difference is just one and we form a portfolio that has weight 10 in the first overlapping spread portfolio and weight 110 in the second overlapping spread portfolio now we have a portfolio of options that exactly replicates the payoff of a coupon bond a two-period coupon bond okay so uh can we do this in web3 yes we can um so this is arrow just as a quick kind of snapshot of arrows sdk it's up on the avalanche test net now and so if you wanted to form some of these portfolios and i do actually want to talk a little bit more about how some of these parameters are arrived at um you know the signature is a very important tool here but i am running out of time so i'll also ask people who are interested in understanding you know what the role of the signature is in this api request just to come talk to me for now i'll just focus on the option parameters so here if we just pick the ticker say eth the expiration say next week the strikes so here we just you know choose k1 and k2 the quantity we could choose 10 and then this thing would give you one leg of the portfolio of options required to replicate the coupon bond okay um so that's that's bonds um and you know hopefully it was illustrative um using the bonds it is a very simple case those of you who have kind of seen the financial math before might think oh this is all trivial um it's actually i would argue it's actually still useful uh even though it definitely is the simplest case so for those of you who are really involved in building things uh building d5 products and are interested in structured products and options and derivatives then you can think of kind of much more complicated customized ways to combine options um using this kind of logic so you can do you know calendar spreads straddle strangles managed portfolios perps futures swaps and so forth and i also just want to say something here at the end about composability so initially i made a distinction between replication and composability so you know replication is this idea that we can take some basis primitive basis set of assets and use them to build up kind of arbitrary cash flow profiles composability is the idea that we can interact with existing you know protocols in web3 to actually give us the functionality or deliver the assets that we want so you can use composability in a way that facilitates replication so for example you could use put call parity to combine options you get from arrow with underlying positions you get in swap market like uniswap you could also use swap perp and lending protocols to implement hedging portfolios given your option exposure uh this is something that aeros hedging engine does internally um so hopefully i've piqued your interest and kind of illustrated the power of being able to use options in this way really thinking of options as building blocks if you are interested in building out more kind of sophisticated derivative products in web3 you can use these as your primitive ingredients so feel free to reach out to myself or the dev team if you have any questions about getting started with our sdk like i said it's public now and our contracts are deployed on fuji and with that i think i'm out of time
Automatic transcript — names and jargon may be misspelled.