DappCon 2023: “MPC + AA + MEV = Ménage à trois?” - Freddy

DappCon 2023 · September 2023 · 24:53

Freddy asks at DappCon 2023 whether multi-party computation, account abstraction, and MEV add up to what he calls a ménage à trois, covering how the three areas of Ethereum research and engineering intersect. The talk explores where these three distinct technical threads overlap in practice.

Topics

From DappCon 2023, hosted by Dappcon Berlin.

Transcript

hi there glad to be here and glad not to be alone actually this morning uh so thanks for thanks for coming out um uh I'll have yeah maybe some people say it's sexy some people see it as complicated a Manaj uh it's definitely three buzzword uh that you I hope that you're sort of familiar with because in 20 minutes I cannot give you the the basics of all three of those uh so I'll try to focus on the combination of these uh but first just a little bit about myself I'm Freddy um I was the co-founder and chief data officer of any block analytics uh which was then acquired by block demon in December 21 uh block demon is uh institutional

infrastructure provider in web 3 so we offer nodes and data and staking and an Institutional MPC wallet uh for institutions ranging from the very conservative trefi banking sector I think gold sax STP Morgan and the like to finex like revolute PayPal and the like and then uh obviously also like uh web three native foundations and uh institutions like that so uh let's get into it um so just to give you a a very brief intro into all of the three topics basically so account abstraction MPC and me in between I'll sort of combine two of these each so smart accounts comparing

count obstruction and MPC and then later I'll uh dive into the meev supply chain and uh how it connects with uh Aon abstraction um and then I'm going to combine it all and hopefully have some takeaways from different angles of different stakeholders so account abstraction and I I have to say I'm the ethereum ecosystem Le so I'm always coming from the ethereum lens of things and I guess we at the ethereum conference so we're talking Erp 4337 and there on the let's see if this works so on the one side you have the user which has a a wallet that is um account abstraction enabled and on the other

side on the Chain you actually have their code sitting there um and obviously 4337 is about this global entry point contract which standardizes how we think about account abstraction and basically the user sends his user operation instead of a transaction into the user operation meol where it is picked up by bundlers in the middle here um who then bundle all the user operations send it to the entrypoint contract who calls the contract of the user on chain to verify that it's paid for gas and then executes it so that's sort of the the very basic flow um this this slide is actually from

Visa who did a POC with a pay Master which is a way to abstract away the gas the the need for gas uh from the user which is one of the great use cases that hopefully a kinds everyone is talking about bringing in the next billion users um so let's see about that so you might have heard about account abstraction if you haven't I think there's uh some great talks today in the in the morning about econ abstraction so next up is MPC which stands for multi party computation and again you might not be as familiar with this topic it's actually not only existing on on web 3 um it's actually started with Dutch sugar beat

auctions uh and and other sort of uh private key management but obviously for for crypto people like us it's always about how to protect the private key and as you can see here on this chart from msar is basically the user take an input which is private um and they will be combined with others to then form something complete that for example could be a private key that then signs the transactions and but none of those private parts will be revealed ever and it's not going to exist in one place and that's the magic because obviously we all know about the dangers of private key management and being stolen hacked

lost not backed up all these kind of things right and MPC basically solved this problem now um there some say that MPC is HSM KSM and a multis but better I'm not going to dive into all of these acronyms but but zoom in on the on the multis P to just show you an example on how MPC technology is uh Superior in that in that sense uh because if you see here on the o sorry on the left side here you can see sort of the multisig you have three locks to open the safe um so there's three keys and three locks and one of the disadvantage is is that you also have three transactions on

chain which means higher gas cost and is also transparent on who participated in signing the transaction now the threshold signature scheme which is uh a subtopic of MPC Works a little bit different there's only one lock there's still three keys or three parts of a key actually that when combined are going to open the lock and the save is going to open so there's on on chain you can only see one transaction you only pay one time gas fee and also it hides away who participated which might be a nice uh property depending from your point of view obviously um and it also can be upgraded you can rotate the keys and and all

