New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Journey of a DeFi Power User - TOKEN2049 Singapore 2023

TOKEN2049Mon, Oct 9, 2023, 12:00 AM

Transcript

thank you for having me so I hope I I can add some value today so I'm one of the fans of kirok I'm not gonna talk too much about hero today because I felt that the point of this presentation should be to add value to the audience but in case you don't know too much about herok so we are our large algorithmic trading firm we're Market maker uh we have a multitude of services and if you want to learn more about them uh please get in touch we have a booth uh but for today uh what I want to talk about is is something else when I talk I want to be able to give a little bit of value about what has been our journey as a D5 power user so around around two years ago we we started on a mission to understand where this technology is taking us and what we see is that a lot of people in the industry are Builders they are building protocols and majority of presentations and information out there it's from the point of view Builders we are power users so we are the other side we're using this Tech and we want to share with you today some of the learnings that we had from that experience okay so um I'm gonna start with something very basic we are a market maker so of course when we look at decentralized Finance the first thing that we try to figure it out was how do we provide liquidity to do this thing how does it work as a lot of you know there is the concept of amms correct and just before I go into the presentation I think it's important take a step back and really understand what the is an amm so I don't know if you ever had a situation where you're uh in University or maybe in high school and you were taught for the first time calculus and how an integral would work you're probably taught that the area under the curve of a derivative of of an integral will be equivalent to an infinite sum of pieces and that's basically the exact same difference between an order book and a function based Market maker they are actually in a sense the same it's just that one is a discrete version of the other one is a function the other one is discrete but you can actually generate the same with both okay so we look at that and then we conclude okay actually the reality of of amms is that they are not an improvement on Market making they are an improvement on access to Market making intelligence which is slightly different okay because they are not actually better algorithms but they do provide a huge value in terms of access with that we started to experiment and you know like enter into the industry understand what type of liquidity systems are there what we realize is that today we basically can provide liquidity in three different ways in D5 you can go to an order book where they do exist it's just that the settlement is Unchained correct you can go to what we call automated pricing system so we don't call it amms we call them automated pricing inside of automatic pricing will have two types we have function based systems like uni Swap and oracle-based systems like GMX and last but not least we'll have RFQ RFQ systems with a market maker we just match a price directly uh for today because I don't have enough time we're only going to focus on the one in the middle because I think it's anyway the the most interesting one okay so we're gonna go into automated pricing systems and describe a bit better how they operate and the experience that we had so starting with something very basic all right everybody everybody knows uni swap uh I I do like and I think it's interesting to have a step back to look at it from a visual perspective when you look at uniswell I mean everybody know there's information laws but I think when you look at it in a chart it is more telling so the diagram that you see here it's the visualization of the the risk the the return curve of a uni swap V2 boot whether you see there I mean what's what's the message here is actually very simple which is this is a terrible structure you have very very fat tails if you provide liquidity you'll probably end up losing money as soon as the price moves more than 30 percent so it's basically a strategy which has a very very fat hidden tale correct and and that actually happened I mean if any of you provided liquidity to UNI swap E2 probably you probably lost money I mean it's just the reality of it correct but uh fortunately for us then there was the implementation of concentrated ranges and here we got more series we started to develop technology and systems to be able to manage these ranges as we did that we realized that we can provide liquidity on tight ranges we can use multi-called Atomic contracts to move that liquidity around so we started to play with it and you know like just deploy liquidity and follow the price and I'm not going to talk exactly on how it works but imagine there are many different algorithms that you can develop in uniswap because again it's just a function similar to an order book but what is interesting for you to understand is just that if you would have a a market where you want to be 100 all the time correct like if you have a restriction that you really want to provide liquidity all the time it's possible to actually subtract and learn from how do you make that payoff work for you correct and like what we've done is a little bit of a hypothetical case where we say okay if we provide liquidity on a range and we have an assumption of implied volatility in that range how often will we would get out of that range and assume that we rebalance or we take them permanently loss of that range how how much loss do we accrue and how many times we need to rebalance and what that generates is a little bit of a function you have it in front of you and that function would actually curve and find an optimal point that optimal point would be a point where the losses from the impermanent loss get to one to a minimum phase correct so like they will be they will start to get close to zero but your range is as tight as possible therefore you collect the most fees and this is the mindset that is used when you provide liquidities on like unit swab trick right or at least This Is How We Do It um after we did that then we realized this is very interesting and then compostability started to become a thing so protocols start to build very interesting derivative products on top of uni Swap and I don't know if some of you have have looked at perv.com so prep.com is an implementation of perpetuals on top of unisa V3 which meant that all of a sudden we had access to leverage cross margin and high Capital efficiency to test unisa V3 strategies so we went ahead and we did that and it was actually very interesting because it proved that you can use concentrated ranges not only for a spot but you can also build complex derivative products which is very interesting correct after we did that and we kept on experimenting and looking at it and and there are there are up new up and coming Innovations into the into the space we're not 100 sure of course where is this gonna go but a very interesting use case of these has been implementations like carbon where the the implementation of the market making function gets split in the buy side and the sell side so what that means as a market maker is that we'll be able to basically create artificial spreads in within concentrated range models it starts to look very similar to an order book at that point and this is a little bit where it's going yeah um after we did this research we started to look at oracle-based Market making systems and those ones these ones are very very interesting actually so for those of you that have looked at something like GMX correct it works in a very simplistic way correct you have a basket of assets the basket of assets accrues three different types of Revenue so you would have Revenue one being the funding rate of the Traders Revenue tubing trading fees and potential Revenue three being the losses or the gains of the Traders right so the Traders they if they lose money the lp makes money but the other way around so the lp starts to carry a risk this risk is not an impermanent loss but there is a risk and we started to deploy Capital into the systems to understand how they work and figure it out if we could actually use Unchained data to detect Trader behavior and offset that risk whenever we wanted to so so we did that and that took us to understand how this whole Dynamics operates all the way until we started to look for companies that had better implementations of of this oracle-based technology we end up investing in a company equal Arc which does something something very similar um but this is evolving to implement mechanics where the protocol itself can use incentives to offset risk for the LPS and this is really where it's going correct but it doesn't really stop there correct like when you look at oracle-based systems they unlock a wide variety of opportunities and the reason that I'm gonna bring this example here which is the implementation of interest rate swaps interest rate swaps are very complex Market probably many of you would not be aware of how they operate but it's very interesting with a very simple setup using oracles and basically a approach of trading against the average of Traders like in GMX we can now create swap markets the only difference between a perp Market that uses an oracle for for Market making and as an interest rate swap is the actual cash flow obligations so in the chart here just just for you to understand it'll be better you have a range you can provide liquidity on that range similar to in uni swap it's just that you're providing range on a rate instead of on an asset so on unusual V3 you would say okay my range is ethereum from a thousand two thousand five hundred here you say the staking rate of of ethereum is going to be between six and eight and you can provide liquidity to that particular range after you do that cash obligations start accruing between what is the fixed rate and the variable rate these protocols exist and we've actually stress tested them is super interesting the kind of things that you can already start building on D5 and and this Market's still very young but this is exactly the kind of things that we are researching correct so if also you're building anything like that please please get in touch yeah so um we experimented a lot tested a lot of different ways to provide liquidity and what we wanted to do today was just to bring expertise on three elements that anybody that is playing with D5 have to consider correct which is data latency and risk so we're going to start with the first one pretty simple everything that is data so you need to have a good setup for your data but there are two basically main ways that you can do this you can look at API providers or you can look at an RPC note first and foremost you know like it's important to consider rule number one which is on chain data is free so if you know what you're doing you can actually get a lot of data at a very low cost but of course you can also pay for it you can go out to our provider now if you go to a provider through an API uh my suggestion would be that you mainly use that for data science data analysis historic tracking correct but real-time decision making only with an RPC note right like that's the only thing that actually makes sense because of the latency the reality of it is that uh when you get access to an RPC now there's also two things that you can do you can use a provider or you can host one yourself so we went ahead and we tested that as well correct like how how about hosting our note how would it work what is very interesting is that you start realizing when you get access to an RPC node you get access to real-time data when you host your own node you get access to real-time data Plus mempool data which means that you can have a little bit of a view on the future you're not 100 sure but you can use probability to understand what would come and take even better decisions from your data yeah number two is going to be execution compared to centralized Finance execution here is very different and we need to make sure execution is good quality how do you actually manage execution plus or minus zero two ways of managing execution whenever you run any type of algorithm into a decentralized platform we're gonna have a server where the server communicates with an RPC provider or you host your own note and you inject the code of your algorithm inside of the node itself this has tremendous advantages especially because you're going to be a lot faster how much faster I mean the reality of it is that when you look at the rate limits the the external provided you have rate limits and this the latency is going to be something in between 10 milliseconds to 600 milliseconds when you look at hosting your own note we start actually going to the microsecond realm and you become very fast now why is this important in defy being very very fast is not as important in terms of trip latency as it is in program execution what does that mean the taking a decision or the calculation of the decision is more important that actually the trip to make that decision why because you need to be able to take a decision before one block finishes if if you're in a chain where one block takes 10 seconds that's actually fine you have 10 seconds 10 seconds to take your decision but if you're in a chain that is very fast you need to be able to make a lot of simulations and calculations a lot faster correct so if you take 10 milliseconds and you multiply by a computation that is 10 000 you actually don't manage to compute fast enough while with your node you will okay last but not least unfortunately majority of Protocols are still having issues and the protocols that I'm bringing today as an example they are great protocols but they have taught us a lot of things outside of a smart contract vulnerability there is there are a lot of interesting things to look here and especially the fact that all of these protocols haven't changed data you can track to prevent mistakes you can look at tracking collateral that is on the protocols as a way to get alerts when something weird is happening with the collateral you can look at how do you track oracles and make sure that if oracles have vulnerability you yourself take advantage of that inefficiency as a way to protect your own investment yeah how do you stress stress test protocols on the last one is actually a very interesting story there is this protocol called volts an interest rate swap platform and we discoverable layerability in this plot in this protocol because we try to we throw Capital that we knew that we couldn't Withrow and actually the transaction went through at that point we knew the protocol was gonna default we contact the founder of the protocol and explain him within your protocol is going to default unfortunately the answer that we got back was don't worry it's a UI mistake two hours later the protocol closed unfortunately well this is basically what I wanted to tell you today in terms of learnings for for D5 uh I run out of time so I I had a couple of information in terms of Trends but if there is something else that I just want to say is we see massive adoption in terms of the growth of options yeah and the options Market is growing a lot this is one of the the latest trends that we see both in order book based systems as well as in function based approach so we believe that overall both types of markets are going to continue growing there is no in our point of view clear definition where order books would overcome any type of amm systems but I think they both provide different type of value and they both become more complex as time goes by we'll be testing all of these protocols and if you're building anything in this realm please get in touch happy to experiment with all the innovation in the industry thank you very much

Automatic transcript — names and jargon may be misspelled.