sunnya97.com

Sunny Aggarwal at Cosmoverse 2022 Medellin MESH Security, ATOM 2.0, MEV

The discussion delves into the complexities of maximal extractable value (MEV) in blockchain ecosystems, emphasizing the potential for both beneficial and detrimental impacts, particularly within the Cosmos architecture.

Summary

In this engaging conversation, we dove deep into the complexities of maximal extractable value (MEV) and its relevance in the Cosmos ecosystem, especially given the recent discussions propelled by the Skip team. I explored the distinctions between good and bad MEV, emphasizing the importance of privacy and how the Cosmos architecture allows for a more transparent and flexible approach to transactions compared to Ethereum. We discussed the governance proposal from Skip aimed at internalizing good MEV on Osmosis, highlighting the potential benefits of automated arbitrage and the role of external searchers. The conversation also touched on the philosophical implications of MEV, questioning the ethics behind certain extraction methods, and the ongoing evolution of MEV understanding within the community. Looking ahead, we pondered the future of MEV across the interchain, considering whether we might see unified auction systems or if each chain will continue to operate independently. Overall, it was a thought-provoking dialogue that illuminated the intricacies and future potential of MEV in our ecosystem.

Key Takeaways

  • The recent rise in interest around MEV (Maximal Extractable Value) stems from the entry of projects like Skip, which have sparked discussions on both good and bad MEV in the Cosmos ecosystem.
  • Cosmos architecture allows for more transparency and flexibility in managing MEV compared to Ethereum, enabling protocols to prioritize social good in transaction ordering.
  • Good MEV is defined as value captured without harming users, while bad MEV involves privacy breaches and unethical practices like front-running.
  • The governance proposal from Skip aims to develop tools that internalize good MEV on Osmosis, focusing on automated arbitrage opportunities that benefit all stakeholders.
  • The future of MEV in the interchain ecosystem poses questions about whether to implement unified auction systems across chains or maintain parallel auctions, with implications for efficiency and revenue distribution.

Detailed Analysis

In this engaging conversation about maximal extractable value (MEV), I found myself diving into the complexities of how MEV is evolving within the Cosmos ecosystem, particularly through the lens of projects like Skip and Mechatec. One of the main themes that surfaced was the distinction between "good" and "bad" MEV, a topic that has sparked considerable debate within the blockchain community. The ability to classify MEV in this manner allows for a nuanced discussion on how we can enhance the user experience while mitigating harmful practices such as front-running and sandwich attacks. As we navigate through the intricacies of MEV, it’s crucial to understand that our approach to it can shape the future of decentralized finance (DeFi) and the interchain landscape.

As I reflect on the broader implications of these discussions, it’s evident that we are witnessing a pivotal moment in the evolution of blockchain technology. The challenges of liquidity and trading volumes in a bear market provide a unique opportunity to innovate and refine our solutions. The conversation points to a shift in focus where projects are not just surviving but actively engaging in meaningful dialogue about their roles in improving the ecosystem. The emphasis on social good in transaction ordering, as highlighted by the potential of Proposer-Block Builder Separation (PBS), aligns with the growing demand for more ethical frameworks in crypto. This alignment is critical as it fosters an environment where protocols can prioritize user welfare while still capturing value.

The significance of these discussions cannot be overstated. By addressing MEV through collaborative frameworks, we can work toward a more equitable distribution of value within the ecosystem. This is particularly important in light of the potential risks associated with centralization, as concerns about power concentration in the hands of a few players could undermine the very principles of decentralization that blockchain was built upon. The dialogue around PBS and its implications for transaction ordering speaks to a proactive stance towards governance and protocol design. It reflects a deeper understanding that the architecture of Cosmos may lend itself to better outcomes than that of Ethereum, particularly in how we handle MEV.

However, while the conversation is rich with insights, there are limitations that can't be ignored. The distinction between good and bad MEV, while useful, is not universally accepted and could lead to fragmentation in thought and approach within the community. Additionally, the experimental nature of the tools being developed necessitates a cautious optimism. There is always the risk of bugs or unforeseen consequences when implementing new protocols, as highlighted in the discussion about testing frameworks and backtesting by the Skip team.

This video will be particularly useful for blockchain developers, validators, and anyone involved in DeFi who seeks to understand the evolving landscape of MEV within the Cosmos ecosystem. By engaging with these insights, we can better prepare for the challenges ahead and contribute to a more thoughtful approach to blockchain governance. The nuanced perspectives shared here equip us to be active participants in shaping a more resilient and equitable crypto ecosystem as we move forward.

Transcript