those kind of things for for Key Management Systems so moving right along now I bring those two together you can probably already see that the they are pretty much related there's quite quite an overlap between the two but there's also like both of them make smart accounts basically Elevate the crypto experience to your bank account right in the sense that you can log in with your email and password you can have two Factor identification you can reset it you know all these kind of things and and both Technologies provide this but account instraction has more the focus of making the transaction smart while NPC sort of is all about the key manager and making

it more secure um just to help you sort of differentiate very high level then account abstraction as we talk about it is evm specific so all ethereum mainnet layer twos uh those kind of things while MPC is naturally Universal so you can also apply to bitcoin Solana poka do you name it um because the the logic is offchain compared to account ofsection where the smart contract sits on chain um also obviously very important in this regard is focusing on the trust model so on the constraction you trust a lot of smart contracts so your own Wallet account the entrypoint contract um all the intermediaries involved there while on the MPC side you trust the technology

the MPC implementation which is highly academic highly cryptographic and I don't understand any of that um uh and obviously the infrastructure it runs on um and for econstruction I guess you might be familiar with there's some prerequisites that you need so standardization was achieved basically by 4337 um but the daps also need to enable Smart accounts which is uh not always the case uh and obviously we need those pay masters and bundlers that I mentioned before uh so that to make it actually work permissionless Le uh and on NPC there's nothing because uh to the to the blockchain it's it serves like an EA like an external own account uh traditionally and so what I already said is the main benefit for econ abstraction

or one of the main benefits is gas abstraction um and on some other levels it's open Innovation we've seen these standardization processes to standardize uh smart accounts like you know safe uh is the safe team is proposing some methodology of enabling interoperability of smart contract accounts uh and these kind of things and also the policies are transparent on chain which is great for Dows Etc but on the other side MPC is more geared towards the institutional use cases because number one it's multi-chain but it's also sort of close Source control of this MPC core technology um and the policies and the signers are private and that is just more appealing to institutions

generally so now we've had we covered two of the three right uh so let's dive into the third one which is me maximum extractable value these days it's not called the supply chain anymore it's like a supply network and this is the simplified version of it basically um these days it'll get complicated and I'll break it down for you and start from simple and then make it complicated so on the left side you have the user and its wallet who then sends a transaction to the Searcher who listens to the mempool um and tries to find let's say Arbitrage opportunities front run or sandwich uh user transactions sends the bundle to the Builder uh the

Builder makes the most profitable block of all those Searcher inputs that that he receives and sends it off to the relay and the validators subscribe to the relay in order to bring the block on chain that's you know the 30second nutshell me um and I mentioned already this goes through the public mol right that's the that's the public path uh and as you already can guess from the layout of this slide there's a there's an alternative way which is a private path and uh this is to do with private order flow you if you're familiar with the meev space you might have heard about it um basically it's trying to get an edge from the different parties in this game and in this you know trying to

extract the value and also from the user side of things trying to protect himself against this right not being front run um maybe even participate and recoup some of the meev value as a backround as a service but obviously there's also trade-offs um because it introduces trust assumptions to those parties in the middle uh and also there might be an inclusion delay for your transaction but so this is this is going through the the private path and it can be done via an RPC service so these are then sent your transactions sent to a builder M Pool and you can see here it goes straight to the Builder um like let's say think flashboard protect and and the like um or you have orderflow auctions I think um cow swap protocol

and and things like that um and so there's there's orderflow auction M Pools as well and in that in that scenario basically it's sent to the Builder who then shares it with e either all Searchers or a Selected Few of Searchers trusted Searchers um so to keep it still private in a way um but also you know provide the benefits that the user is looking for so now we have those two paths and now we introduce account abstraction into this supply network um and there you see you you add another layer to that because now we're talking not transactions but We call we talk about user operations uh and again you

have the the bundler user operation pools you have the orderflow uh auction uh user up uh pools um and then there's also a public user pool being built I don't think it exists right now but it'll it'll be built so then we have the public equivalent as well now I would have loved to add MPC to this slide but there was no room anymore uh so I'm going to uh start a new uh um in here so and to talk really about the manaja how those three topics come together um so you can already see I I arranged it sort of MPC and AA on top because those are the related topics they're both about smart

