 Well, so today I'll be talking about multi-dimensional pricing. This is mostly a discussion of the work, Dynamic Pricing for Non-Fungible Resources by Theo Diamandis and collaborators. And yeah, the idea is to sort of explore this paper and discuss how can we leverage the knowledge on this paper to our case. By the way, I think Theo Diamandis is going to present this at the upcoming crypto-economy. Yeah, so let's get started. Now, this paper is super dense mathematically. So I'm going to start with summarizing the paper, and then I'll go through the results. OK, so what do they do? Well, the authors here provide a principal way to the sign of transaction fee mechanism that comprises multiple non-fungible resources. So what do they mean by this? Well, they can charge gas for a transaction if it's very, say, CPU heavy and charge a different amount of gas for a transaction or a message if it's very memory-intensive. Now, of course, this is very similar to what we're doing related to gas lanes, because you can then create lanes for different types of messages or for the demand-driven onboarding idea that A-North was proposing, et cetera. So there's a lot of relation to what we're looking at. And furthermore, the paper has a lot of interesting results. The first one is that their transaction fee mechanism is based on an optimization-based framework, which means that the results are optimal in some given sense. And the second one is that their transaction fee mechanism design can be decomposed into optimizing two objectives or solving two problems. The first one is the network designer's problem, which can be understood sort of as how much resources can we spend without putting the network in a lot of stress in such a way that we make money. And the network participant's problem, which can be sort of understood as which transactions should we include on a block or which messages should we include on a block such that both miners and users are as happy as possible. They also derive a lot of interesting properties from this transaction fee mechanism following some very simple but kind of abstract assumptions such as convexity of the state space. And they prove or they hint at the fact that transaction fee mechanisms are deeply related to iterative methods for numerical optimization. So if you like linear algebra, this is definitely a paper that I recommend you look at. OK, so now the rest of the presentation gets very both Matthew and hand wavy somehow. So it's a lot of notation, but it's not super in depth. But OK, let's get to it. So let's consider a system with M different resources and M transactions in the member pool. So M here can be the number of lanes or if we're using lanes and something demand-based or whatever, OK? Now let's define B star as a vector with the target utilization of these resources. So BI is the target of resource I. And let's define X as this vector that takes values of 0 and 1 that has a length N. That includes all possible transactions in such a way that the jth component of X is 1 if the transaction is included and it's 0 on the master. OK, furthermore, we define A as the matrix whose jth column represents the vector of resources A j consumed by transaction j and P as the vector of these. OK, so given this, we can write the total resources consumed by Y, which is just A times X, right? So the resources utilized by each of those transactions included the sum of that and the total amount of tokens spent as P transpose Y. So basically the price of the resources of type 1 plus the price of resources of type 2 times the consumption of those resources all the way to the end, OK? So what is the goal of their paper? Well, they want to create an update rule such that if our expenditure is equal to the target expenditure, then there is no update. If we are spending more of the resource I than the target of resource I, then we increase the price of that resource. And similarly, if we're spending less of resource I than its target, then we decrease the price of that mechanism. And this is quite similar to the B1559. It's quite similar to the mechanisms assigned that AX has been working on, this adjustable block size, OK? Now, this is akin, like achieving this goal is akin to the sign-in and transaction mechanism for which we need to consider the network utility and the proficiency path utility. The network utility we're calling L of Y, right? It depends on the resources used, and the participant utility depends on X, so on the transactions, I'm not going to include it. OK, so let's start defining network utility. We define the last function L as a function which maps resource utilization Y to the quote unquote unhappiness of the network designer L of Y. Now, there are many different types of last functions. Here I'm going to show a couple of them. So as a first example, we have L of Y being equal to 0. If Y equals B, we're spending exactly the target and infinity otherwise, which can be interpreted as we're infinitely unhappy unless we're spending the optimal value. A second example is quite similar, but here instead of Y being different from B star is Y larger than B star, meaning that we're OK with using less than the target expenditure, but we're infinitely unhappy otherwise. Or a third example can be given by this quadratic norm here, which can be interpreted as we want to avoid deviating too much from the target B star, so we don't want to spend too little or too much in comparison to the target. However, many, many definitions of L exist. One can come up with whatever definition of L such as long as a few technical conditions are satisfied, basically that it's convex and lower symbol continuous. And as we will see later, each definition of curly L will imply a different update rule for the network piece. Now let's switch on to the finding the network utility or the participants utility. By the way, I cannot see my mouse if there's someone writing stuff on the chat. I cannot see you. Anyways, yeah. So we define the joint minor user utility as Q. Q is a vector in Rn, where the jth component of Q depends is the user and minor utility of including a transaction j on a given block. Now it is very rare, if at all possible, to know the values of Q. However, under mild assumptions, their results show that their update rules don't necessarily depend on Q, which is useful. And given this, we can define the participant utility U of X as Q transpose X, basically as the sum of the utilities of the joint minor user utilities of those transactions that get included in the block. Now putting these two components together, we can aim at solving the following problem. We want to maximize the user utility, the participant utility, Q transpose X, minus the network unhappiness. Subject two, that we're spending Y amount of resources, and that X belongs to the set of admissible transactions. This is more of a technical requirement, but it's necessary for the formulation. So the variables in this program are X and Y, and the data of the problem are A, which again is the matrix of the transaction costs or the resources are utilized by transaction J. S is the set of admissible transactions, and Q is the joint minor user utility. So how do we optimize this? Well, if you recall from high school or first years of college, this is a constraint optimization problem, so one of the best ways of solving it or the way of solving it is to formulate it as a Lagrangian problem. And if we do that, then we get something that looks like this. So we can define the Lagrangian as this first line here, where this I of X is an indicator function that says that X is in the set that we need, and this B transpose Y minus AX symbolizes the constraint of the Spanish. Furthermore, we can move things around a little bit in this equation and obtain the formula below. And having defined the Lagrangian, we can also define what's called its dual, which is this function G of B. That is defined as the supremum over X and Y of the Lagrangian, which if we massage it a little bit, we can get that this equation is equal to this supremum over Y of B transpose Y minus L of Y plus the supremum over X of this order term. The first term that I'm calling L star is the network designer's problem. We want to find the expenditure that maximizes this amount, price times expenditure minus the network and happiness, plus this other term, which is the transaction participants' problem, meaning what are the messages that I want to include from that set of admissible messages such that I maximize the joint user-minor utility. Then we can define this auxiliary function called the dual G of B as L star plus A of B. And why do we want to do this? Well, why are we doing this Lagrangian and this dual formulation? Well, there's a very strong result in optimization or a fundamental result in optimization that says that if S star is a solution to the original problem, meaning maximizing this utility minus the unhappiness, then it follows that the dual is always larger than this solution for any value of B. The proof is a one-liner, but I think I may need to discuss it. And furthermore, under some technical conditions, it holds that there exists a price such that this holds with equality, which is called strong duality. So informally, this means that maximizing the Lagrangian is equivalent to minimizing the dual. So the problem boils down to minimizing G of B. OK, cool. So we want to minimize G of B. How can we do it? Well, if you recall from Calc 3 that if a function is differentiable at a neighborhood of a point, then that function decreases the fastest in the direction of negative its gradient. And let me see if I can click on this. And this, in turn, implies the following recursion. If we want to minimize this function, then what we can do is we take some steps of size gamma in the direction of negative the gradient. So we move for one step on that size, on that direction, sorry, we achieve a new point. Then we keep moving on that direction further and further. Now, this formula here, it's already kind of telling of something, but I don't know, does this formula look familiar to something? Maybe make it a bit more, so let's maybe exemplify. So let's consider a very simple one-dimensional example. Let our target consumption be half of the block size. And let aj be the gas used by transaction j. Furthermore, let's consider this loss function that we're infinitely unhappy unless we're using our, unless we're exactly at the target consumption. And let's define i of x as this indicator function that we have here. So from before, we have that our dual looks like this. Now, from this formula here, the first term, we can see that this first term L of y is either 0 or infinity. So this term, the supremum of this term, it's only achieved when y equals b star. And similarly here, on the second term, we have that this supremum is only positive whenever x is in this set. So we get this expression that we have here. That if we replace the y by b star and x by x prime, which is the optimal messages that you would need to include on a block, then we get the following formula. Now, if we take the gradient of this with respect to p, we get this. And if we plug this result here back into the previous equation, we get our recursion formula that looks like this. Now, it's starting to look a little bit more familiar. Now, what if we set the step size gamma to this arbitrary thing? Well, then we recover something that looks like this. I'm sorry, I don't know how to point on this. But what does this formula look like here? If AX is the total gas used at a given transaction, well, it's exactly the EIP-1559 mechanism. And one can extend this framework to multiple dimensions or multiple gas lines or whatever. So in summary, the authors show an interesting way of constructing transaction fee mechanisms based on optimization arguments. Many transaction fee mechanisms fall into this formulation, such as the EIP-1559, an adjustable step, the additive increase, multiplicative decrease work that I know Shyam has worked on, the exponential EIP-1559, which means there's a lot of research opportunities here. User utility is assumed to always be of the same form, while L of Y plays a role in the objective function. And clearly, this can extend to gas lines. However, we need to focus on designing and testing different L-wise and PACE. So for future work, an example would be to consider gas lines, two gas lines, separating FBM messages from status school val coin messages. So let rho be the lane width proportion and B, the node, the maximum block size. So a potential formulation for this would be to have a target given by V star here. So basically, we aim at targeting for the status school messages, half of the length of the gas lane width, same for the FBM messages. And for the sum of those messages, we aim at having half of the block size. We have the upper constraint that the resources cannot be more than their length and there's some cannot be more than the block sizes. And we would have that the consumption would look like this formula, this form, AJ. The next steps from here would be to implement and investigate for again, for different rows, for different L's and test for variability network revenue and all these other things that we're interested in making. Okay, that's it. Thanks for the attention. Let me just look at the messages. That's awesome JP. I think a lot of the messages were just saying that high school math was not that hard. When I was studying in the Mexico, I taught three at the university and there was a kid there who was like in high school, was in this AP programs, thought that was pretty cool. Nice. Man, this is a really neat result. Yeah, it's super interesting. It's super, super interesting. So one question I have, I wonder if you can go back to the, I love the chart with the graph. Can you go to that one real quick? Just for intuition, what are X and Y on there? Are those, is X the, we'll go ahead. Right, right. So yeah, so this would be like P1 and P2. So the components of this price vector, right? Because this, in this formulation, this P is multi-dimensional. So yes, that's a good, that's an interesting point. This kind of update the price on, I mean, this formula here updates the price on both dimensions in one go, depending on the gradient. So in my mind, like EIP 1559 is just a cross section of this because it's a one-dimensional and we're changing the base fee. Exactly. And so in my mind, like I was, what I was thinking is, I wonder if we can get rid of the idea of block gas lanes, like, hey, a separate pieces of the block are reserved and, you know, storage provider messages need not mingle with FVM messages and they can't go back and forth across some membrane, but rather there's a different base fee for each of those types. They're all mixed together, but like, maybe you just crank the base fee up or down towards the optimal. I mean, that's what it is. The gas lanes are about base fees. I think that's what we're talking about, like having two different base fees. But would you like segregate the actual block into, you know, 60% of the transactions are reserved or not, or just let that float dynamically or don't have a variable. I'm reserving it by price, so like they would have, I mean, base fee comes from setting a target block size. So the base fee is the one at which at that price, this block size, that is the target block size is the one that comes out. I see. But there's some flexibility in that, like it could be, it doesn't have to be like exactly the block would be divided this and this, but the targets of the block would be divided like this. Exactly that. Yeah, if one part ends up borrowing more than its target, then you'll increase the base fee of that one. And by the next round. That comes up in this formula, this last formula, B star, because I mean, in the formulation, you can define B star, the formulation that I'm proposing at the very end, this B star, this target depends on this width or this proportion of the gasoline, like the weight of the gasoline, but I mean, I guess, yeah, I think one could construct different versions for this that don't necessarily depend on this factor, Ro. Can you show the like the 1559 like result again? But so here is, yeah. So I mean, the different thing here is that, so X is a vector here and B star is a vector. A is a matrix. Yeah, that's what's happening. Yeah, this is sort of understood as component-wise division. And is there, my only question here is like this, I mean, what I had in mind simpler than this is like, so you have N resources, so you would have N copies of 1559, which in this language would in that, having a A, B, a diagonal matrix, right? And then you have just N copies. Right. Is there, what's the meaning of not having a diagonal A? Why, what was the meaning of A again? Why would it have like this kind of, but what's this other interaction that can be introduced and why? So A is a matrix. It's by design not diagonal, but A is a matrix where each column represents the vector of resources, A, J, that are consumed by the transaction, J, because then this gets multiplied, A gets multiplied by X, which is a vectorial. I can look at that later, I guess. No. No, okay, so it's not a vector, it's not an M by M vector. Exactly, it's not a square matrix, A. So I mean, it's summing over the transactions and not over the, when I do that, kind of that dot product there with the vector with X, it's running over that N index. Anyway, we can talk about that later. Yeah. That's cool stuff. Awesome.