Open Source Lira Community Coding Workshop by Omri Ross, Peter Emil Jensen
Devcon·Fri, Oct 9, 2020, 12:00 AM
This workshop marks the release of a new open-source language and a dedicated compiler for the benefit of the Ethereum community. We release Lira: A declarative and formally verified domain specific language, designed for writing and deploying secure financial contracts on the Ethereum Blockchain. eToroLang compiles directly to EVM through a Haskell-based compiler that is released at the same time. That allows any user to write and deploy sophisticated financial contracts with industry grade security and without the need to use solidity. Following a succinct introduction, Dr. Ross will walk participants through a series of financial contracts and applications written in eToroLang. Starting with simple futures, call-options and interest rate swaps, the workshop will quickly progress towards expressing complex financial products in the domain specific contract language. We aim to promote awareness and use of type-secure languages in the community. Regardless of skill-level, participants will walk away with an appreciation of the value of domain-specific languages in the Web3.0 stack and, hopefully, a number of new ideas of how to implement their Dapp in a secure and verified contract language. To show the usability of this new release, eToro is launching an open-source marketplace for derivatives, where participants of the workshop and Devcon can compose financial contracts and advertise their positions on an online marketplace, to find a counterparty for their financial contract. We present a number of additional use-cases for the language and show how developers can build new solutions or augment existing Dapps in safe and intuitive manner.
Transcript
[Applause] so yeah the likelihood tapping into is really to offer infrastructure to utilized with the insecurities okay the variety of your case but the most common ones are due to the interest rate swaps with cover a little bit of that later but you know this market is pretty insane in size of course to move into traditional market today is to get some perspective taken form an organization standardized is that and directives semi-annual basis and if we look today filter market its but twenty fifteen billion in size that's a fraction of the size of some of the biggest assets existing in the world in the mean time and it's a fraction of what ought to be the comparator to God which is as you take it that which is I was surprised to figure that out v18 in terms of the size of of what can go into some of the crisis no it can't go wrong but it's a pretty insane market and it's a pretty some of the challenges at this moment this the way it's run too deep today a lot of the OTC transactions that sits on the side of their books of a variety of crimes they're not transparent at all so they actually manage some excels and he showed us what they are using using a variety of cells Excel sheets which is kind of one of the other things that also not more speaking about at the time did you have a lot of this into this product to decide that with this connection that's a different discussion so so yeah I will see if we can make use of smart comments but if I put the others in this room is moving intermediaries actually I'm excited it's very transparent if you some sentences home project directly one day on their wheels and you get a beautiful handshake so there's no question asked in the seat area but it was seen in detail valuation our leaders and the punishment is really really the tip of the iceberg security companies and I think one of them more interesting they present you may what happens admitted by another story from chiron that actually covered it in fact about 45% of the conference anytime were sharing something with different levels of abilities which is checked for Enda [Music] which for me was very interesting point when she saw the buyer said maybe distant ideas tremendous potential it is really something you wanna be careful about and then that's what kind of things to start working on the error which by the few lines of code riotous I mentioned authorities actually this is six final concert functional writing which I actually pretty simple this is one Bitcoin in return I will use also the project type of possession together we've been able to adapt and visa and then we scale it tells us why it's ten thousand five hundred fifty five and nineteen eighty say this is going to be actually today's but we're going to cook 12 all out this language is different in discipline so it's kind of a domain-specific language for contractors among other thing that one shared it will eventually but it's going to form a notification and it's something to start we looked into academic the second before buying into it even if we for a second restrained for discussion or the verification of yourself it's very simple to code it it's here it's five six times of code representing a contract if you actually reason it's so easy to even take hundreds of lines of code to create a future contract it's also I mean to language which is composing together to make it quite basic and it's mainly because they wanna enjoy the benefit which is one of the reasons it advantages which is Richard like language actually Morris we need to make change the word translate because it is to understand that has been today's conversation and also you get a lot of the nice thing for functional programming which yeah once they have been expired so the critical structure in the language itself is that you completely you know programming language from the title or whatever you alligator so we have constructed to talk about some masculine fire it takes that in which directed Indian backbone but it could easily modified to a variety of other platforms and also without getting into much detail of having Palace built but usually one of the immediate steps in the comparators which is creating some abstract syntax tree is also very easy modifiable [Music] we'll also cover our YouTube page my friends so the way we kind of start this demonstration it's going to get one more technical retirement so the first pilot very vision going to show up to creating this framework and varieties of contracts this you excuse the language just before using it will actually direct you to receive it you can get we can put more Ania - maybe you can once you have it you can actually clear from our contacts that you can actually return all of these yourself which one did you get me so this is gonna help someone demo maker in this case and yeah and you can go to that by going to damage on the other part and I think we also share this presentation from putting before or before the end okay so let's start with actually building a future contracts so if you choose an underlying we want to use let's use makeup and you can put it against saying us think so maybe some exchange rate partly is for 100 cover and you can say 2 8 10 USD it's a trivalent so we're using in this case hours time usually the most part is to be managed it is but another time and usually at some future time is yourself you probably translate usually only check future contracts the more liquid ones or one month two months ahead but everyone on it with you so it just on mine for 40 seconds and so m k are holding and then indicates your part to custody the gossip is kept on a small compact so a little bit once their proofs actually happens that will be determined it will take and you can actually check the code of weight in the back end you could have of course done it before you signed it but you actually see the code it was creating this so you see here as first one is the address of the contract and we are some limitations but how much to finish I said but in the end maybe she can go back to the code is infiltrated so in the end there the post commercial textbook on both side and we have 40 seconds all of this is available online there is nothing special privilege network so you can actually try yourself let's move back to the presentation quickly and discuss how to build that sort of code when after you have the chance to write your own code maybe in the first exam possible did very simply but after that we're going to share an option and then become more technical and I'll let you know if some of you guys there so let's go team so the first one is actually describing exactly what we've seen before which was a future contract but the virus in the seller agreement future price to trade and just before going on I also discussed it with a couple of guys including Johnny one of the biggest challenges for showing a future that is traded in 40 seconds these people think why don't you just schedule it straight away but it's actually one of the most traded yeah traded their traitor the instrument because a lot of people that had stories whether it be or the prices dollars or also speculate the benefits of future is rejected yeah yeah actually started discussing it but they should but it's still there one of the reason one who mentioned these features is one of the benefits building a system like that is that you can use an under colonization one of the biggest challenges generally with a lot of what we see today are landing market which is of course the biggest is that you need to have some upper collateralization right some between 125 250% where most of it is because you know when you have to trust someone you know on the money for their own interest to disappear especially when the edges but if you look into this valley 25 to 50 percent also pitch is just keeping making sure that the money is there is hundred percent in twenty five to fifty is your risk management of your lifelines and see what happened if the underlying is volatile and you want to make sure that you don't require that you continue for much of convoy actually had to close the position and in this case is a lot of time future contracts because they start with some sort of fair price the beginning price could be easily that each is $80 today it means that you can only meet the amount of money to put in your in your custodian to be enough to cover up sort of their the cost of closing the position but then it's also comes with the price and what's the kind of sort of the inciting the languages with this eventually most financial contracts are finishing with a transfer or an empty transfer which is zero which means nothing I said the live operations if the functional memory is always in this case it's a transfer from Alice to Bob the next stages we spend on the state's two times now this scale has two parameters in principle scale only be that one to two which is how much multiplied the operation when it comes contract which take a parameter and context go to the syntax and semantics but the reason we have two parameters because the second parameter is referred to how much money you want to ask the custodian to alter it so in the example with this type of most videos Medical Center study this is actually one of the most interesting ways to extend the language is to look how to look into the risk management integration which is usually one of the hardest process the second part is you take to a new chamber is to make a transfer from in this case of us days to Palace as 400 trees we take the tournament at both sides and these two are two separate quarters if we just use them together within two processes separated to these living components which are both actually around state 1207 also- Atomics of the control documents that's ink today we said we actually wanna run into one month time and it will take these 12 points and put a month service execution and wait for it and we finished a buffer so it's actually pretty simple and we'll also we could be taunting - yeah let's take another option and maybe we'll take the execution so notice before running it is that you have to have a premium premium is really a cost of the options we are going to discuss with a large bill in a second for the ones that are not sure options works out actually it's been table you want more details but in this case we talked about four percent of the curses of premium to create because of the option and again is before the problem and you can find classy you can probably run is one months a hat but we'll take it in 40 seconds so let's create a month so obviously the cost has been a bit more than the premium cost of one option in ten great so wait for the deployment the death and then we also control the price in the Marine that you need to receive this case in order to learn to break even on the cause of death it is startling so we added some sort of light reach which is of course not correct because the look and feel for it of course take the price will be standard it and then it's actually a sort of simulates impossible trading of death so wait for it to be activated and then you can actually check your profit or loss per person to your initial composition to stop it with 4% costs so it started with the loss on that side for therefore the premium and then eventually you can actually see how the price of this case is come change yeah we see what I did to finish in 5% of some random walk so yeah you can actually see it but it is to get kind of a feeling of how it could actually change and in principle all of these are fits through some of our articles that you can activate it so there's now this stuff could you live if you have time and then it's settled it's again so in this case to make a guess 860 Grizzlies so at some point you're gonna get it back but you've seen it before I so again you're welcome to try it out at one time we are and should we gotta get up medical treatment so I think we're going to have a small church or you can actually press the link yeah but there's also a direct link from the demo to dig it up if you want to buy that from there and you can see a lot of things here we'll cover a little bit of the coding part here and then we're gonna have a couple of samples Oh smithston so that I'm which is actually based on a paper Alicia that information system is better and you are welcome to see it's actually show a lot of the specification there are a couple of money vacations from there but it and you really just go quickly you know and see how the language is actually transfers the scale work and you need to have some address per day for the party one body - its Kenya two parameters yeah and which is the maximum amount you required to be on a custodian and in this case also II which is expression of how much one multiply the sc-2010 but friends will give it more in a more general way how the concepts are different so obviously this function also actually what we have transfer which of these operations percentages and contract if something should happen and it transfers a transfer an address usually representing then we have scale just allow us to multiply contracts with Sandman and number we have both which are hours to come conversely some functionality features because it's allow you to get some boolean expression happen within a time frame which actually it's quite interesting how technically but it's also give you a lot of ability to verify put into space when the expression we have to be either some expression on a preview right then you can have an operation on between two expressions by justification scientists - and the federal register with the normal courageous and and then you also have observable and observable it's maybe not the best thing but it's a way to describe entering data through your operation on chain so it's very similar target use Oracle's so in our case that China's representative of our economic and would yeah and of course here two times utin would in time can be either now practically or if you have like let's take or you can even sure it's on the coldest night I guess when I started should I can running an example of how to actually to the future yeah yeah I will run an example but just to answer your questions you can execute the corner and whenever you executed you actually moved the time forward so it means that if men you were engaged is a contract because you know what sorry for the uncertainty but you know you know the blockchain is a synchronic someone have to start it I cannot just say that spawns are you turning it into a mine before this so I can be initiating it on time the way we build it first it whenever you execute the convert to actually one which everybody can do it sort of third public everybody together can execute it it will look into the time there's a change between then and now and the right time point if the right time find is best if we take the price at that point in time there's a good answer or not so there's a bunch of future contracts step then when that time comes yeah but they don't have to do the exact same time you can actually after after the time any to look for activity there is also the element of simplification if you like which means contracts are very simplified over time so if you would have a contract which is it time translate in the beginning of say ninety days you could in principle as if it we'll be waiting 89 days it was 90 days because it would see that some time pass it was still working just an operation because it's still in waiting time so so if you start with convert to its momentum after one month you'll execute it they look into the convert and say okay it's time we can take the time we saw the body so the time is relatively still we can actually fatty so maybe I will show some of them and I change the runs that I'm just writing my future that maturity for seconds and dmort and then for this we created a library that you can install by just but just you know catchment installing just right to be able to tour t-ara - des and then you get it already funny okay so let's say to the future here so that is one so I'm gonna steal some of them do both here and I am going to transfer so let's say 150 he's from Alice to Bob and then afterward after that are the same time I will transfer oh she used X transferred one of two okay so this is just the same except that you can show me before you need a comma between oh yeah and there is this should run so when I run the compiler environment will also create a local environment with the ganache blockchain so we can test it without actually spending any money so so in the first instance around I want to I want to compile the future we just created here as a weight Europe and direct path and in our compiler so now I have an instance of the of this theorem contract compact here both as a source code oh I forgot to say man actually so let's try again yeah thing is like which one of them is at this is okay so now we have written a compound and if I say I could write the source code and to see that it this is things from source code where I use as buffers place all the values because I don't remember the addresses of them and I can also see the back coat check works for symbols as well it's just - these are just placeholders so normally you will write the full address yeah but in this case the when you create a development environment it would just create some systems for you and some test accounts and then they just change them when you compile them okay but let me move for you see like if I write ETA chain that that will supply the contract if you if you're using it on the real assistant you would need to actually have the address of these is xx s but here just write locally so for so know what none of us would ever remember that so for ease of use it will automatically replace the different placeholders with these as you see so here's the compressed but you can actually see that I transfer here the USD X there's no static record in compilers but this is just running no values this is just some random choice and a guardian so if I can actually just test the check the bounds of the use DX so I could see how much do the Alice have of us takes it out and pop has and and the same should be with pieces okay okay so now that we have been compiled them know that they can compile we will actually try to depart that contract here and call it apart part certainty that is now this is now the contract address of this yoga so the first thing we want to do is to actually approve this lyric on fact that it connects respect money on Alice's and father's house cause Carly asked Bob still owns the tone so we need to approve it so it can be put into into the contract that said as Nesbo so we're let's say that take this contract and then it's a proof and then you can see that Alice has to meet any to $150 like this from Palace yes yes this is Alice's address from Alice and then how much do we need to prove an hour or two 150 and that went through you know there's nobody but this is a success so and then we you know the case you take the clip up and here we just put one easy and this is this Luis bollo so now the total price is to prove the right amount we can now take the future contract and say actually and by activating we actually it will then take proof the mountain put it into X go into the into the contract and then start the timer as Mark does that time activate and you're going to see the generous in some transaction events so if I actually check it my with Allison anybody been actually named because either if if but didn't approve his amount he will have to show even give either every transfer sorry everyday pool car goes through the contract none of them does so if I forgot to approve is not nothing will help and anybody can improve so the 42nd starts when activations yeah so so now we're particular and I guess as possible for Bob to kind of wait it's all just like a this array and Alice this month that you have to but no this is this is one of the reason why both execute and activate our beauty and our public to kind of put the incentive for you to start it it's also mean that if you are provider of the change services you can activate it yourself so if we offer for example a meat or eggs the future or an option based on liver will actually activated area to make sure that it's activated is it possible to retract and approval proven anything say you don't want yeah you can if it's before activation yeah so there were about so if thousands in fact of saying how exactly I just made my approval amount of 150 practices oh you want me to send me the serum and then the activation will fail and no one getting on with their approval amount so just to check that my approval amount of you taking from Alice you can see that she now has on the 850 which responds to one hundred thousand one hundred fifty and the same should be with Alice you still have so now we can forty seconds elapsed so let's take the same contract and now we can execute an executable check in from the starting time whether these forty singles actually has elapsed and if it has it will actually this country executed and when you see some transactions has happened and if I now check the balance of Alice you can see she has a 1001 whereas up should have yeah we spoke about the fact that you wanna talk to be point two options nice to show the monitor so again in this case when you had a call option or it's quite for any option you have the option obligation in this case you have something that is all come from K is a strike price if we sink this case of waiting eater system dollars and say that [Music] means that these his prices over $150 it'll make sense for this case for Alice to enforce the law would be really different in the advice 250 but if the price is below that she doesn't have to activate it but she doesn't have to run it so the value of this would be kind of sewage so a lot of times is sort of hockey stick politics popular in the other part of Atlantic Europe because before the strike price of course the option is works here value but over that stuff going linearly and it's actually 45 degrees in device and then when we sing about corruption to look into different points so this looks and the under line as a price and the charges the option parties anybody over despite price at maturity exactly a lot of time also have moved into the option example before in the simulation on the demo we looked at the price in comparison to the beginning price we look at something that is called sometimes they twisted value so intrinsic value means if you exercise it straight away what would it be worth of course you can do introductions to using implied volatilities are not to price it now more it today if you want you can cut rate afterward but then you yeah we can look into that but that's something today but the point is the food mainly look into the intrinsic bodies of those derivatives so then the question will be if you wanted to when we sing a knife if you wanted to create that nice option how would you how would you actually start coding it someone like suggested take a minute to think about it that I just give a small clue to start it up that you can see this please zero write this 0 or that price - some kind of distract advice show a minute to see you know you can see that maybe opened the guitar tissue to language fit as you could if you want to think about it you could think that at least in this case we are making two prices maybe you want to use some of their capacities to use Maximus language so this could be a very useful way for you to take either zero or something which is a bit higher than that so if we're going to the first example so the first integrity that will have to be at least 0 right I mean didn't have the theory it was the Liverpool and physical delivery option we may have only take the other partnership so the other part of it is if we take the price feet remember land observable in the language which actually is a similar to take it I select us and our observable would be a price P as we're taking this case to be to this to you and if you like that orchid - 150 but if arthritis and 150 this will describe a different when this price tha that from the record another 150 but you have to make sure you get at least zero so you may put the Baxter in this one and then if you of course you want the result of it so that's there are two transcript analysis involved in this space we referred to the distance between is based on fifty or zero and of course they were scale and here is the partners get a bit more tricky because we spend and get into space because you know precisely how much could be transferred here in advance so you need to decide how much actually of the assets you want to keep the custodian which is what you approved for when I did before them so that's a birth plan so this will kind of discuss the payment you will have at maturity so then of course you want to kind of move the time a little bit forward so you may put some translate on as well as much as you wanna manage fire so this is how you would create said like European quality notice again this is about five lines of code pretty simple one and very easy to clean any questions of that actually a second one scale 1000 yeah it's a good question it's because let me think is in perspective so this part was kind of clear right could they say you make it as you know or the price by mistake then I think that you don't know how much it will be maturity and one of the interesting part is a risk management and the scale doesn't have to be myself could be 50 20 or whatever you wanted to be but in this case we said one make sure will be enough to be paid and in principle you could pay infinity right so they asked what do you wanna stop it so there are two different subjects and whatever you would say this is a earths can be to infinity so we need to make sure there is management is done correctly right like in the maker system right do you have the way of of creating margin call and say it's pure liquid through them actually need to require all the funding to them and at least with call options which actually see the edge of all because if you don't want it to kind of edge the position in a way I can discuss edging a lot won't do it here not to work everybody up but the point is that in these cases you know that it's very cheap to in hedges because you just need to buy one each in a sense some cash but it means that that if I wasn't appetizers I would actually fight if I had a contract that is existing and someone did not say $30 excited I would buy it anything not a pledge my position with zero is so just think it is all too much the same as you having some other system like the minuses but if you don't want to get him to be serious and you don't have a way to deal with the risk management part you need to make sure that the contracts all this money because this could pay infinity principle we decided just maybe $1000 the other side of it is of course that make it more difficult valleys because you need to deploy money to the custodian right so there are two sides for that part the answer question here and what questions are that actually option so then if you wanted to look into the put option and input option without a decent production we'll take the price in this case of the current and we'll reduce it from a larger price in this case it works about again you have the option of the application to run done and this pace yourself underlying asset for specific price so in this case your benefit as you say a free design for example if you say the strike off it will be $50 again so if the price is below 50 you'll get the different retail price if it's a if it's close to zero unlike the example before you know exactly what is the maximum loss so here we look like a different kind of artistic so you know the nice thing here I guess is the user is you know your maximum loss will be the cake over there was a strike price and again it's going on the other side can be usable for speculation or firing tourists similar to the case with very corrupting the interested value listed in the specifics in a specific time how much value will have if you would exercise it of course you're excited and you can also edge it up and more complex models so how would you actually call that that I love it quicker than ever do you want to think about it to start a victory so again similar to before you're heavier than oxen with your analogy - observable classic so this is very similar to the previous one here is the force for simple to put the muscle loss because you know that there won't be more than 50 if that's zero but you can still have some more partial and then you wait one month supply so let's take some more interesting look into American colleges so the distance between an American corruption to add to a European one is that in the case of an American collection you will have this premium you later in America you can actually exercise anytime between the time you have it in maturity so you don't have to stop precisely on the end of the time so it's actually much more it's one of the features are quite similar from a mobility expecting it's a little more complex but the payoff is again - espera so how would that look like in this case you will still have the same as before but you have the maths observable belt and the time is exercising so this is the exact same formula was sitting forth and similar to before we scaled it to whatever risk management in actuality but then the different linear we using some other mythology used before seen here as here we have a longer period of time in which you can decide to exercise your option in this case say two months so then you have a contract that actually have two opportunities there is the option to turn and is actually decided to exercise it in the purely scientific society in that case we'll have the belt as before notice the two deterrence is immediately at the point that she is doing its redundant kept weight otherwise we just banana is the zero contracts which we mentioned the contract side says your is empty contracts this Intex to have a consumption good you sorry what what would be the same time but the thing is that each of these options is my confidence right so you can you can do to two different manners right if you want to just to create and home deciduous ultimate over-the-counter between you and me and you didn't want it to be tradable which is saying let's we have this contract and just between the two of us yeah then you could just scale this by tech like this will be very easy because you're the one exercising its right here directly so we just had a scalar function here with death and whatever if you wanted to be very liquid we might say let's create ten let's create like a contract of death or ten of these contracts and you can trade them directly in some asset in fact training so one of the teachers we have and if you want to actually feel okay let me show it so we created there Allison privacy's it could be a forum for any proposals to be smart contract if you wanna have the creative on this to guarantee which could be any honest so it is we have a way to actually change the other system under your approval so if you are Alice you couldn't principle Stanley your position and from what point of view is long as there is it's goes back to the risk management discussion we talked about before as long as there is enough money in there in the custodian you don't mind is a lease on the side so so these are just addresses this can actually be change in the contracts marketing plan so if they're all in one unit because these contracts are actually I know it's may sound a bit weird it's I don't know how much is familiar with register yourself but there because you can actually register with you for quite effectively they can be actually definitive so what am I saying the evening's I was even if I am interested in me even if I'm not interested in this America option on a European option and that was actually the biggest if you like contribution of black and Java the reason why it was so useful it was not because people actually knew my surprise of options and it told them enough but it's because it showed market makers how you can actually be hedged assumptions and this hedging is really useful because it means it is easy for the options which are it's a great business the greatest option in seventh round so it means Italy's even though it is example I get a lot of funding into it just to make it very simple and we have it to you but maybe the fraction of that because I'm not a baker even if he's not interested in say a disposition you can hedge it very easy you can just or some money take that position and if he is paid thirty or fifty dollars to do it it's a lot of money that will work for taking such a risk so what it means it means that a market maker can buy and sell it in an exchange for example like Normandy or you can buy it in the green wire again I would like to sell for a change if I get a good price wait for every price means by individual I can actually edge it actively each anniversary that I on it all right five minutes wherever I want to trade and I don't actually mind it because I know in sesame and I will not make laws this has been maybe costing methodology so this is why it's actually so interesting when you build these products over very liquid assets like beach community maybe if you picked some more tokens which are number 400 or 500 then maybe it's less interesting because the liquidity of these assets is quite limited and even if you take the downsize for the attacking you can be probably pretty certain that you can sell them who feel happy as a percent from the underlying price make sense alright if you want much more information on magic which I want for some years of today we can talk about the time we need to keep it clear yeah I mean we actually consider if the is Alice I can transfer a pirate my position to an eternal address and then then you can transfer them further down time so and it's some of the nice thing stuff because when the conflict Delta clearing and the risk management part it's very nice to do that actually if you're interested we also have more we can share this and stuff I think on a different section in the talk about future development some of the more interesting part you take into is actually discussing very similar terms for what maker does not in a way ideas in their case maker as om kr is a total to dilute various management part of the system so you can easily say there will be in a second makes sense for me going back to maker that you're kind of setting the parameters of how much risk you willing to get you set the parameters of how much margin required which is some ways hurt your business right if you offer people that 5% on the margin you could trade an hour maybe we'll get more business than if you didn't find out 50% so you can affect that but he also to risk management failure loudness of the system you'll have to pay back that their asset so in this case you can actually have lower margin requirements because the derivatives between this lower market requirements you can sense risk management factors it's one of the things we're looking into it so I have I want before work later on towards change it's part of the editorial stuff so we build a lot of still product but also we I wanted professor in university so they actually develop developing or some whatever the car service so yeah number one had the premium because we talked before elastic you will actually really interesting development because we start talking about Wireless which projects product and now we talked about how they actually try these products and of course these products usually everything will be fine in to them most of it is sort of classical my finance or not today price assumptions but in principle not only you want to be able to trade this option in this case a call option or American corruption you're also putting the premium payment in today they which means it's autistic and a bit lower than they do some premium because as you could easily say the call option that we described before and only positive it right if they get a zero something so it has to cost something because it's going to generate a zero or positive payment and this is usually capturing improving so if you take the interesting value of the premier began with just minus the cost of it if you remember in the simulation we showed before we introduced a premium of 4% and then we kind of the price started - 4% but here what you actually look two seconds before you lab in on this part is the exact same thing is not an option as before but now we just hit both and another payment this case if the premium is $5 just said it once over for HTTP Alice in order to receive the rights for possible future damage so it's actually very compositional I may say we decided not to do it but at the time I work with some big institution we actually we're able to show that almost any artistic comforts you can actually even if we would look in tomorrow my exotic stuff you don't worry we're not going to cover today like basket options because it's very compositional there's not problem to pay the basket of spices and divide them and I'm sure if you followed so far it's very easy for you to imagine that you can do something like that because you can with the expression part you can also create adding a variety of signals the only thing to notice here is that one of the things is how you actually enter the price field so if you guys want to play on fear in the test environment which I mentioned before one of the advantage to use it so we sort of created a way for you to use Oracle's in a very simple way you don't want to spend more money so you can trade volume observable like the exercises that is a exercise exercise we create an integer observable for things like the term to US dollar change it's already existing course we use Alice and my speech here to more clarity but is it the name so let's take another example a bit just taking us to the direction of more exotic which is the inferior option so what is it actually means it means that you have an option like we stand before but it's only become valid if something happened before so what does it mean take the picture before with a nice of a call option payment this function will only be exercised over this price if the price is Dutch and not in place for example come back here - oh look it is maybe that's beautiful but this easy to understand example say that we talk to each price and our buyer is mean if it is 150 s maybe touching 200 or whatever it is so it could be another it is below like now it's a hundred eighty five or whatever it is today but how can you can all the exercises so so take an example say there are two hundred dollars each I swear it's actually getting too late and but there the strike price is only 150 but they're requiring for you to be able to train it enough for 185 whatever it is is that it was in the period as exceeded 200 anything doesn't happen then your option is not in place these are actually pretty interesting assets that are also using biasing is rather more traditional markets and then so you remember to do is market prices as necessary say Mr Price well you had to exercise it but it's where what's actually done with your option so how would you do the fear so the big different here is that you actually just require before you start your asset and so it would mean the price with a touch open but bigger high or in this case 215 whatever is it that you wanted to put it and one distraction then whatever you put inside becomes evaluated again all right so then if you combine them together and we're so very small so I want to show how you can actually use it in places like some of the existing infrastructure so right we can watch what CDP's existed in the given time but we can now actually create sort of insurance and syllabus prices so one way to do it would be to put in GDP so how would we do that we will look into some defaults that happens in a specific point in time and if that actually happened there could be a prisoner to respect so it's pretty similar to saying is some premium if that equalization happen and again we saw you about you wanna do or zero if it doesn't happen that's before but if it's happened to you otherwise and then you would do both with something else a hundred dollars to pay for this you can of course very easy to create composited to composite together and so another interesting market is actually inside inside is the interest rate swaps market and interest rate swaps within the second connector that'll be towards our industry but they're actually very popular and the reason why the popular is because we're all pretty I'm here in the room but at some point maybe wanna retire and when you retire you hope to get a safe payment every month you know for your retirement so a lot of the benches for the very very interested in being able to no fixed payment how much they can pay and benches is a serious business in the world so the way it works is that they want to make sure you get regardless of the interest rates change over time so in example but you don't know what to redirect it will be played on the other side so in example is you want to receive 5% so anything rate is 5% and then if they create waiting for person is anticipated all right that may be mr. B I display the variable rate and Bob always rate 4% so if I displayed is 5% you will end up paying 1% above because here 5% payment in paper 4% the difference 1% is a lease payment is represent because the race is lower then bubble at once so again we can wear the contract at death with fever so again in this case we're saying the rate is 4 minus whatever is down celebrates by Alice 90% so we defined in retirement so as you remember the example before we had said that that whatever is is receiving they should receive 4 percent from Bob when you receive the different for the red chicken's so if a rate is 5% raise 4 minus 5 is negative number right so 4 minus 5 would be negative so there would be a zero payment in this case from Alice to Bob okay so then check it again maybe I'll just quickly the what this because this is a bit more complexity so just to make sense you know I once did it and then when I finished doing it I discovered that the pen was not really the bone listen a uterus I really hope is that okay yeah I haven't checked yet whiteboard marker so we have hotties here papi the other side and then we said it both almost a 4% right regardless what happened it takes four percent but other statement is the variable right because it depends on their exchange rate or a specific time and that could be say 3% or 5% or whatever it could be right so when we actually model look we only need to make sure that you don't actually know if eventually right eventually what will be paid is the balance between them if it's exactly 4% it's zero but in most changes it's not going to be through that either payment of something from Bob to Alice or payment to something from Alice to Bob and it's based on the exchange rate so the first time we looked into here were saying that alice is checking if the rate is there is let's call it below 4% in this case that she will have to pay some to Bob I could pop a 4% greatest represent the net rate is 1% too as well but then in the other case we can make sure this in a very similar way this the other way around then if the rate is below 4% and Bob would have a payment back to Alice so it's very symmetrical and obviously one of the same always avoided in any practical element because it would be the national zero the pigments are zero one of them and the other one would be the transfer rate so either I respect some others - in this case - Bob or the other any questions on the industry its box a bit complex but sorry go ahead yeah actually it's good quite yes you can and also general saying that a lot of that conference that you play you can see that you can sum up model them in more than one way actually if you think about optionality generally we use Mac's much is almost always can be infinitely right because the max gives up it was over that than that otherwise differences right so the answer is yes but you just kind of show that you can create some yeah the system are yeah yeah you may have the payments they may return that you're translating one month ahead but you can have two months and three months ahead and sort of drag it over a period of time this one we are not going to show that it's very simple similar but you can imagine that you can also create it cross currency assets so there is an easy way for you to page from Japanese yen or USD Peaks and a lot of time a lot of them some of the more interesting there take a picture now one of the more interesting ways to to create some of these walks are based on the carry pretty low on interest and maybe the always higher rate or some currencies today have negative weights like Jennifer so you can actually have to deal with negative carry and one ways to do defeat is actually to do some sports to receive and any sum of industries interesting case you can also try modeling around some of the arbitrage I think you know if I work today so today right we have USD see for example many things three to five percent and diameter pay into ten percent research so you can actually model apparent that you will know what the ads would be and then if the custodial actually invest your money directly to receive some compound or Instagram you can actually make so it's more complex cases so thanks for bearing throughout that too to look and actually miss out yourself we talked about some of the ways we can actually get it further and it'll be actually very interested in business order and if you want to take part of it since neither some of the team so one of the simple looking into is actually creating a situational is to the profile so we build there as mentioned before and a spoken by retreat but you know we're moving from something which is nurturing complete which is a language consumable aránguiz by each as transfers and always its final time transfer actually the inside of creating assignment was the financial conference of net time always a couple of exceptional of contracts which are not but in reality an option it expires and then it's killed you have the future is has expired a even swabs for interest rate they run for a year for a couple of I mean there isn't anything day and always their transfers so we can actually create a business of transfers which is a very inside of building the language however you know when you create a compiler to it is compiled attending for some security challenges so we are very interested in buying for the foundation and sent this other places for some grants to actually have the community building this is truly open source contracts are about it keep going it's as much ours as everybody else in room as well and everything needs to show how fractions and margin requirements will work let's go back to them is either that can be controller sat down and actually create a mismanagement otherwise just around the conference a functional but then you need to apply margin calls into that so that's it if I retain its meaning middle if you want to use it for DC's places yet what did you more researcher that the functionality of that so we're looking for somewhere research funding for that side and accommodation if you ever stopped but it's actually documented that will actually say so we have a loop in terms of the language it's really interesting if you want to use it you can actually need to read it as part of your tap it can directly work with by run to actually get you can easily connect it to a tax auction to actually be able to create complex which are based on it at seminars and yeah you can create more efficient price discovery because it can also offer some other ways of in quiddity and if you go to our github we actually show some of the [Music] [Applause] you
Automatic transcript — names and jargon may be misspelled.