accounts and then we have me um as sort of the the third the third party now you can combine them uh for front run protection and to recoup your me that's that's what we said and it's the same for either an NPC wallet or for an account abstraction wallet so nothing nothing terribly new here uh but then you can also combine MPC with e Construction and uh one of the use cases or the prime use case in my opinion is actually to enable gas abstraction via a pay Master for an MPC wallet so you have this Ultra secure MPC wallet technology um but you still might want to um abstract away the gas for the user and

then there then you combine it with a gas abstraction um on the con abstraction level so that's that way um and it gets really fancy if you try to do it the other way and combine a con abstraction with MPC I found two use cases for that uh one is in traditional MPC setups not not with the block demon wallet the block demon wallet is always on Prem completely for the customer but in in many of those wallets is that the provider runs one MPC Shard and the user runs the other chart uh so that makes it a little bit difficult or you want to have an emergency recovery system that allows you if your provider goes down out of

business disappears you know we've seen it all um so that you can recover your funds right and therefore you need to back up The Shard of your provider now if you want to back up that you could argue then you're back at square one because then you need to take care of an of a private key or part of a private key um you need to back it up you need to keep it secure you need to have access to it when needed all these sorts of things and if you would back up that private key share with a account abstraction uh setup then you can have sort of this composable security and and start small you don't have to really you know put it anywhere you can add a two- Factor authentication later and and all

those kind of things as you as you grow your Holdings on that account maybe and then there's even a use case which I recently discovered that maybe you could have a an AA signature share uh on an MPC and that would enable like smart accounts on on bitcoin not sure how how sensible that is to do but anyway I saw it um I have the the link in the slides and I'm going to share the links the slides on my Twitter afterwards so you can dive deeper if that's of interest to you so now that we've have you know all these things playing together the question is is it worth it because obviously you add a lot of dependencies and I would argue that this

is kind of dangerous actually um because those thirdparty dependencies they all have a risk benefit trade of so you're I mean I've introduced you to the benefits but also you know it it does add dependency complexity uh they need to be evaluated and monitored like let's say what is the best front run protection service out there I couldn't answer that question and there's probably tradeoffs within that category and then even if you found the perfect solution for you you need to monitor this if this stays The Perfect Solutions over you know a period of a couple of years right um so there there's you know effort involved

in that and then all of these services or Technologies protocols they have a business model so you know if it's free then you're the product as as they say so you know you have to you have to think carefully about that which basically brings me to the takeaway so what does it mean for you and obviously I don't know your background but so I try to put it into different buckets basically so most of you are retail wallet users I would say um so your Dean stuff gets more complicated yes but there's also more options to stay safe so I would say Enjoy

responsibly and uh yeah learn about these methods of of keeping your trusted assets safe that's that's important and that's good and that's what drives a lot of those Innovations now for institutional wallet users which is sort of our Target uh cohort um the complexity can be a threat to security so for them it's the risk are are much higher valued or or monitor it basically so for them it's often better to keep it simple and optimize for their needs separately um now if you are a wallet provider then obviously this design space widens a lot it has widens and I'm

sure this is not the end of the line there's going to be new innovations that will make it even more complicated in the stack so and and your bandwidth probably doesn't expand right you have a small team and you need really need to focus and and zoom in on your target group needs in order to uh provide the best product now if you are in the meev space and if you're for example a Searcher or a builder uh then there's new new work for you to be done basically to watch to not miss out so right now what we see is that the Searchers is becoming solvers or fillers like let's say in the in the cow swap protocol or something they they're call different names and different protocols but generally the type of work that they do is the same so Searchers become

solvers and fillers and Builders become bundlers in the econom abstraction world uh so that's pretty clear and why do they do that because the mempool and the liquidity is fragmenting across those different you know the public path the private path the various private paths um so you need to play in as many as you can in order to have maximum exposure and maximum benefit and for D Builders uh like I said the good part is for MPC MPC behav like an external owned account on chain so you don't need to do anything but if you want to enable your customers and users to use um icon abstraction then you need to enable EIP