Speakers: A, B
**A** (0:17): So the second interview from the ground, from Medellin, from Cosmoverse. Yesterday, Ethan was here. Now I have the pleasure to talk once again with Sunny. Our last interview was actually about mev. We started to introduce the community to this very complex topic, but now we want to use our time very, very effectively and want to dive really deep into mev. So, first of all, how are you enjoying Medellin before we do that? **B** (0:44): I am loving Medellin. I've been here only for a few days, but it's like, I really like the city. **A** (0:50): Nice. **B** (0:50): The conference office is, of course, really great, too. A lot of talking. My voice is almost dead after three days of talking and just meeting people. **A** (0:59): Yeah, Today is also day three, so we are coming to an end here. But, yeah, let's talk about mev. So you mentioned it, like, before we started recording this. The MEV panel has been the most fun one so far, I would say. **B** (1:13): At least what some people have told me. **A** (1:15): Okay. Yeah. I mean, so why is. I think this is how we can start it, like, very well is how, like, what is the reason why MEV is, like, now becoming a bigger topic in the. In the interchange? So what do you. Why do you think this is the case? Because right now, the liquidity and the trading volume is very, very constrained, even on osmosis, which is, like, basically the main AMM in the cosmos. So why do we start to talk about MEV right now, even though, like. Like, from an AMV perspective, it's not the most relevant topic right now? **B** (1:48): Yeah, that's actually a good question. I think part of it is just that, like, Skip kind of entered the space and, like, brought up the conversation. Skip, you know, they were actually building on Terra initially, and then, you know, after Terra collapsed, they kind of moved over to building a more generalized cosmos solution. And I think when Skip entered the space, they kind of started a lot of discussion around it. And, you know, I mean, obviously we've been talking about MEV for a long time with Osmosis, but we've often been talking about it in the context of, you know, mitigating bad MEV through threshold decryption. But, you know, the SCIP team, like, help show and talk us through the idea of, like, hey, look, There are good MeV examples as well. And, like, you know, we can overlay these things. And so. And, you know, the script team has all just been, like, really collaborative on, like, figuring out ways to, like, help, you know, the good MEV while still mitigating the bad mev. And I think, I think just the way it went the time that they entered and then obviously mechatech has been like sort of building for a while as well. They were sort of kind of more under wraps, I guess. Right. And then I guess once Skip came in and kind of like made a big splash, that kind of forced mechattack to also, like, become a little bit more public. **A** (3:11): Yes, I think that's a very good conclusion. And yes, like, it's also like, cool that this topic also gets more attention because I think now we're in a bear market so we can focus on solving things. Because you mentioned good mev, bad mv, I know there's some controversy behind this meme, some people disagree with that. But nonetheless, I think that you can argue that MEV might be a certain risk for any ecosystem. We saw it in Ethereum, where users got harmed by advanced predators. According to this, Ethereum is a dark forest meme. And then there is in Cosmos the fear that MEV could lead to centralization. And there are some approaches here and there, for example, with pbs. So I've said a lot. So my question for you now is, where do you see the journey heading of mev, specifically in the interchain and how do you feel about centralization? How do we prevent that? Are you a fan of pbs? So, yeah. What are your thoughts? **B** (4:20): I am a fan of pbs, but not the way that most people think of what that means. You know, pbs, you know, stands for Proposer, Block Builder Separation. Right now, today, how things Work is the validator that's proposing a block. They choose the transaction. The idea of PBS is like have someone else propose, like, design how the block is structured. What I think is, but who do I want to be the proposer is I want the blockchain protocol itself to be the decider of how transactions get ordered. We what makes, what will make MEV different in Cosmos as opposed to other ecosystems? Right. We have mostly app chains and that means that we can have our application think about, make decisions about the order of transactions in our blocks. Right. Ethereum as a protocol is supposed to be this incredibly neutral protocol that doesn't understand the applications on top of it, right? It doesn't. It doesn't. The Ethereum protocol has no ability to make decisions about ordering. And so what they have to do is they have to rely on external like block builders to do that. Right. The in Cosmos and let's say osmosis, specifically the we're an app chain, we, our chain can understand the type. You know, what are the different types of trades that are transactions that are possible. It can know that, oh, this is a trade transaction versus a transfer versus or this mars liquidation. Or you can understand these things and it can choose the order to do two things, optimize for social good as well as optimizing for, you know, internalizing of the good MEV capture. So, you know, example of social good. Right. Like, and I think these actually can often be correlated as well. But like an example of like, you know, we can make sure that all Oracle updates happen as early in the. We can always, we can always make sure Oracle updates happen at the beginning of a block, for example. Right. And that's like you want that, right? That's good for the protocol, right. You don't want people to be able to like front run or back run or Oracle upgrades. Or we can say that, hey, you know, imagine all, every time someone does a trade, we do all the adding of liquidity first, then the trades, then removing liquidity. So that way liquidity can't get rugged from a user trying to do a trade. So there's all these kinds of things that you can do that promotes social good. And then another type. What I mean by good MEV internalizing is like we can understand what type of transactions are liquidations, for example, right. And we can say, hey, we're going to prioritize triggering the liquidations. And having liquidations happen is a good thing for the protocol. Right. That's how you maintain protocol health. But you can have it. So some of that liquidation revenue gets given to all Osmos stakers. Right. It's promoting both a social good but also like revenue through osmosis. **A** (7:18): Yeah, you mentioned some important points here, so I want to go back to the beginning of your answer. You basically also said that, I think as far as I understood it, right, like the Cosmos architecture gives us also more transparency and flexibility in order to take advantage of MEV compared to the Ethereum ecosystem. Correct. So the architecture, like the architecture of Cosmos is a little bit more beneficial for. In regards for mev. Correct. **B** (7:48): It's. Yeah. Well, what it is is it's more easy for the protocol to do things and maximize social good, which is not in Ethereum where they rely on external block builders. The external block builders are mostly profit maximizing entities and will, you know, they'll prioritize the profit motive over the social good. But because in app chains that protocol can make decisions about block construction. It can have a, it can add social good as an input into how it decides to build the block Okay, I see. **A** (8:32): Yeah, I think, yeah, I think that's also very, very young to be. Because the interchange is also. And we, we have to remember that the interchange is like, I would say with ibc, one and a half years old or something. And yeah, I think, I think in the next two or three years when we see like more liquidity coming and we also really see this playing out because like, like I have the feeling that a lot of this is also theory. But yeah, I think this is like a very interesting take here, but let's get to the here to the current time. So Skip proposed actually today, a governance proposal on the Osmosis hub. So what is the governance proposal all about? **B** (9:19): I like that floating ship there. You call it the Osmosis Hub. Yes, no, the governance proposal. So Skip is going to build a number of. Help work with us to build a number of tools to help internalize the good MeV on osmosis. So there's. Okay, so these, you know, okay, we have this taxonomy of MeV, right? The bad MeV is the stuff that requires reading other people's transactions. So your dark forest attacks, your sandwiches, all this stuff, right. Threshold decryption will solve this. Right. Your good MEV is not based off of other people's transactions, it's based off of State. Right? There's something in State. There's money on the table and someone is going to take it. Whether it's because of a liquidation or an arbitrage opportunity, someone's going to take it. No one's getting harmed. But value is not being extracted from anyone. It just, you know. Yeah. So, okay, so within the, this category of good mev, though, this or State, you know, state only dependent mev, there's. You have some things that require only internal information, internal to the blockchain. And then you have what's required external information. So what's an example of an internal information one? You know, we have circular pool routes in osmosis, right? Like, you know, you have an ATOM OSMO pool, you have an OSMO Juno pool, you have an atom Juno pool, right? If someone trades on the OSMO Juno pool, the other two pools, there's like a slight mismatch there, right? And there's an arbitrage opportunity there that doesn't require any external information, right? All the data required to find that arbitrage is on osmosis. So we could actually have that run in the protocol, let's say in the end blocker or even after every trade, we can have the protocol do an automatic recalculation of ARB and take that ARB revenue and give it to OSMO stakers. That's what Skip is proposing building. That's what that, that was a proposal. Then the other one is you also have things that are based off of external information. So let's say you know the price of Atom on Osmosis, let's say it's I don't know, $11. But then on Binance it moved to $11.10. Right? **A** (11:41): There's an include centralized exchange. **B** (11:43): Yes, this includes centralized exchanges. So this would include one other Dexes, but also centralized exchanges. Right, but the problem is this is not internal to Osmosis. Right. The Osmosis chain doesn't know what the price on Binance is, so it can't do that arbitrage by itself. So this is where we rely on the external arbitrageurs. Right. Someone who, you know, searchers like Mech Attack and stuff, who can like find these, you know, what their job is. Basically take information from the external system and bid to be the one to like be the one to execute that arbitrage. And because there's this like competitive game for people to bid to be the arbitrager, that's going to drive. So there's an auction system that happens on chain and that's going to drive revenue to sources from the revenues from that auction. So that's going to be. SCIP is also going to be building that. But that's going to become in the future they're first focusing on that first situation, which is the internal arbitrage. **A** (12:37): That's very, very amazing actually. And I think that's also the thing is also for us as a validator right now, we also explore some opportunities in regards if we should opt into Skip or and mechatec. And we are like doing a lot of research. And the thing is now here's my question for you is, I mean this sounds super amazing, but how safe is it to do like these experiments or how safe would it be to implement these tools? Is there a certain risk involved here? So can something. Yeah. Get something break? **B** (13:17): I mean there's always risk of bugs. We know, but you know, we've done a bunch honestly over the last like couple months the Osmosis team has been doing a lot of work on improving testing frameworks and like making sure that there's like bugs aren't happening and stuff. And so, you know, we're very happy or at least much happier. I think there's obviously room to go. But like we're much happier than we in the state of testing in Osmosis like three months ago. But also the SCIP team is they are really good at testing and back testing as well. What they've done is they've taken their arbitrage. I don't know if you saw they launched this satellite skip money where they've calculated how much art volume there was historically on Osmosis. They spent a lot of time doing a lot of back testing work. And so that's a nice way of testing. Obviously, we're not deploying this on chain next week. Obviously it is a big undertaking and there's going to be a lot of testing involved. **A** (14:13): Yeah, that's great because for validators, there is a big risk for us opting in. And obviously Osmosis, for example, is one of our biggest validators. I do not really want to destroy it, so there's a risk involved. And this is, I think we had another panel yesterday at the Validator meetup and I think what Barry from Square Skip said very well is that validators seem to be a little bit scared of MEV because the market is so small. We haven't tested that much yet, and we are a little bit afraid of breaking things. But speaking of SCIP and mechatec, maybe you can answer this question, as many people wonder now, okay, where's the difference between SCIP and mechatec? Because obviously they love to have spicy panels. **B** (15:06): Yeah. **A** (15:06): So why do they love to have spicy panels? I mean, are they not just two equal MEV protocols that do the same or where would you say this is a difference? **B** (15:15): Yeah, I think MECHA Tech takes a much more of a free market approach to it and like, hey, what's gonna happen is gonna happen. Like this whole, like, notion of good versus bad mev, they don't see it as like a bright line distinction. They're like, honestly bad. We're hauling sandwiches and stuff. There is, you know, it brings new people to the space. There's like. And so they're kind of more. Yeah, just like libertarian, I guess, about mev. And so they want to just let all sorts of MEV happen. Skip, on the other hand, is a little bit more opinionated or at least open to being more opinionated. Right. And like, you know, I think we've had a lot of discussions with them over the last few months and like, they are more interested in building, working with us to build on chain solutions so that we can be opinionated and like, promote social goods, while mechatech is more like focused on the off chains systems that, you know, end up being driven a little bit more by the profit motive of the searchers. Right. And I think, you know, I mean, okay, I'll be completely honest, obviously I think it's obvious that I have a slight preference for the, I have a preference for the Skip model, but I think there's room for both. Right. Because I think that even when you have the auction system on chain now, you still need off chain searchers and like aggregators of searchers. Right. And I think MECHA Tech will be like one of the biggest searchers and aggregator of searcher data. **A** (16:54): I see. And a small disclaimer for the next question also to bring this brief interview to an end. So you mentioned a couple of times, good versus bad mev. And I know that this is a meme that also Skip pushed very hard. Mechatec is criticizing this meme. And again, disclaimer, like, I don't have, like I don't have a preference right now for one of them because I think I really have to do like much more research here. But for me, like from a very broad perspective, MEV is short for maximal extractable value. And I don't really get the. Okay, you have good MEV and you have bad mev. For me it's like there's block space. It's like an invention. I mean, for example, I could like the car was also an invention. I can go into a car to drive to the super supermarket or can, you know, kill people with it, like theoretically, yeah. So do you maybe believe that like from a philosophical point of view that the, that maybe the problem is not MEV itself but like, maybe like sandwiching attacks? I mean, of course it has something to do with mev, but MEV is like just block space. So maybe it's a problem somewhere else, so to say. **B** (18:12): So the term MEV is a terrible term. It doesn't, it stands for minor extractable value. So first of all, we don't have minors, so that doesn't matter. And it's also, I think the term extractable is not the right word. I don't know what the right word is. But how I define mev, I have a talk that I gave at the Flashwatch team. I held this thing called MEV WTF a couple months ago and I talked about the taxonomy of mev. And one thing my definition of MEV is the how I define it is the value that can be captured by a block proposer by using the powers that just the block proposer has. So right now in most blockchains that includes transaction inclusion, transaction ordering. It includes, you know, there's other types of things that includes as well. Right. But so the goal, how you make a fix bad mev is you remove those powers away from the proposer and move it to a larger set. Now. All right, so to the point about the philosophical basis of like good versus bad mev, once again, I think bad MEV is when you are doing things based off of reading other people's transactions before they execute. This is fundamentally a privacy breach. Yes, right. And that's why, that's the ethical like basis of this right? Where you know, how does Robinhood make all of its money today? **A** (19:40): Right. **B** (19:40): What they do is they take user data and sell it to Citadel who then front runs the users. **A** (19:47): Right. **B** (19:47): In the 21st century we have this like, you know they say data is the new oil, right. And like user data. This is why privacy is so important. Right? Like if we want to like fight against these like rent seeking profit, like maximizing actors, we need to build privacy systems and building privacy at this, you know, we need to build privacy at all layers of the stack to protect user data. But like privacy at the mempool is one of the most important parts. So that's where at least I make that distinction. Line of if it's a privacy breach, I'm putting that as bad mev. If it's a game like a puzzle and everyone, just everyone as long as you don't. So it's also privacy beach to like let's say there's a puzzle on chain. By puzzle I mean like oh, there's an arbitrage opportunity or something. If it's like it's, it's a privacy breach that if it's a, if you copy someone else's answer. Right. But if the puzzle is simple, many people know the answer, already know the opportunity. Whoever's just like the first to press it. I don't think that's a privacy brute each which is why I don't put it under the category of bad. Maybe good MEV is not the right word. Let's just call it non, non harmful, non extractive mev. You're not extracting it from someone else. **A** (20:59): Yeah, so, so just also small disclaimer, we're not talking about Citadel 1 with. **B** (21:04): The Robin Robin Hood Citadel the market, the you know, hedge fund market making. **A** (21:10): Just, just that there's no confusion. To wrap it up, I agree with everything what you said, but I tend to agree a little bit with the outcome because I Think. Here we are again. You mentioned this privacy problem and this is how we end up in this bad. In this bad MEV meme. I think for me there are a couple of parts of the story. I just see, okay, this is like just the privacy problem in general that we have in crypto. I mean, like, generally, it's not like I actually also use different addresses because I don't want to have one address where everyone can see what I'm doing. I think this is like a general problem in crypto. That's a privacy problem that we have to solve. And you're doing like now encryption in the mempool you started at last year, which is super cool and liquidation. You mentioned it as like just a tool or like, yeah, a tool, so to say, to keep a protocol healthy. So I think, I don't know, it's like, it's like such a, such a complex topic. I think we haven't really figured out like, as a, as an industry what MEV essentially is. So what is your point on that? To wrap it up. Like, did we actually all together understood what MEV is? **B** (22:30): I mean, hot take. I feel like Dave and I had figured out MEV like two years ago and like we had this whole taxonomy and we explained it, like all this stuff. And then I feel now the rest of the ecosystem is starting to like, catch up with our taxonomy and like, you know, we back. So I remember like back in September, October of 2020, we like had this whole taxonomy of MEV and we're like, okay, this is the bad one. This is a good one. This is how we mitigate. And I feel it's like, it's nice that like, I feel everyone is starting to like, come to realize, like, figure out this taxonomy along with us now. **A** (23:06): Nice. Last question, really. Last question. To wrap it up. How will MEV impact the interchange in the next two or three years? Where are we heading? What are your expectations? **B** (23:18): I think the most interesting question about how MEV is in a happen in the big open question of how it's going to happen is, okay, let's say we have a bunch, let's say you have a bunch of top of the block auctions, let's say on Osmosis and Juno, if you want to be the person to arbitrage both of them perfectly, you want to actually ideally win both of the auctions. Are we going to move to a world where all cosmos chains that have like a auction system, a unified auction system where like you are bidding to be the top of the block on both atomically on both Osmosis and Juno. And if not, then you don't go to, you know, there's that world. Or are. Are all chains gonna have their own parallel auctions and you know, it's a game to figure out who can win multiple auctions at the same time. I don't know the answer to that. That I think like there are strong incentive reasons to go for the ladder. Each chain wants to have its own mev, but there's a lot of efficiency reasons to go for the former. And like how is this going to play out? Is there going to be. Or maybe there's going to be some combination of the two where maybe there's like some sort of joint auction but like a revenue split amongst the chains. Like that I think is the most interesting open question that I don't know the answer to and I think will be discovered. **A** (24:46): It will be discovered. It will be discovered in the next two or three years, I guess. Yeah, Sunny, thank you so much. This was a very eye opening conversation and yeah, if you want to learn more about MEVs, we have like so many episodes recorded already. Check it out. And with that said, I hope I will see you soon. **B** (25:03): Thank you.