# Building Better DEXes: Mean-Rate Exchange | Dr. Mark Richardson, Bancor | ETHSofia 2026

- Speakers: Mark Richardson
- Channel: [ETHSofia](https://streameth.org/ethsofia)
- Date: 2026-10-06
- Duration: 20:52
- Topics: AMM, Bancor, Blockchain Week Bulgaria, Carbon DeFi, DEX, DeFi, DeFi research, Dr. Mark Richardson, ETHSofia, ETHSofia 2026, Ethereum, Mark Richardson, bonding curve, concentrated liquidity, market making, order book, Science & Technology
- Watch: https://streameth.org/watch/yt-2iE4Nrlahx4
- YouTube: https://www.youtube.com/watch?v=2iE4Nrlahx4

## Description

Dr. Mark Richardson of Bancor argues that the familiar bonding curve is one of the least helpful ways to describe a decentralised exchange. Starting from a simple discrete order book, he shows how an arithmetic distribution of liquidity lets the realised price be computed as a two-point mean, and how the x times y equals k model is the geometric-mean case of the same idea. Taking the limit to a continuous density function reveals an infinite family of bonding curves, from arithmetic to harmonic, described by a single exponent. He explains how defining DEXes by their exchange rate rather than an invariant removes the domain limits of current concentrated liquidity designs, including access to the arithmetic microstructure common on order book markets.

Keynote at ETHSofia 2026, 24 September 2026, Sofia Tech Park, Sofia. Part of Blockchain Week Bulgaria 2026.

Speaker

▸ Dr. Mark Richardson, Project Lead, Bancor
Mark Bentley Richardson, holding a PhD from the University of Melbourne, redirected his career from research science to DeFi in 2021, now serving as Bancor's Project Lead. Under his guidance, Bancor launched Carbon DeFi, a system that enhances user customization in decentralized exchanges by enabling strategy-specific liquidity utilization. Richardson's leadership emphasizes consistent innovation while maintaining the key principles of decentralization, user safety, and operational simplicity.
X: https://x.com/MBRichardson87

Chapters
00:00 Two families of invariant-curve DEXes
01:47 Starting from a discrete order book
04:03 There is no single price of a token
05:01 The two-point arithmetic mean shortcut
07:34 Geometric mean clearing and x times y equals k
09:49 Why AMM bid liquidity sits far from the price
10:49 From order books to continuous density functions
12:10 An infinite family of bonding curves
14:19 Formalising the curves
16:06 Describing a curve purely in prices
17:37 How this fixes concentrated liquidity
19:37 Density functions over curve invariants
20:36 Closing titles

Blockchain Week Bulgaria: https://www.blockchainweek.bg
ETHSofia: https://www.ethsofia.com
Future Finance Forum: https://www.blockchainweek.bg/f3

Follow Blockchain Week Bulgaria
X: https://x.com/BWBulgaria
LinkedIn: https://www.linkedin.com/company/blockchain-week-bulgaria

Follow ETHSofia
X: https://x.com/EthSofiaBG
LinkedIn: https://www.linkedin.com/company/ethsofia
Telegram: https://t.me/+b-33LJUpAB5iODNk

Nothing in this video is financial advice.

About the organiser
Blockchain Week Bulgaria, ETHSofia and the Future Finance Forum are organised by the Bithope Foundation, founded in 2014 by Vladislav Dramaliev. Inspired by Andreas Antonopoulos, it is Europe's first non-profit operating exclusively with bitcoin donations. Over more than ten years, it has supported 50+ charitable campaigns, and in January 2016 it co-founded the Sofia Crypto Meetup, now the region's longest-running monthly crypto event.
https://bithope.org

## Transcript

[music] Uh thank you for everyone who's uh hanging out uh towards the end of the conference. Last talk of the day. I know you're all tired. Um this is going to be a little bit more I say like cerebrally uh engaging. And so I'm I've tried to uh sort of walk this back so that um for those of you that don't have a strong mathematical background aren't necessarily going to be alienated by some of the things that I'm going to describe here. But so I think the right premise uh for this talk is uh at least um in my opinion there's really sort of two groups of decentralized exchanges based on invariant curves. Um there's the uh group that was pioneered by Bangor back in 2016 and 2017 and this describes the overwhelming majority of uh DEX implementations today. Um and then there's a couple of uh forks out of that including and especially the one by Michael Agarov behind Curve Finance which was specialized for stable coin liquidity which is entirely different from what Bangor was doing. And then there's a couple of little iterations on those two things. for example, the um the dodo peacewise invariant which was later adopted by Oiler and generalized as well. So there's kind of this sort of family of bonding curves and even people that have been around the industry for a long time including and especially in uh DEX design and research I think still don't appreciate that there's more than one correct way to describe some of these relationships. Um and that some of those descriptions are a little bit more informative than other ones. And in particular, I think the familiar bonding curve depiction that um is kind of, you know, posted all over Twitter and everywhere else is among the least helpful, right? Or at least the the most useless of those of those descriptions. And so what I'm going to show you today is um a slightly different way to think about bonding curves. Um beginning with discrete order books, which I think is a good place to start because a lot of people already understand how an order book works. So the convention for these slides is that there's going to be a quote token which is the orange circle and a base token whatever that happens to be. Um let's just pretend that the orange token is a stable coin for for US dollars. And so what I've done here is to create an example order book where you can see that there is the first um the first base token is available at $160. The second token is available at $1.70 and so on. Um, and on the uh bidding side, you can see that we've deposited some stable coin liquidity as well. And that the there is an arithmetic progression here. And so obviously the 10 cent price steps are pretty large, but remember this is just an illustration. And as we go through um the rest of these slides, we're going to um do away with um with that sequence as well. So we refer to the side of the book where there is quote token is the bids and the side of the book where there is base token is obviously the asks and so buyers right and this is from the takers perspective are the ones who are going to be interacting with the asks and the sellers going to be interacting with the bids just from to get some nmanllete out of the way now I think that this is still um a reasonable way to set up a market right to just say that we've got a certain number of tokens let's just put one unit of that token at each one of the price trenches that the audiobook happens to make available to us. And if you do it that way, um, note that our buyer here can pay, for example, $160 for the first token. And I'm going to keep track of how much he's paying on the bottom of this slide because when he buys the second token, the um the price that he paid isn't equal to the last tranch that he interacted with, but is actually some average of those two tranches. So I'm you can see on the u bottom right of the slide, I'm tracking the realized price, which is now $1.65. And then as he buys the third token at $180, his realized price is $1.70. and then for the fourth and fifth price branches and so on. Now what I want to bring your attention to here first is that there is some ambiguity. What it means when we say that the price of a token is whatever it is on any marketplace, right? There is no such thing as a price of Bitcoin, of Ethereum, of your favorite meme token or whatever because prices necessarily have direction and quantity and they need to be executed. So when someone says the price of Bitcoin is $85,000, that doesn't actually mean anything, right? It's just a number and you don't and without more context, you actually don't know where they're calculating that price from. That could be the last realized trade, which would mean that the price left in the book is actually a lot higher. It could be some intermediate value of everything or some aggregate of those things. Now, in this particular arrangement for this order book, note that the highest price that he interacted with is $2 and the lowest price that he interacted with is $160. And because of the way that this order book is arranged, there's actually a shortcut here. So if he wanted to buy just the first five tanches, we can actually just take the simple twopoint arithmetic mean of the lowest price tanch that he interacted with and the highest um which comes out to $180, which you'll note um matches exactly the realized price in the bottom of this slide, which actually had a slightly more complicated calculation with it. And this is true for every price tranch that he interacted with. So when he stopped at four, our calculation brings $1.75, but our shortcut does also. And this is not an accident, right? This is one of the properties that an order book arranged this way would demonstrate. And that kind of shortcut calculation is exactly the kind of thing you're interested in when you're building, for example, a smart contract because this limits the amount of data that you have to hold in memory, for example, and also means that um the number of rounding errors that are going to be compounding in a calculation like this one is strictly minimized. So we're trying to find examples or ways of of building these kinds of systems where rather than having to do a large tedious calculation, you can do a very short one. And u in this particular case, an arithmetically uh distributed order book allows for just such a um uh a shortcut to be executed. And it's the same on the um on the selling side, by the way. So notice here that I'm using fractional tokens because um I'm trying to keep the relative depth with regard to the base token consistent which means that at the $150 um price trunch um the maker here as uh has put depth equal to whatever is required to purchase exactly one base token. And so that's what's happening here as the seller is selling that base token in. He's selling exactly one and um getting $150 for that sale. And then as he consumes these other price tanches, he's getting, you know, more and more um of that liquidity, but at a diminishing rate. So his first sale um was for an average of $150, then $145, $140, $135, and $130. And exactly the same pattern plays out here as well. We don't need to do this tedious calculation because we can use exactly the same arithmetic mean twopoint shortcut that we used in the um in the uh asking side of the book as well. So that is a convenience but it's not something that you get for free out of any arbitrary distribution in a discrete order book. You need to actually prescribe exactly how the bids and ask are going to be distributed so that you know exactly which kind of mean you're going to be able to use. Now I think an arithmetic distribution of um of prices and that kind of twopoint average is actually very natural. In fact you can do an analysis of any marketplace that you like. for example, the PlayStation 5 market on eBay um or the current like Bitcoin uh distribution across Binance. And you'll actually find it very very closely mirrors that kind of arithmetic distribution. And I want you to keep that in mind because it's not the sequence that's used in most DeFi protocols. The one that's mostly used is this one, a geometric mean clearing profile. And this comes back to the XY equals K um bonding curve from uh from Bangor back in 2017. and after that you know adopted by unis swap and sushi swap and others but you can do exactly the same game here it's just that now you need to change how the liquidity is distributed and I'm going to bring some uh features to your attention um as we go through uh through these slides so the first thing you'll note is I've had to add a new row here because it's no longer the case that we can assume that we're adding the same base equivalents to each one of these price branches in fact on the asking side we need to drop the amount of uh base token liquid liquidity that's available as the price increases. Um and so again, same pattern. He's going to buy one tunch, two tanches, three, four, and then five. But because of the way that we've distributed um the base liquidity across these price intervals, we're no longer using the twopoint arithmetic mean. We're now using the twooint geometric mean. And this is exactly what you get out of something like bank v1, unis swap v1, unis swap v2, sushi swap, and so on. But you probably haven't seen it ever depicted this way. And it's true that there is an exact equivalence between discrete order books and bonding curves. It's just that bonding curves are the continuous extension of that calculus. And I'm going to show you that in just a minute. So if you wanted to follow these calculations at home at home if you like note that now we've got a slightly more cumbersome calculation in the long sense, but the geometric mean twooint shortcut actually works again for each one of these stranges. It doesn't matter how many this person is interacting with, we get the same shortcut. And again, um on the um on the bid side of the book as well, I will bring it your attention to the fact that now the uh base equivalent um liquidity uh depth in the book is actually increasing as the price is decreasing. Right? And this is something that a lot of people I think eventually come to terms with after a couple of years of studying studying bonding curves. But on the bidding side of the book, if you're interacting with an XY equals K bonding curve, most of the liquidity is far away from the current price, right? Which is why it's very easy when you're trading on an AMM to drop the price very quickly because most of the bids are actually staggered far away from what the current price is. And this causes some instability in some of those uh token prices. But again because we've distributed this way according to this rule we can still use the twopoint uh geometric mean and that explains why um and I'm sure many of you have seen before um that we get to use that shortcut in the smart contracts at least from that era. Now I said at the beginning of this talk that I think a 10 cent price step is actually quite a lot and I'm sure you think that as well but there's no reason why we have to do that. That was just for illustration purposes. So let's imagine that we take each one of these price trenches and then split that up into another six price branches and then choose one of those and split it up into another six and so on. And every time we do that, note that the gaps between the price branches are actually getting smaller and smaller. And so if we drive that process to infinity, right, where the difference between each price branch actually becomes zero in the limit, you no longer are dealing with um a discrete depth book, but instead a continuous density function. And that is in my opinion the most useful representation um of a bonding curve that anyone's ever described. And I'm not the first to describe it, right? This isn't flattering myself. It's just one of the analyses that um for some reason has kind of fallen out of fashion over the last few years and I think that that was a mistake. So this is the calculation we've been doing all along and this is the thing that allows us to to create that twopoint mean construction for any chosen mean. And as we move to the continuous case, we basically just swap the discrete summation for continuous summation or integration. Um but basically it's still the the same idea. It's just that we're now doing something in the continuous limit. [snorts] And so when we do that, we're basically going to set this um you know this uh continuous summation method equal to be um some chosen mean. So that m just refers to an arbitrary mean. Um we say that we're going to uh enforce that for all p values meaning for any price wherever you start from in the book and wherever you end up in the book. We still want to be able to use that um exact twopoint reduction. And that means that the density function actually becomes proportional to this really simple expression. Right? It's just the price to some exponent. A single exponent describes the entire family. And from that realization, you realize that actually there's an infinite number of bonding curves that you can use, right? We've been stuck using the same geometric bonding curve for like more than a decade. And I think that that's a shame. Um, right at the top is the arithmetic one that we started that slide with. And then the geometric one is like I said the common AMM construction. But notice that there's means between that right which is called the logarithmic. And on the opposite side of the geometric we've got what I call the inverse logarithmic. And then after that is the harmonic or the inverse arithmetic. All of these are bonding curves that you can potentially use but no one does. This table I'm just put sort of putting up mostly for bookkeeping um cases, but I will bring your attention to this last column on the right um which describes exactly what kind of curve you're going to be using. So in the geometric case, this is the y = 1 /x which if you rearrange that becomes the x * y = 1 um which is the familiar invariant that everyone knows. Um but the rest of these probably you haven't seen in an amm context before and neither have I. but they're perfectly legitimate. So on this slide, what I'm showing you is exactly the orderbook distribution that we had across the same price interval that I used in the illustration at the front. And then here I'm just kind of blowing it up a little bit so you can see that these curves really do uh move away from each other quite quickly. Although you can see that there is a little bit of a fanning out here even on the uh relatively modest interval that I showed you before. We can formalize this relatively quickly. I'm going to use a slightly different nmanllete than what you've seen in concentrated liquidity before, but it should still feel familiar to anyone who's looked at how concentrated liquidity implementations currently work. So the first um two constants I'm going to introduce are the y intercept and the x intercept which are just using this subscript int. Um and obviously when y is equal to its intercept then x has to be equal to zero. When x is equal its intercept y is equal to zero. And the marginal rate at those two points, let's just call them P high and P low just to choose a choose a name. Then the marginal rate or P marginal is whatever the marginal rate is going to be at any point between those two. And because these curves are convex and because they're strictly decreasing um and because they're monotone, you know that the marginal price is always going to be smaller than P high and higher than P low. So you get exactly that kind of mean execution profile that I was describing in the illustration at the beginning. Again, just for people haven't seen or haven't studied calculus in a little while, those P high, P marginal, and P low uh depictions are basically just another limiting process where we're looking at the the gradient at a certain point on the curve. And this is how you calculate it. So um notice that this has the form of what's called a holder mean or a generalized power mean. And the weights um are uh expressed in terms of the token balance that you have and the token balance that you would have if you were at either p high or p low. And so using this you can actually get an exact correspondence between the x coordinate and the y-coordinate independent of each other. By the way, um so long as the power relationship alpha minus beta is equal to one. if you want to get um uh more technical and I'm going to fly through the rest of these slides already because I can see I've gone slightly over. But you can also ex you can also describe this book this bonding curve um entirely in terms of prices. So you no longer have to draw this invariant curve where you have x coordinates and y-coordinates and so on, but instead just know what the maximum and minimum prices are and what the current price is. And because you're constantly um executing uh trades as an average of high and low prices, this is actually a much more sort of I'd say natural way to think about engaging with an exchange. And so you don't even need that invariant formula at all. The actual means that you can support this way are called the power difference mean family, which is a specific subset of the Stellasi mean family. Um I use this D nmanllete and it's probably a little bit too much detail. I can skip this slide as well. Um but just know um that when we're building these bonding curves, it it's a specific aphine transformation process of a base curve. And so um the familiar x * y= k curve is this one in the middle. But there's an entire continuum, right, of uh interpolation between all of these different power functions. And so you'll see that what I've done is to highlight the parts of the curve on each one of these base curves that [snorts] after a fine transport would actually give you the concentrated liquidity curve that you might want to use including parabola here on the left um the inverse exponential here which gives you one of the logarithmic means and so on. So how does this fix concentrated liquidity? First, um, note that this is exactly the construction that you see in all concentrated liquidity protocols. They're still using X * Y= K or X Y= C, but where X and Y have shift parameters basically built into them. There is a more general form of it where you don't necessarily need those powers to be equal to a half. But if you do make them equal to a half, then it comes out this way. And I'm sure at least some of you in the audience have seen this exact concentrated liquidity formula before, usually with C substituted for L because it represents some sort of liquidity number. But there's a problem if you use that invariant function. And this is why I'm critical of using invariant functions at all. First note that the form um that this parameter R takes um can only be defined well when it has uh takes a value between 0 and one. And what this means is that if you try to pass outside of that interval, you end up with a perforated domain. So effectively this, you know, fractal looking pattern here is just looking at uh when you get a at least a real curve. So a curve that doesn't have a complex component. But even when it's real outside of that domain, you still have to hold a negative token balance in the contract, which is something that we um we generally try to uh try to avoid. So if you switch from invariance to the method that I'm showing, you basically get access outside of this interval between 0 and one to everything between minus infinity and plus infinity apart from two removable singularities which are actually pretty easy to deal with. Now that's a huge deal. The first illustration that I gave you showed an arithmetic order book, right? And I said that you see this on eBay, you see it on Binance. This is the most common structure or most common mic micro structure that we see. That one happens at two. So invariants can't even access the most common market micro structure. And I think that that is worth um paying attention to. Um I'm going to skip this over a little bit, but basically that you know there is a continuity. There is an exact way to translate between uh bonding curves and order books. And if you haven't seen that before, I hope you found that informative. And the most important thing is that the we really should be talking about uh density functions and arbitrary density functions and probably u two point means rather than curve and variance because I think the curve and variance are are relatively useless. If you would like to talk to me about this more obviously I haven't gone into much of this in any rigor. Um I have some documents that I can share with you if this is interesting to you. The best way to reach me is actually probably at my email these days. Um thank you for your attention. I hope that that was enjoyable. &gt;&gt; [applause] &gt;&gt; Thank you so much, Dr. Rich Richardson. Um, I believe you also had a really, really long trip to get here, so much respect. It was amazing. I hope that you're not too jet-lagged. Maybe. Is you okay? &gt;&gt; I'm okay. &gt;&gt; Thank you for the wonderful presentation. [music] &gt;&gt; [music]