1271 uh for smart accounts and also with regards to meev you need to build me aware applications uh this can actually be a business model like let's say for a wallet if they if they don't charge a fee but they recoup the me it could be could be even a business model but uh definitely need to be thinking about meev and how it how it relates to your DB and last but not least for infrastructure providers um there's obviously a whole bunch of new roles available basically uh like running highly secure MPC nodes for example running an account abstraction pay master or uh run meev optimized validators

so there you have it it's uh you know it might be sexy it might be complicated depending on your point of view but uh I would argue that it's important to you know follow all of those uh Trends and and understand the interactions of each of those and I realized this was very brief uh and we could talk about this a lot longer uh but this could be a start of a conversation I'm happy uh you can contact me email Twitter or X or whatever um and also find me outside but I think we also have time for some questions thank you so much we we do have a couple of minutes for questions so if there are any we have some microphones y over

there Hi I um I was wondering if you are aware of like any examples of uh wallet providers that use this MPC uh model to build in like additional checks such as uh compliance kyc and maybe also security uh checks like a database of uh all the contracts that can be trusted and avoid any transactions to uh malicious contracts um I don't know any concrete names but I assume that a lot of them do I know it's on our road map for sure so uh yeah it's it's one of the things that you can do in MPC sort of as well as in account abstraction um and so I I know

that there's a lot of talk about this sort of in the account section and I'm I'm sure they're going to be sort of specialized providers for these let's say add-on Services right like scam protection or you know wh listing of you know compliance or or blacklisting bad addresses you know if you think about the ofac list and things like that uh and I I believe and this is also why it's exciting to see the standardization approaches for the account abstraction Parts because that would allow sort of to have a a plug-in module that would provide these kind of services and I do assume that these maybe not as standardized because the MPC technology is a little bit more specific I guess um but I would assume that those same providers could provide that those lists

basically just lists right and uh that feed in the logic and update regularly could also provide that to the MPC wallet providers we have time for another question do we have another question yep over there y one of the advantages that is often also associated with account abstraction is that you can move towards signature schemes in the future which are quantum secure how does this look for because theoretically you like why most of the cter protction currently uses ecdsa you

can change this however you want right um how does it look with threshold signatures right like and in general how how far is the research there how does it play along and what would be avenues for this yeah so to my understanding this is pretty similar actually um so basically both account abstraction and MPC would allow you to use any type of signature um which could be a security problem uh but it could also be you know opening it up for Mass adoption because if you can use the Biometrics on your phone that is you know from the usability kind of view I think that's to me that would be the easiest basically uh just talking about myself um and also another sort of future benefit of that

is that it could make it um Quantum resistant because eventually you know the signature schemes are going to break when we have quantum computers and you want to switch that to something else and that could be a way to achieve that to my limited cryptographic understanding but so yeah I think it's the the same options and the same possibilities in both Technologies okay but and with NPCs you would get a new key right like theoretically again it's more like on account obstruction you argue your address can evolve right like in the sense of like I know it's chain specific but your account can upgrade towards more secure Quantum security I'm just asking because on one of the earlier slides you mentioned right like that you can upgrade the security of your threshold signature while um

actually for the multi signature comparison it was said it's not possible so I'm a little bit trying to understand this where how this plays into account abstraction because there it's listed often as an advantage that it's actually that e contion can evolve better than MPC can evolve right yeah I think I think that's something that depends on the implementation and so if you have your Eon abstraction upgradeable then you could probably do that um however that upgradability might also be a security threat you know if you're so there's that at least to my understanding there is a trade-off I'm not an expert on account abstraction but um so I think yes there there are ways to do that but that again comes with another trade-off

so I totally believe that The Magicians can can work it out but I have the stop Richard come up front and talk to Freddy please I have the unpleasant task of being the timekeeper and we have to thank Freddy at this point for his awesome talk thank you so much