The Changing Landscape of On-Chain Liquidity
Crypto Valley Conference 2023 · June 2023 · 17:09
Mark Richardson of Bancor speaks at Crypto Valley Conference 2023 on the changing landscape of on-chain liquidity. The talk looks at how liquidity provision in decentralized finance has evolved, from the perspective of a researcher at Bancor.
Speakers
Topics
From Crypto Valley Conference 2023, hosted by Crypto Valley Association.
Transcript
foreign good morning So yeah thank you for everyone for for coming uh this is my uh my third year presenting at CBC the the first one was during the pandemic so it was online only I was here last year uh talking about a protocol that we had just released then called uh Banco V3 um which was looking to uh manage the systemic risk associated with liquidity provision because in a way amms have moved from um their uh their initial use case which was a way for projects to bootstrap their own liquidity with the tokens that they themselves provide to this new kind of financial instrument where community members themselves
provide that liquidity and expect a financial return on it unfortunately amms were never designed with financial returns in mind and so they're extremely ill-equipped to service that use case and what I'm going to be looking at today is how that change in perspective where liquidity on chain is something that projects themselves should be responsible for to something that is an organic emergent property of communities providing liquidity themselves and whether or not we can Define the financial boundaries of these models and and find a um a new product which is actually going to service that use case a little bit better um so today I'm presenting uh carbon
which is the new uh the new protocol from Bangkok and kind of ironically it's not an amm right bancor is I think very well known for having invented the amm concept and was the first to Market with it in 2017 and we're now our the first to turn our back on it and we're looking at something that is a little bit more efficient and a lot more expressive so to um to sort of paint a picture for how I see on chain liquidity evolving we kind of started with um a a constant function Market making algorithm um that was popularized by uniswap in its constant product form but the
original bancor implementation actually had a very wide spectrum of these potential curves the the constant product one is this the one that I think found the the product Market fit it's the one that uni swap V1 and V2 have used and it's the one that sort of resonates uh I think with familiarity across the the industry and it's the one that everyone um sort of knows and understands then after that we saw a concentrated liquidity ideas start to emerge again bancor was was first to Market with this model uh we released the uh the first what we called Amplified liquidity uh protocol in April of 2019.
um and then um shortly thereafter uh the uni swap V3 implementation hit the market and this one is the the one that has uh has seen the the the most traction and I think has attracted the most users um what I'm going to be presenting today is this shift from concentrated liquidity to what I'm calling asymmetric liquidity and I'm going to have a a very specific example to show you um as to uh you know how we can contrast these these different uh ideas and what their financial ramifications are so in the constant product case um the idea is that no matter what the price of an asset is doing you are offering to buy and sell it uh to the market and from the market and that is I
think kind of lost on a lot of liquidity providers they don't really understand the financial instrument that they've they've purchased or the option that they are buying or in a way the free option that they're selling to the market for those who are a little bit more versed uh the uh the liquidity provision product that's offered by constant the constant product amm it is a short gamma option what you are praying for is that the price relatively speaking does not change for the assets that you're providing liquidity with and that there is an enormous amount of volume through those tokens which translates into into fee earnings now there's very little difference between fee earnings and a bid ask spread on amms and if you would like to know more
about that unfortunately we don't have time to discuss it in today's presentation but I'm here for the next two days and in fact I'm in Switzerland all week so I'd be very interested to have those discussions with you concentrated liquidity is slightly different concentrated liquidity says that rather than provide my my assets across an infinite price range which is of course what cons what constant product amms are able to do concentrated liquidity says just provide my liquidity Within These price boundaries and if the price goes outside of one of those boundaries then I no longer have one of those tokens and this is pretty good I think it does make sense in many uh situations to question whether or not it is a good idea to assume that Bitcoin will be a billion dollars later tonight
right because on a constant product amm that is that is supported right and so if we want to if we want to support liquidity around the current market price this is the type of capital efficiency that uni swap has been talking about for several years but it's important to realize that Capital efficiency for the market doesn't necessarily mean Capital efficiency for the liquidity provider right liquidity providers often conflate Capital efficiency with profitability and they're very very different things in general what is more Capital efficient for a taker literally means the maker is selling their assets at a discount and this has been a very big part of the narrative if you're are now familiar
with Concepts like toxic flow whereas you didn't necessarily hear those words this time last year this is the kind of thing that people are talking about what we're introducing with asymmetric liquidity is basically that the short gamma option that you are presented with in D5 shouldn't be the only thing that you can use right it's it's weird that that is the only financial primitive that that dexes are able to offer their liquidity providers so what we're instead trying to create here is a system where you have the agency to decide where your liquidity is spread on the buy side and where your liquidity is spread on the sell side literally setting up a bid ask spread much the same way that you would in a
conventional order book but also borrowing some of the um the concepts from amms such as the ability to enumerate your prices infinitely between two different ranges based on the balance that you have of one token so the way that I would like to introduce these Concepts and contrast them is through a market back testing simulator that I've been working on and that I'm I'm planning to open source I have it on my PC today and I can show you how these work and if you want to we can go in through some of the assumptions and things but essentially these are the inputs that it takes you give it whatever uh whatever you want your Coit asset to be whatever you want your risk asset to be and so forth we then uh take a price
data from several different apis coin gecko coin market cap and so on and we use that to construct a Candlestick chart and then right over the top of that Candlestick chart you can place your for example uni sort V3 range and you can simulate exactly how profitable that strategy would have been over um over that period right of course we make assumptions like perfectly efficient Arbitrage infinite sources of liquidity at that potential at that particular price and so on but you have to start somewhere so in this case I've chosen a range that I think most uni swap V3 liquidity providers would have been happy with right sure they went out of range a little bit but for the most part their
their liquidity is concentrated right around where the market wanted it and that means that they're going to be earning a lot of fees the one thing that I want you to take away from concentrated liquidity semantics is that you are buying and selling at every single price point within that range okay there is no choice if you if the market decides that ether's going up you are selling off your eth right if the market decides that Bitcoin is going up you are selling off your BTC this is your uh your position as the de facto liquidity to the market carbon is very very different what carbon says is that you can decide which price ranges you would like to buy your
asset and which price ranges you would like to sell your asset and we still circulate that liquidity between these two ranges but both of these orders are irreversible so if someone is buying Bitcoin from you at the price that you wanted to sell it to them at and then the market retraces on uni swap you have to refund the market right you sold the top but then the market changed his mind it sells it back to you on carbon you do not get a refund if you sell your Bitcoin at a certain price that sale is final if someone wants to sell it back to you they have to sell it back to you at the price that you were offering to buy it at right which might be a completely different bid price so on carbon we buy low and we sell High
which I think is probably the most fundamental of economic Primitives and it's weird that D5 has been without this ability for so long so the simulation allows us to do a couple of things and what I'm going to be presenting to you today is the the animations and also the summary plots I've only got five minutes left here but I think that you'll get a pretty good idea of it so for consonant product this is one of the most useful ways to represent I think an amm what you're seeing here and I don't have a laser pointer unfortunately is that the there there are green and red shaded sections above um a uh a line that's wiggling around
which represents the current price of Bitcoin in terms of eth and uh what I'm representing here is that the green shaded section to the bottom is where your eth liquidity is provided and the red stated shaded section to the top is where your Bitcoin liquidity is provided and what you're seeing is that as the market worms around we're tracking both the balances of the amm for that liquidity provider the fees that they're earning and whether or not that portfolio the amm portfolio is performant versus doing nothing at all right versus just the Huddle case um and so in in this particular case you can kind of see all of the familiar things right when the the the price is
going very volatile when you see a very strong move in One Direction uh the performance versus huddle goes down but when the price is kind of just crabbing sideways um that a constant product amm can actually be a fairly uh financially performant device and here you can see it's kind of you know very slowly approaching something like a one percent return over the the course of over the course of about a year foreign there is another way that you can visualize this kind of data and that is I think going to be more familiar to defy natives which is rather than visualize it as a depth chart for an order book you can instead visualize the amm using its intrinsic bonding curve
and that's what I've um that's what I've established here now I'm referring to the to carbon as being an asymmetric product and that's going to become clear in a minute but I want you to pay attention to here is that the two charts on the bottom all I have done is to transpose the X and Y axis right so on the on the left you've got the eighth balance on the Y and the BTC balance on the X and on the right chart you've got the BTC balance on the Y and the eighth balance on the X and these are this is the same chart right all I've done is replay this is the type of data that we generate at the end of this simulation the the most important data points here is that the blue line
um you want that to be above the gold line right as a liquidity provider every time the blue line is below the gold line that means that your performance is negative this means that you are an impermanent loss and when the go when the blue line is above the Gold Line this means that you are in impermanent gains right if you withdraw your liquidity at that particular position you'll be in profit but if you keep um you know if you keep your position there for too long you may you may lose it so concentrated liquidity is more or less the same thing okay except that you now have a very very tight bounds and you can see um in this animation uh that the uh the sensitivity of the performance versus
huddle is much much higher so we're already like not that far into the simulation you see we're already at like a two percent return which the con the constant product case was sort of very slowly approaching one percent over time but then very quickly when you know liquidity moves out of range you can move down to sort of negative 10 negative 12 and so on so it's a much more sensitive system but overall it's the same device right you are still agreeing to buy and sell at whatever price the market determines um until you run out of liquidity which is something that characterizes a concentrated system rather than a constant product system again we can visualize these um you know
we can visualize these experiments using the um the invariant curve of a constant of a concentrated liquidity protocol as well so I've only got a couple of minutes here but what I do want to very quickly move on with is uh how asymmetric liquidity um and what we've invented here can uh completely you know reinvent the way that we think about um on chain liquidity so here um what is happening is that as your cash reserves are being uh are being lost right because you're buying your risk asset from the market rather than the um the asking price of the risk asset coming down to meet it the protocol weights right it's essentially
always advertising the price that you wanted as a user to sell that asset for so in this particular case um when the uh the price of Bitcoin is moving up it's always buying uh eth with that Bitcoin but then it's refusing to let the uh the uh the bidding press in terms of if ever move Beyond whatever boundary you have set and this means that the the protocol it doesn't have that same sort of toxic flow characteristic that is currently plaguing other liquidity protocols in the space um again we can see the um the way that we uh plot the invariant function looks very very similar to the other two cases
but what you what you will notice and the reason why I call it asymmetric is that these are not the same curve transposed right on carbon each token balance has its own implicit bonding curve and this means that the uh the the price of one asset is is in completely independent from the price of the other asset there is no requirement that the constant function uh way of of Performing liquidity on of supporting liquidity on a on chain should be dependent on two token balances at once uh I'm out of time but I will very quickly rush through this last part the simulator also spits out this very very
verbose log file and it will compare the overall results at the end of the simulation for all three of these protocols and in this particular case carbon's performance I think speaks for itself right the ability to set your own bid ask spread profile is much much more financially performant than letting an amm determine those prices for you this is not cherry-picked I actually had to go through a lot of different versions of different charts and things to find a number that I thought you might find realistic there are very very volatile pairs things like Link versus RV are they versus compound and so forth where in general they tend to Trend sideways over time but with like a 200 volatility profile being able to
actually you know range trade these assets is uh possible on carbon and if you lack uh you know like I said I've got my PC here with me I would be very very interested to walk you through some of the more let's say optimistic scenarios that I found and even share with you the simulator so that you can go through some of this data yourself so thank you so much I hope that you found this interesting and I'm really looking forward to speaking with you all we are open for discussions there are a whole bunch of Integrations and things that I'm currently working on so if you found anything in this uh useful or interesting I would be very interested to collaborate with you thank you so much for your time thank you Mark