 The market we're tapping into is really to offer infrastructure you can utilize to build the infrastructure derivatives. We've created a variety of derivatives where the most common ones are usually interest rates drops. We'll cover a little bit of that later. But this market is pretty insane in size, of course to move it from traditional market to the blockchain market requires quite a lot of production. It's to get some perspective which is a number of $40 trillion happening. These numbers are taken from the organization that's standardized. These doesn't end your business on a semi-annual basis. If we look today at the Twitter market, it's about $250 billion in size. And that's a fraction of the size of some of the biggest assets existing in the world like in this case Amazon, but Microsoft are a little bit of an issue inside. And that's a fraction of a lot of people compare crypto to gold, which is between $250 billion and $300 billion. So how do you take it? Which is again a small fraction of the world GDP, which is about 10 to 12 times that. Which is, I was surprised to see that after the world GDP during the one eighth of the size of the world. So suppose in terms of the size of what can go wrong and the ones which are more old in the room, that would mean through some of the crisis, I know it can go wrong. But it's a pretty insane market and it's a pretty, some of the challenges with this market is the way it's run today. A lot of the OTC transactions that sits on the side of the books of a variety of brands, like Goldman and others. They're not transparent at all. So they actually manage some Excel funds. We're going to start working on some of the work I'm going to show here some years back when one of the people who collaborate with Deutsche Bank and they show us what they're using, using a variety of Excel sheets to actually work with a lot of these companies. Which is kind of one of the things that also Obama was thinking about at the time that you have a lot of risk into this product, but you have very little experience into the size of it and these things can actually be different from the risk. It's a different discussion. So yeah, why would you think we can make use of smart coins for this? I put the obvious in this room. The idea is really removing intermediaries. There's one that actually deal with the management and sort of run the risk management and the risk profile inside it. It's very transparent. It is in the sense that you can see some of the exposure directly one day under our rules. And you get a multiple handshake, so there is no question asked. One of the biggest challenges that I would go with using these smart contracts are really security risks. For some of the people here, I know Krishna, you're from a security company. And I think there's the most famous example of security challenges being the priority frozen funds, I guess, of roughly $280 million at the time. And the DAO hack will not be full amount, it's been taken away for it, but it led to the half stock of Ethereum. But there was $150 million under our continuing Ethereum valuation around $11-$12. So it's been a few billions of today's valuation. And the interesting part is it's really the tip of the iceberg. There's also one security company that we are working with. And I think one of them is more interesting papers that you may want to have. I look into it here. A look was written by among others, Lloyd Loo from Kiber. It actually covered at the time what 45% of the contracts at the time were showing some little different levels of vulnerabilities, which is checked with Foyanta, which for me was a very interesting point where I actually saw that this technology has tremendous potential, but security is basically something you want to really be careful about. And then that's what kind of led us to start working on the era which actually allowed you the possibility of writing a few lines of codes, a variety of signature breaches, which in this more or less six lines of codes are functional writing which are actually pretty simple, and your language are representing the VRGC sitting here below. So if you have the tip here set in three months time, I mean from this one to June of September, you're going to transfer say 10 bit coins to 555 bit. This is more or less the code here. Describing will do much more details in a second, but this is started because we just say, in this case there is some transfer of heat from both parties and you multiply it by 555, which kind of set that change rate in this case between heat to whatever Alice wanted to transfer, and then Alice transferred about one bit coin in return. We use both as a pressure to kind of tie both transactions together. We're going to look to it a few times and then we scale it 10, so that's why it's 10 times the 555, and translate 90 days to say this code is going to be actually executed in 90 days, but we're going to look to how all of this language is defined just in a bit. So it's kind of a domain specific language for contracts, that among other things I want to show if we mentioned it here, but it's been done through formal verification, and some of the staff will look into academic. But it's the second before going into it, even if we're for a second restraint for discussing all the benefits of formal verification of the staff, it's very simple to code in. You can see here that it's five, six lines of code representing a contract, but if you actually written it so you would take hundreds of lines of code to create a simple future contract. It's also, I mean, you can really write it in two lines if we just compose them together, we make it quite spacing. And it's mainly because we want to enjoy the benefit, which is one of the reasons why people use domain specific languages, which is written like language. So you can actually more or less read it. I think we may change the word translate because it's not that easy to understand. It just needs to wait 90 days and execute whatever it's inside, all this composition of it. And also you get a lot of nice things from functional programming, which avoids a lot of the, let's call it, types that could be available at other places. Yeah. And one of the other benefits by sort of deconstructing the language itself from the, from the, is that you kind of decompose completely your programming language from the byte code or whatever you're running it up. So we have constructed, which we talk a bit, some master compiler that takes that language directly to UVM byte code, but it could easily modify to a variety of other platforms. And also without getting into much details of how the compiler is built, but usually one of the major steps in the compiler which is creating some abstract syntax tree is also very easy to modify a lot of this. So we have a lot of things which are transferable and also it makes it very easy to transfer the code after lots of functions and blockchains. It's underlined. Yeah, but before going a bit more into details, I just want to actually run with you a demo. As I mentioned, if you guys are interested, we have a special promotion for that code. For the first time, you'll go to the demo and you'll actually see that one, which is just inviting you to sign in to get 3,000 Japanese-ians to your XRX account. It's a very good program. So, yeah, but if you guys are interested to join, it's also not limited in location, but yeah, it's just for getting notifications on changes to the language. It's an email list you can also have. But let's look quickly to... We're starting with the future. Let's... Let's be just basic standard, but let's look quickly into how to create a future contract. We'll also cover how to create an option for contracts. So the way we kind of start this demonstration is going to get more and more technical with the time. So the first part are very visual. So we're going to show how to create this framework and varieties of contracts. This is just sort of UNX user language. Just before actually utilizing it, so we're connecting data mask here on top, which probably most people here use or are using. And can you... No, and if you don't have any it, because we connected on one of the test banks, it will actually direct you to receive it, because you can get... We cannot give you it on Tesla, but you can put your address here very quickly. And then if you want any other of the assets, maybe take another astrologist for the fun of it. Then you can... Once you have it, you can actually claim from our contracts so you can actually return all of these yourself. Which one did you get in here? The maker? So we're going to have some more demo maker in this case. And... Yeah. And... You can go to that by going to demo.liura.org. And I think we also share this presentation for organizers, so we have to put the link on the demo link. But I think if you signed before, the only thing to say about the promotion is getting the 3,000 of these hands. I haven't signed this one, because you have to do it before the end of the program. So let's start with actually building the first future contract. So we can choose an underline we want to use. Let's use maker for some of the time in the audience. And you can put it against, say, USDX or direct, let's say USDX. So let's bring you some exchange rate. Currently it's 1-1.5. And we can say it's a 10. And we get the USDX in privilege, so we're using in this case ours, they will come for it all. And usually you'll probably run into it in one month's time. Usually the most difficult part is to prove that we're not in the program. You already managed it. Prove it. I've failed it all the time. I see. But you're doing it very fast today. And usually you'll run it at some future time. As you saw, you'll probably translate. Usually when you check future contracts, the more liquid ones are one month or two months ahead. But we actually want to run it with you. So we're just going to run it for 40 seconds. And that's just great. So we'll probably do some of our MTR holding as we said once we have enough. So you can actually look into it. And once it's deployed on the testnet. Oh, we lost it. You've approved it? Okay, you'll give us the proof pattern. Why is it? I really don't know. It can help a lot. I'll try to move it away from me just in case. I'll be standing there. Oh, you haven't done it? Okay, so we'll prove it with made-a-mask. Prove? Yeah. And then it takes your part to custody. The custody is kept on the smart contract. Probably a little bit once the proofs actually happen that it will be deployed on the net. And it will take the 10 MPR to our custody. That's for the second. Okay, it's fine. And before we say too good, you can actually check the code of it in the backend. You could have of course done it before you signed it, but you can actually see the code that was creating this contract. So you see here, the first one is the address of the contract. And in this case, this is the contract that transfer. I assume the dollars, because there are a lot of decimals, but just because we use a lot of cartridges in the number. And then this is the dollar contract. It's a formal address of two others. And the opposite side is going to be trying to train the opposite way. And we have some limitation. We're going to talk about it a little bit when we look into language, but how much you're allowed to be taken. You can actually see the 10 MPR we're taking. Let's close it for a second. Once it's finished running, for the executive, we'll receive this amount of USDX in a little bit from the customer. And then it's finished. Let's give it a second. But in the meanwhile, we're going to go back to the code. I just want to show it pretty quickly. So in the end, we have both commercial, it takes both contracts on both sides. And we have 40 seconds in between. All of this is available online. There is nothing, there's no special privilege with that one. So you can actually try yourself and if you decide to do this, you may also receive some differences. Let's move back to the presentation quickly and discuss how to build that sort of code. You may even have to have the chance to write your own code. Maybe in the first examples, we'll do it very simply. But after that, we're going to show an option, and then it becomes more technical. And I'll let you know if some of you guys want to skip the more technical part. Feel free to do so. So let's continue. So we'll show a couple of examples of the way to be there. Oh, my presentation is up. So the first one is actually describing exactly what we've seen before, which was a future contract where the buyer is in the seller agreeing on a future price to trade it. And just before going on, I also discussed it with a couple of clients, including Yoni. One of the biggest challenges with showing a future that is traded in 40 seconds is people saying, you just cash-settled it straight away. But it's actually one of the most traded instruments because a lot of people that hedge their risk, whether it be oil prices, dollars, or also speculate, the main piece of future is that you actually don't need to settle and put all your funds in place. And sometimes you'll only, you can actually use it as a rule to do some hedging while still you keep your leverage in place. If you don't want to ask for a lot of your funds, yeah, so they're actually much more popular than a lot of the cash-settlers. It's about 40 billion a year market. But in this case here, we just showed the settlement layer. So you may transfer some each to these geeks and you will re-enterate for it before you make it. So how would we program it? First one will show what the future is completely. The next one is the market. Yeah, actually sorry for discussing it, I put it in the wrong place in the presentation but it's still there. One of the reasons why we mentioned the future is one of the benefits of building a system like that is that you can use undercollectualization. One of the biggest challenges generally with, I think, and maybe in a lot of what we see today in the learning market, which is of course the biggest coin against market spaces in Ethereum, is that you need to have some overcollectualization, some between 125% to 150%. Well, most of it is because, you know, when you have to trust someone you loan the money for, they are on interest to disappear, especially when they're just in a higher surface. But if you look into this 125% to 150%, most of it is just keeping making sure that the money is there, this 100%. Then 25% to 50% is your risk management if you like funds. Let's see what happens if the underlying is volatile and you want to make sure that you don't require that you consider for margin calling before you actually have to close the position. And in this case, there's a lot of time in future conference because they start with some sort of fair price. The beginning price could be easily that each is say $180 to $2 or $8000, whatever the rate is today, I don't know. It means that you can only need the amount of money to put in your custodial that would be enough to cover sort of the cost of closing the position and the cost of risk management you're going to put inside. So let's look into the code. So the first part of it is really simple. Alice wants to transfer it into bond, so you just do it. Notice, and this is notation, we'll keep to it. It's a functional language, so the end operation, I haven't mentioned it too much when we started it, but the community discussed it now. We discussed, the language has been formally verified, and one of their version of it is to move from something which is non-Turian-complete, language from a Turing-complete language which can do a lot of things, right? So we have a lot of benefits with using the Turing-complete system, but then it also comes with a price. And what's the kind of sort of the insight in the language is that eventually most financial contracts are finishing with a transfer or an empty transfer, which is zero in our contract language, which means do nothing. Leave operations in the functional language is always a transfer or a zero operation. In this case, it's a transfer of each from Alice to bond. The next stage is we scale it. We say it's two times. Now this scale has two parameters. In principle, scale only need to have a parameter two, which is how much you multiply the leave operation. So it's a kind of contract which takes a parameter and a contract. We'll go through the syntax and semantics in a bit, but the reason why we have two parameters is because the second parameter is referred to how much money you want to ask the custodian to or from it. So in the example we'll do this time we'll mostly use 100% custodian. 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 things to do. So that's a simple process. The second part is if we take, say, 200% checkered is to make a transfer from, in this case, of USGX from Bob to Alice, I guess 400 if we take it 200 at both sides. Now these two are two separate contracts. So if we just use them together, we need to approve them and repeat all the processes separately. So this way we can follow this with both, actually allow us to take both of them and also make it atomic so the transfer will happen in the same way. And that thing to do is we said we actually want to run into one month's time and then we take these 12 ones and we put a month's sort of execution and wait for it and we finish the contract. So it's actually pretty simple and in a bit we'll also look a bit more into the coding part. Yeah, so let's take another part, go back to the demo because I want to show you the option part and then it's going to be a bit more technical. So if it's a bit... So let's look into how to create an option. So in this case we'll choose say Bitcoin and maybe we'll take 10 Bitcoin for the execution. So notice before we're running it is that you have to have a premium. A premium is usually a cost of the options. We're going to discuss a little bit about the bill. In a second, for the ones that are not sure how options works, I will actually explain how we want to do more details. But in this case we talk about 4% of the cost as a premium to create the cost of the option. And again as before, you can probably run it one month ahead but we'll take it in 40 seconds. So let's create a... So obviously the cost has been a bit more in the premium because we've got 10 of those so we just multiply the cost of one option in 10. Wait, so wait for the deployment of that and then we also can show the price in the money that you need to receive. In this case in order to break even on the cost of the premium, you can just start it up. So we added some sort of live peak which is of course not correct because the price doesn't go so fast but we just wanted to kind of give a look and feel for it. So of course take the price when you started it and then it actually sort of simulates some possible trading of that. So wait for it to be activated and then you can actually check your profit or loss in comparison to your initial position. We started with 4% costs so we started with a loss on that side for the premium and then eventually you can actually see how the prices in this case the money is going to change. We simulated it to finish in 5% of some random work so you can actually see it but it just to get kind of the feeling of how it could actually change that live and actually follow the prices. And in principle all of these are fits through some of our oracles which you can integrate it so there is no this stuff could be live if you run it live. And then it settles it again so in this case to make I guess 860 USDX so at some point we're going to get it back but you've seen that part before. So again you're welcome to try it out at your own time on demo.zero.org and should we go to the GitHub maybe quickly so I think we're going to have a small tour to our GitHub you can actually press the link there but there is also a direct link from the demo to the GitHub if you want to run it 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 going to run a couple of coding samples. Great, so again so I think the screen is sticking on so the language is actually based on a paper we issued about a year ago it seems it was also nominated for best paper information systems best year and you're welcome to see the GitHub it's actually show a lot of the specifications there are a couple of modifications from there but I feel free to have a look and also some of the motivation behind it so we can just go quickly below and see how the language is actually defined so the language has a variety let's look into that we have some examples of how transfers and scale work and what do they enter you need to have some address for the token and then you have part 1 and part 2 in scale you have two parameters you have n which is the maximum amount you require to be all in custodian and in this case you have also e how much you want to multiply the ERC 20.n but let's look a bit more in a more general way how the contracts are defined so obviously it's sort of functional so contracts can be created out of contracts as well so actually what we have is we have the zero and transfer which are leaf operations so as you said zero is just an empty contract if nothing should happen and the transfer is a transfer of an address that we are presenting in contracts then we have scale which allows us to multiply contracts with some number we have both which allow us to come to a variety of contracts we have translate which takes the time parameter in contracts which allows you to run the contract with some time delay and we have if we do something we are going to conduct a little bit later we are going to look into some optionality features because it allows you to get some Boolean expression happen within a time frame which actually it's quite interesting how you do it technically but it also gives you a lot of ability to verify and put in functionality into space the expression we have could be either some expression or number if you would like then you can have an operation between two expressions it's quite a straightforward expression depending on what operators you have you have the normal operators and you have if and or and and you also have the not and then you also have observable observable is maybe not the best name but it's a way to describe entering data to your operation on chain so it's very similar to how you use oracles so in our case they are kind of represented in oracles within our framework yeah and of course you have two types in Boolean and time can be either now which will execute something directly or it could be with a different time unit of seconds, minutes, hours, days or weeks yeah let's move a bit further how are the future execution scheduled? how it's scheduled practically or I'm so yeah let me try and answer it if you have like let's take a look at the future can you or you can even show it on the code I just want to show I can run an example of how to execute the future yeah we'll run an example but just to answer your question you can execute a contract whenever you want to yes and whenever you execute it you actually move the time forward so it means that if me and you were engaged with the contract because you know sorry for the answer but you know the blockchain is asynchronous, someone have to start it I cannot just say let's run something in two minutes and it will run before there's another party running it so I can be initiating it for a long time the way we build it was that whenever you execute the contract to actually run which everybody can do it's sort of very public so everybody can execute it it will look into the time that it changed between then and now and the right time point if the right time point is passed it will take the price of that money time and deliver it around the answer no there's a good answer or not really so there's a bunch of future contracts then when that time comes there should be a massive amount of transactions that have to be executed yeah but they don't have to execute in the exact same time you can execute it after the time and it will look retroactivity there is also the element of simplification if you would like which means contracts are getting simplified over time so if you would have a contract which has a time translate in the beginning of say 90 days you could in principle execute it after one day and if you see the contract again then it will be waiting 89 days if it was 90 days because it will see the time pass it will see not induce an operation because it's still in waiting time so if you start with a contract it's three months and after one month you execute it then if you look into the contract and say okay the time actually is not three months it's only two months now and it will create this contract which is kind of simplified with two months time and it can be executed again you can execute it as many times as you want but the time is not existing and this should be the system so it's actually we can take the time from the contract so you are right we thought about it so the time is relative but still we can actually patch it so maybe before we show some of them I'm just writing a future that will mature in 40 seconds so we can demo it and then for this we created a library that you can install by just if you have a no-patch manager installed just write the if you have install g lyra-das and then you get it already running okay so let's do the future here so that is the one I'm going to scale so I'm going to do both here and I am going to transfer 150 if from Alice to Bob and then after that at the same time I will transfer oh usdx transfer one if from Bob to Alice so this is just the same example that we've been showing you before you need a comma between them and there it is so when I run the compiler environment will also create a local environment with a ganache plugin so we can test it without actually spending any money so in the first instance here I want to I want to compile the future we just created here so I say wait 0, direct the path and then now compile so now I have an instance of this DRAM contract compiled here both as a source code oh I forgot to save it actually so let's try it again yeah the thing is which one of them is at this is not maybe it's first as a problem of existence okay so now we have it compiled and if I say the source code and you can see that this is the actual source code where I use Alice Bob as a placeholder value because I don't remember the addresses of them and I can also see the bytecode does the type checking works for symbols as well it's just these are just placeholders so normally you will write the full address but in this case when you create a development environment it will just create some test terms for you and some test accounts and it just changes them when you compile them okay but what would happen if I write ETH with two these that's not as if you're in and that will deploy the contract if you're using it on the real test that you would need to actually have the address of the ESC20 but here we just run it locally so so none of us will ever remember that so for ease of use it will automatically replace the different placeholders with these as you can see so here's the compressed but you can actually see that I transferred here the usdx which is this this is just running locally this is just some random terms so if I can actually just check the balance of the usdx so I can see how much do the Alice have of usdx she has a thousand and Bob has a thousand and and the same should be with instance 4 okay so now that we have a compiler we know that we can compile we will actually try to deploy it so we can just compile the contract here and call deploy so you can see that it's now this is now the contract address of this Lira code so the first thing we want to do is to actually approve this Lira contract that they can actually spend money on Alice's and Bob's behalf because currently Alice Bob still owns the token so we need to approve it so it can be put into the contract as an escrow so let's say that we take this contract and then say approve and then for you can see that Alice needs to approve one hundred and fifty dollars like this from Alice yes yes this is Alice's address from Alice and then how much do we need to approve one hundred and fifty and that went through even though it does look like it but this is a success so and then we in the other case we take the Bob and here we just approve one ETH and this is going through as well so now that both pipes approve the right amount we can now take the future contract and say activate and by activating we actually it will then take we can now put it into escrow into the contract and then start the timer as you can see and you can see it generates some transaction events so if I actually check anybody can actually anyone because either if Bob didn't approve his amount it will not so even if the approval card goes through the contract but none of them does so if Bob forgot to approve his amount nothing will happen and anybody can approve so the forty seconds starts when the activation starts yeah so now if I check I guess it's possible for Bob to kind of wait until there's like a good ETH USD rate and then if Alice doesn't want that she would have to this is one of the reasons why both execute and activate our future our public to kind of put the incentive for you to start it's also means that if you are a provider for change services you can activate it yourself so if we offer for example a Torx, a future or an option based on river we'll actually activate it directly and be able to use it to make sure that it's activated next block is it possible to retract an approval say you approve it and then say yeah, you can if it's before activation so if Bob does it I could I just made my approval amount to 150 but at the moment it's 0 and then the activation will fail and no one will be taking over their approval amount so just to check that my approval amount being taken from Alice we can see that she now has 150 which corresponds to 1000 minus 150 and the same should be with the if balance of Bob speed 999 and Alice should still have 1000 if so now we can make sure that 40 seconds are lapsed so let's take the same contract and now we can execute and execute will check if from the starting time whether these 40 seconds actually has lapsed and if it has it will execute this contract let's execute it and we can see some transactions has happened and if I now check the balance of Alice you can see she has 1001 whereas Bob should have below 150 is the action so now this future has matured and it is now the zero contract so I just want to mention at least if you are a Mac computer installing in MPM is very simple and you can do that again all of it is up and so it's no problem to go directly the same will also explain the guitar let's jump a little bit towards some of the more fun coding and it depends how interactive you want it to be so I think we are going to expand a couple of contracts and also give you some time to try to do what you want to if you don't want to we can show the answers over there let's go with the hands the first one is we spoke about the fact that you want to talk a bit more into call options it was nice to show it but then talk about it a little bit more details so again in this case when you have a call option you have a different application to run a specific contract in this case you have something that is called something K there's a strike price if we think in this case about trading interest or some kind of dollars and say that if you put the K to be 150 it means that this price is over $150 it will make sense in this case for Alice it will enforce the bubble pair in the if price to 150 but if the price is below that she doesn't have to activate it she doesn't have to run it so the value of this would be kind of zero so a lot of time people use this sort of hockey stick for example I think it's more popular in the other part of the Atlantic than in Europe at least because before this strike price of course the option because it has no value but over that it starts going linearly and it's actually 45 degrees so you get $1 or $1 with the price at that point and then when we think about call option we look into different points so this looks and the underlie as a price of maturity so the option value is any value over the strike price at maturity exactly and a lot of time also when we looked into the option example before in the simulation we looked at the price in comparison to the beginning price so we look at something that is called sometimes the interesting value so the interesting value means if you exercise it straight away what would it do work of course you can look into that show so I don't know those to use in planning volatility so now we'll price it don't worry we're not going to go through it today if you want we can go through it afterwards but then you yeah we can look into that but that's not the subject today we'll mainly look into the interesting values of those derivatives so then the question will be if you wanted to create that nice option how would you actually start coding it someone want to make a suggestion do you want to take a minute to think about it we'll take a short minute I'll just give a small clue to start it up that you can see that at least zero or the price minus some kind of the strike price so we'll give it a short half a minute to think it up you can see that you want to maybe open quickly the github to show the language bit that is you could if you want to think about it you can think that at least in this case you have maybe two prices maybe you want to use some of the capacities to use max in this language because this could be a very useful way for you to take either zero or something which is a bit higher in that chat a little bit about that so if we're going to the first example so the first insight would be that we'll have to be at least zero I mean if we didn't have zero if it was a physical delivery option we may only take the other part of it so the other part of it is that the price feed remember we had observable in the language which actually is similar to taking price oracles and our observable would be a price feed that would take in this case to introduce the feed and you can see what is that if you're like that oracle minus 150 but if our strike is 150 this would describe the difference when this price that you got from the oracle and 150 so you may put the max there as well and then if you of course you want to make some transfers as a result of it so that's the amount you want to transfer between Alice and Bob in this space if we refer to the difference between each price to 150 or zero and of course you want to scale it and here is the part where it gets a bit more tricky because the risk management gets into space because we don't know precisely how much would be transferred here so you need to decide how much actually of the asset you want to keep in custodian which is what you approve for when Peter from before the demo so that's the first point 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 transit one month as much as you want to manage so this time you would pay inside like a European call option notice again this is about five lines of code pretty simple one pretty easy to create any questions on that actually for a second why did it scale 1,000 again yeah, that's a good question it's because let me take it in perspective so this part was kind of clear right because you pay either zero or the price minus that then I said that how much it will be at maturity and one of the interesting part is the risk management and the scale doesn't have to be 1,000 it could be 50, 20 or whatever you want it to be but in this case we said we want to make sure it will be enough to be paid and in principle call option could pay infinity right so then you ask when do you want to stop it so there are two different subjects on one hand you would say this is a payout that can lead to infinity so we need to make sure the risk management in the maker system right you have the way of creating a margin call and to say it's really liquid so you don't actually need to require all the funding in there and at least with call options which are actually pretty easily hedgeable because if you hold one hit you kind of hedge the position in a way I can discuss hedging a lot I won't do it here not to bore everybody but the point is that in this case you know that it's very cheap to even hedge it because you just need to buy one hit and some cash but it means that if I was an arbitrator I would actually if I had a contract like this existing and someone didn't hold say $30 inside it I would buy it any second because I know I have to hedge my position with zero risk so I would just pick it as arbitration the same as you have in some other system like the maker system but if you don't want to get into this area and you don't have a way to deal with the risk management part you need to make sure that the contract sells money because this could pay infinite in principle we decided this there would be $1,000 the other side of it is of course that makes it more difficult for Alice because she needs to deploy money to the studio right so there are two sides for that answer your question any more questions or that's actually the option so then if you wanted to look into the put option and the put option would have a different payout right the put option would take the price in this case of the current in this case and we would reduce it from a larger price in this case it works about again you have the option not the obligation to run it out and in this case you sell the underlying asset for a specific price so in this case you benefit the price of it will go down because you would say a free design the strike of it would be $150 again so if the price is below $150 you will get the difference between $150 and the price of it so if it goes up to zero unlike the example before you know exactly what is the maximum loss so here we have like a different kind of hockey stick so you know the nice thing here I guess as a user is you know your maximum loss would be the K or whatever was your strike price and again it goes in here on the other side it can be as both a speculation or for hygiene purposes similar to the case with the call option the interesting value would just tell you in a specific time how much value you will have if you would exercise it of course you have the price going down you will have probably happy to exercise it and you can also hedge it up and then with more complex models for diseases you can actually call that up I will go up it quicker do you want to think about it or just start a bit so again similar to before you will have here the maximum $150 minus the above price so this is very similar to the previous one here it is of course more simple to put the maximum loss because you know that there won't be more than $150 if that is zero but you can still have some more partial money requirement so let's take some more interesting market let's look into American call options so the difference between an American call option to a European one is that in the case of an American call option you will have in this case with other premium in America you can actually exercise it any time 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 one of the features are quite similar from a model if you're expecting it to be more complex but the payout is again in this case the if price minus the strike price so how would that look like in this case you will still have the same as before you will have the max observable payout at the time of exercising so this is the exact same formula we've seen before and similar to before we scale it to whatever amount you want to have in your study but then the difference and here we're using some other methodology if we've been here because here we have a longer period of time in which you can decide to exercise your option in this case say it's a month so then you have a a compact that actually have two options in this case there is the option that Alice actually decides to exercise it within the period that she decided to exercise it in that case we'll have the payout as before notice that here the payout is immediately at the point that she is doing it so you don't have to wait otherwise you're just going to use the zero contracts which we mentioned the contract start you said zero is just empty contracts what's that about the American option? what would be the syntax to have ten of these options? I couldn't hear you sorry what would be the syntax to have these options instead of just one this is for one option but the same is that each of these options is a smart contract right so you can do it in two different manners right if you wanted just to create an empty C transaction over the counter between you and me and you didn't want it to be tradable you just say let's we have this contract it's just between the two of us then you could just scale this by ten that would be very easy because you have the one exercise in it right so we just had a scale function here with ten and whatever if you want it to be very liquid we might say let's create ten let's create like a contract of that or ten of these contracts and then we can trade it directly in some assets in a fraction of it so you're trading on the how do you like who's Alice and who's Bob so one of the features we have and if you want actually Peter can probably show it so we created the Alice and Bob addresses for any proposal it can be a smart contract if you want to add the trade it or just to play around with it or it can be any address so it means we have a way to actually change the addresses under your approval so if you are Alice you could in principle send me your position and from Bob's point of view as long as there is enough money for the management discussion we talked about before as long as there is enough money in the custodian you don't mind if Alice sold it at the site so these are just addresses this can actually be changed in the contracts when it's deployed so if they're all in one unit because these contracts are actually I know it may sound a bit weird if I don't know how much you're familiar with derivatives yourself but because you can actually do that they can be actually pretty little so what I'm going to say is that even if I was even if I'm interested in if I'm not interested in this American option or European option and that was actually the biggest if you like contribution of black and chose the reason why it was so useful was not because people actually knew what was the price of options and it told them a lot but it's because it showed market makers and this hedging is really useful because it means that if there is for the options which I'm going to talk about a little bit, then it's a great business to create this option and sell them around so it means that even though it is an example I put a lot of funding into it just to make it very simple in reality you probably need a fraction of that because a market maker even if he's not interested in say Alice's position you can hedge it very easily you can just borrow some money take Alice's position and if he's paid 50 dollars to do it, it's a lot of money in the real world for taking such a risk so what it means, it means that a market maker can buy it and sell it in exchange for example like normally, or he can buy it and say in the meanwhile, maybe I would like to sell it for an exchange if I get a good price for it whatever a good price means but in the meanwhile I can actually hedge it actively because it's an USD that I buy on Itorax, Binance, wherever I want to trade and I don't actually mind it I know in Sezum and I will not make loss and this hedge meaning maybe costs him half a dollar so this is why it's actually so interesting when you build this product over very liquid assets like Bitcoin and Ethereum maybe if we pick some more tokens which are number 400 or 500 then maybe it's less interesting because the liquidity of these assets is quite limited but even if you take the downsides what Bitcoin and Ethereum are taking you're probably pretty certain that you can sell them if you can have half a percent from the underlying price it makes sense or if you want much more information on hedging which I worked for some years we can talk about it but we're trying really to keep it clear so tactically though Alice and Bob would just be very able that the contract should work and then send whatever address yeah we actually have to deal with that but if Alice is if I'm Alice I can transfer my position to an address and then you can transfer that further down the line so I did some of the nice stuff because when the contract is out of the clearing and the risk management part is very nice to do that if you're interested we also have more we can share with you some stuff I think on a different section we'll talk about future development some of the more interesting part you're taking to is actually in this case very similar to also what MAKERDA has done in a way they use in their case MAKERD as an OMKR as a tool to deliver risk management part of the system so you can easily say there will be and I think it makes sense when you go back to MAKERD that you're kind of setting the parameters of how much risk you will need to get you set the parameters of how much margin you require that will just hurt your business if you offer people that 5% on the margin you can trade in around 5% maybe you'll get more business if you do it under 50% so you can affect that but you also have the risk management if a failure will happen for the system you'll have to pay back that asset so in this case you can actually have lower margin requirements because of derivatives and between these lower market requirements you can set risk management parameters it's one of the things we are looking into so I have, I work both for you know I work for ETOR and ETORX has changed as part of the ETORX app so we build a lot of their products but also I work as a professor in the university so there we actually develop developing it also more theoretical and if you're interested we'll be happy to talk about it any more questions on that specific example so now we're going to add the premium because we talked before and I think it was an interesting development because we start talking about what are these weird products and now we're talking about how do you actually trade these products and of course these products usually are premium defining to them most of it is sort of classical math finance I'm not going to do it here today don't worry, I thought I would price these options but in principle not only you want to be able to trade this option in this case a call option or an American call option you want to also put in the premium payment into it directly so it means that the hockey stick went a bit lower because as you could easily say the call option that we described before and only positive in it it gets zero or something so it has to cost something because it's going to generate zero positive payment and this is usually captured in the premium so if you take the interesting value of the premium again you just marry us the cost of it if you're a member in the simulation before we introduced a premium of 4% and then we kind of the price started minus 4% but here what you actually looked the same as before you'll have the if within all this part is the exact same thing as the American option as before but now we just said both and another payment in this case if the premium is $5 we just said it once or 12 actually paid to Alice in order to receive the rights for possible future payments so it's actually very oppositional I may say we decided not to do it but at the time when we worked with some big institution we actually were able to show that almost any OTC conference you can actually deal with this so even if we were looking for more exotic stuff we're not going to cover today like basket options because it's very compositional there's no problem to create a basket of three assets and divide them and I'm sure if you followed so far it's very easy for you to imagine you can do something like that because you can do the expression part and you can also create adding a variety of things both the only thing that's noticed here is that one of the things is how you actually enter the price so if you guys want to play around with you in the test environment that Peter mentioned before one of the advantages to use it is that you can actually bring inside either a wooden observable or a integer observable so we sort of created a way for you to have more molecules in a very simple way if you don't want to spend more time on it and you want to play around with it so you can create a wooden observable like the exercises that's Ali's exercise and you create an integer observable for things like the chair of the US dollar exchange rate and it's already existing in this environment so of course we use Ali's and price for each year to more clarity but these are the things we're using in the test environment so let's take another example of a bit just taking us to the direction of more exotic which is the upper hand barrier option so what it actually means it means that we have an option like we've done before but it's only becoming valid if something happened before so what does it mean take the picture before we have a nice sort of call option payment this call option would only be exerciseable over this price if the price is touch and not in price I'll go for an example and come back here to show it look at this maybe that's beautiful but it's easy to understand example say that we talk about each price and our barrier has been if it is 150's maybe touching 200 or whatever it is so it could mean that it is below like now it's say 185 or whatever it is today but the option you can only exercise it so take an example say that there are $200 each price where it's actually getting too late but the strike price is only 150 but the requirement for you to be able to trade it now for 185 or whatever it is is that within the period it has exceeded the 200 and if it doesn't happen then your option is not in place these are actually pretty interesting assets that are also using for not only it but either more traditional markets and then sort of so you remember that there is a knocking price it's not necessarily the same as the price where you have to exercise it but it's what actually validates your option so how would you do it with lira so the big difference here is that you actually just require it before you start with your asset and if it would mean if it would mean that the price rate has touched will be bigger or higher in this case 250 or whatever it is that you want to put it and when this strikes in people inside become invalid at the beginning right? so then if you combine them together it can pretty easily create things like that as well and we added a premium in the end but this is another transfer so CDP would be useful so I wanted to show how you can actually use it in places like some of the existing infrastructure so right, we can watch what CDPs exist at a given time but we can now actually create sort of insurance and CDP prices so one way to do it would be to put in a CDP if the CDP is liquidated to actually insure against that so how would we do that we would look into some default that happen within a specific point in time and if that default actually happened there could be a premium that is paid so it's pretty similar to paying you some premium if a liquidization happened and again if this would be sold you'd probably want any or zero if it doesn't happen as before but if this has happened you'd get this payment zero otherwise and then you'd pay them both with some payout so say a hundred dollars to pay for this premium you can of course very easily create composite together and create monthly premiums for it with both of that as well so question on that example cool so another interesting market actually pretty insane inside is the interest rate swaps market and interest rate swaps will in a second connect a little bit towards how it would be looking in the places like crypto industry but they are actually pretty popular and the reason why they are popular is because we all pretty young here in the room but at some point maybe you want to retire and when you retire you help to get the same payment every month for your retirement so a lot of the pensions found that very very interested in being able to know how much they can pay and pensions is a serious business in the world so the way it works is that they want to make sure they get a fixed payment regardless of the interest rates change over time so an example but you don't know what would be directed would be paid on the other side so an example is you want to receive 5% so Alice raises 5% and then if they pre-agreed and 4% if Alice pays alright let me restart Alice pays the verbal rate and Bob always pays 4% so if Alice pays 5% she will end up paying 1% to Bob because she has 5% payment he pays 4%, the difference is 1% otherwise Alice pays 3% because the rates are slower then Bob will pay 1% so again we can create a contract like that with Lira and actually check the position element so again in this case we say the rate is 4- whatever is the observed rate by Alice we make it percent so we divide it in 100 so as you remember the example before we have said that whatever Alice is receiving she will receive 4% from Bob and he will receive the difference so if the rate is 5% for example 4-5 is negative number right so 4-5 will be negative so there will be 0 payment in this case from Alice to Bob so let's check it again maybe I'll just quickly do the work because it is a bit more complex so just to make sense so we have this interest rate swap you know I once did it and then when I finished doing it I discovered that the pen was not in a huge room so I really hope it's not the case here I haven't checked it yet why it won't matter so we have Alice here and we have Bob in the other side and then we said that Bob always pay 4% right regardless what happens he pays 4% but Alice payment is a variable payment right because it depends on the exchange rate or the specific rate pays on the time and that could be say 3% or 5% or whatever it could be so when we actually model with Liro we need to make sure that we don't actually know if eventually eventually what would be paid is the balance between them if it's exactly 4% it's 0 but in most changes it's not going to be so we'll have either payment of something from Bob to Alice or payment of something from Alice to Bob and it's based on the exchange rate so the first one we looked into here was 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 because Bob pay 4% if the rate is 3% the net rate is 1% to 12% but then in the other case we can make sure that in a very similar way it is the other way around that if the rate is below 4% then Bob will have a payment back to Alice so it's very symmetrical and some of this payment will always be divided in any practical element because this will be the match of 0 or the payment so it will be 0 or 1 of them and the other one will be the transfer rate so either Alice pay some dollars to in this case to Bob or the other way around any questions on the exchange rate swaps it's a bit complex but sorry go ahead can you model this using the AFL syntax as well actually it's a good question and also generally saying that a lot of the conflicts that you create you can see that you can somehow model them in more than one way actually if you think about optionality generally we use max max is almost always can be modeled in settings because if the max is something was over that then that otherwise would be right so the answer is yes but it just to kind of show that you can create some yeah and then yeah then of course you may have monthly payments so you may return that you transfer it in one month ahead but you can have two months ahead and three months ahead and sort of tag it over another period of time this one we are not going to show but it's very similar but I'm sure you can imagine it that you could also create it cross currency assets so there is an easy way for you to create from Japanese yen or USD X and a lot of time a lot of the some of the more interesting take a picture one of the more interesting ways to create some of these swaps are based on the carry because for example we are now so often the rate on Japanese yen has been pretty low on interest and maybe the dollar is high rate or some currencies today have negative rates like Euro, Swiss franc I assume you can use that as well but you actually have to deal with negative carry and one way to deal with it is actually to use some swaps to receive and have some of your interest rates interesting case you can also try and model it around some of the arbitrage happening in the DeFi world today so today we have USDC for example maybe playing 3-5% and that may be maybe 8-10% so you can actually model a payout that you will know what the payout will be and then if the custodian could actually invest your money directly to receive some gain in compound or instead of you can actually make money or something like that so it's a bit more complex in these cases but they are open to creating them as well yeah so thanks for bearing throughout that we actually seen quite a lot of interesting examples and I invite you all to look and actually build some of them yourself let's talk about some of the ways we can actually build it further and we are actually very interested in doing the further and if you want to take part of it feel free to contact me or some of the team so one of the things we are looking into is actually creating a security audience for the compiler so we built as mentioned before a household compiler tree but you know we are moving from something which is non-channel complete which is a language because think about our language right it has transfers and always there are a lot of transfers actually the insight of creating this language was that financial contracts are always there are a couple of exceptional of contracts which are not but in reality you have an option it expires and then it's killed you have the future it has expired even if you take the example of swaps for interest rate they run for a year for a couple of I mean there is an ending there and always there are transfers so we can actually create a business of transfers for building the language and however when you create a compiler tree this compiler can live for some security challenges so we are very interested in applying for the foundation and send this to other places for some grants to actually have the community building instead this is truly open source contracts so everybody can go it's as much hours as everybody else in the room might as well and another thing is to show how fractional margin requirements go back to the management part either that can be controlled for an hour or otherwise just allow the compiler to have a fractional but then you need to apply margin calls into that so that's made a different level of complexity but I think it's really needed if you want to use it for disease in other places we want to do more research on that and the functionality of that so we are actually looking for some research funding and we have to improve the commendation of your other staff but it's actually a fairly good document that I would actually say so have a look if you have a time in terms of the language it's really interesting how if you want to use it you can actually integrate it as part of your DAF it can directly work with Fliran to actually get to a lot of the things that you want to do directly you can easily connect it to a DAX or auction to actually be able to create contracts and sell them out and yeah you can create more efficient prices because it can also offer some other ways of liquidity and if you go to our GitHub we actually show some of the things we don't have to run through but you can see some of the open issues that we are looking into and if that's something that you are interested in feel free to come by and share with us so yeah, I think that's it