Escape Hatches: Urgent anti-censorship solutions

ETHCC 7 · 11 Jul 2024 · 22:41

Omar Espejel explains escape hatches, a mechanism that lets users of a validity rollup (ZK layer 2) withdraw their funds even if the operator censors them. He argues that no major layer 2 is decentralized yet, so any could block withdrawals, and that businesses want to claim self-custody without the cost of full decentralization. He says that claim legally requires users to withdraw independently of the company. He focuses on app chains such as exchanges, citing dYdX version 3 and other StarkWare-based chains as live examples, and the two operations covered: full withdrawal and forced trade. In Q&A he suggests starting from the Madara documentation.

Speakers

Topics

From ETHCC 7, hosted by Ethereum France.

Transcript

It's okay for you. Perfect. So thank you very much for coming. Uh today we're gonna be talking about escape hatches as a solution for anti-censorship. This is very, very relevant since we are in an industry that is focused on getting anti-censorship to most users possible. So we're gonna be talking about three things. The first one is what problem are we trying to solve in this industry? Which I think if we come in if we take it to the bare bones of what we're trying to solve, we're gonna try to address that.

Second, why escape hatches are crucial for this problem? And third, how scape hatches work. So I can see that not a lot of people here know what escape hatch is. So who here knows what escape hatch is? So we will one. Okay, only one person knows what they are, and that's that's the issue, right? We're trying to get as many people as possible to know about this very nice mechanism to help us get to most as most people as possible to give them anti-sensorship powers. So who knows here what is a validity rollup?

Validity rollop. Okay, we got three to four people, four people more or less. Yep. Basically a little, you can call it um layer two. And if we think it's powered by zero knowledge, for example, Starknet, CK Sync, but uh I think that you could also think about them uh kind of like similar to optimism, arbitroum and so on. So if everything is working fine, for example, if you got a prover and you got a verifier and everything is beautiful and working nicely, which is already something to ask, then uh this validity rollup will never be able to steal your phones. Okay, so this is very relevant, and let's get uh get that out of the way, okay?

So valid robes are supposed to be very secure and very safe, so they won't be able to steal your phones, but what they can do is to censor your transactions, okay? So, what specific transaction we're talking about, for example, withdrawing your phones, so they will be able to block the withdrawal of your phones, of your well-earned phones, they can censor that, and that is called censorship in our ecosystem. So, what is censorship resistance? Then censorship resistance uh answers the question of what can a user do if they are being censored. Imagine that you are not able to withdraw your phones, no one is stealing them from you, and they can only steal you steal them from you, but they can prevent you to withdraw your phones.

It's kind of like stealing, you could say. Because layer two is not decentralized. I don't know a single decentralized layer two, neither optimism, Arbitro, starknet, CK Sync, whatever. None of them are decentralized, so all of them can censor your transactions, all of them can prevent you from withdrawing your phones. So we are not decentralized yet because it's not an easy problem to solve.

Okay, like decentralizing a network is not easy at all. And well, we have been talking a lot about eigenlayer recently and all the powers that they provide to the to the networks or ABSs. And well, basically they're trying to solve this issue. Like decentralizing is not easy at all. So of course, decentralization is our end goal. We want our network to be decentralized. So in Starnet, and basically all layer tools are working towards this goal to decentralize themselves. Now, do we really think that we are gonna manage to get layer twos that are decentralized? I don't know, by the end of the year, by the end of this of two years.

I don't think so. Like decentralizing a network is very, very, very hard. There's a lot of incentives, and it's been never been done before for a layer two. The incentives are different to those of I don't know, Bitcoin or Ethereum. So decentralization is hard. However, what if we provide certain powers that decentralization gives you for specific transactions? And the most important transaction I've been talking about is withdrawal of funds. What if we are able to always withdraw our phones? Well, uh yeah, currently you cannot withdraw your phones if they don't want you to withdraw your phones. Okay.

So I'm sorry that I mentioned the withdrawal part so much, but uh, I don't know, maybe some of you have been through some crisis, or you have seen at least some crisis in on the internet, on the news. And for example, Mexico at certain point, Argentina at also another certain point, they were prohibited by the governments to withdraw their phones. So they were not stealing the phones from them, but they were not letting them withdraw their phones. So withdrawal is I think like a crucial right for a human right. Okay, withdrawing your phones and moving them to whatever you want.

So whenever you heard about a crisis, like I don't know, like financial crisis. But the sometimes the banks won't allow you to withdraw your phones because there's a lot of liquidity problems and and so on. So again, withdrawal is a crucial uh right that we as humans have. And escape hatch are focus on allowing you to always withdraw your phones, no matter what. The only way that you cannot withdraw your phones is if Ethereum is down. If Ethereum is not working, then you will not be able to withdraw your phones. But assuming that that Ethereum is working, then you will be always able to withdraw your phones.

Okay, this is very, very important. That is what an escape hatch is. Basically, what the name says you can escape the protocol, you can escape the network whenever you want. So this brings me to the second point of my presentation. Uh as I told you before, decentralizing a network is not easy at all. We know that. And businesses, well, businesses don't always want to decentralize. I mean, uh again, decentralizing is very expensive. And it's not easy at all. So what if we ask all the entrepreneurs out there? Like, I mean, like why combinator level, uh uh uh entrepreneurs, people that are very serious in in growing businesses.

Because I know a lot of us here work on the protocol at the protocol level, right? So actually, the the past couple talks have been a lot about protocol, protocol, protocol, uh, infrastructure, and so on. But in the end, we want entrepreneurs that want that that can create and bring self-custody, the capacity for you to withdraw your phones whenever you want and transact with your money. We want to bring them to the end user, the people in the street, to my mom, to my grandma, right? Uh so we're creating this amazing infrastructure for them, right? But we need to provide these entrepreneurs the capacity to not be able to decentralize fully because it's very expensive again, but they want also to claim anti-censorship and self-custody. That is what the scape hatch is.

So let's think about a case study. And this is kind of like uh uh some of you will recognize what I'm trying to talk here about. But imagine that we have um a trading, a decentralized trading company called the Integrate Inc. Okay. So integrate ink is looking for something that is profitability. As an entrepreneur, you want money. And it's okay. Actually, well, that's how capitalism works, and if we assume that it's it works more or less good, you're looking for profitability. You're not you're not looking to decentralize the world, you're not trying to provide self-custody to millions of people. No, they want money.

They want money, and that's okay. That's what powers uh uh our world and uh incentives are created for that. But what if we provide this entrepreneur that is looking for money for profitability? They add on the feature that they can add to their users that is self-custody. What if we provide the powers to this entrepreneur to go out in the street and say, hey, I won't be like FTX? Okay? I won't be like FTX. Whenever you want, you will be able to withdraw your phones with me. Okay?

So that is what I'm trying to do. However, if self-custody becomes so hard and so expensive, they will end up pivoting to another, I don't know, maybe they they they are gonna go and maybe search for a job in Google. They were they they will, I don't know, uh make uh the next FTX running on Amazon web services. It could be, right? So we need to make it as easy as possible for them to be able to go out there and fight for users. And for this trading fintech that we call integrate, for them to be able to claim that they are self-cost-custodial, uh they need to be able to, and this is actually a legal term.

They they need to be able to say and claim that the users can withdraw the phones independently of them. Okay? And this is actually I don't want to name companies, but this is real, okay. So if you have a company and you want to say that you are providing self-custody to your clients, you need to show and demonstrate and prove that your users can withdraw their phones whenever they want without your help. Okay? And this is this is again, this is a real case. So what are the critical operations that we're looking to give users? There are two.

The first that I talked before that is full withdrawal of the funds, and the second one is a forced trade. But I will I will focus more on the first one, which is the full withdrawal of funds. Now the moral of the story, the summary is that again, entrepreneurs want money, they want to be profitable. We understand that. And self-custody is not the end goal for them. Self-custody, I don't think self-custody self-custody is only the end goal for for crypto people that are working maybe in infrastructure, and I don't know, like it's not the end goal for the average person out in the street or entrepreneur. Okay.

So we need to be able to provide them with self-custody powers as easy as possible and as cheap as possible. That's it. That is the moral of the story. So if the company goes out there and provides self-custodial powers to a lot of users, then they will gain some money, they will be profitable, they will also provide user satisfaction, security, and autonomy to people. So basically, what we're doing here is claiming the promise of blockchain. Self-custody to a lot of people because they are able to withdraw their phones, which could be enough, right? Could be enough.

Do you want your bank to do something else? Like you have a bank account, a debit bank account. So you have money in there, okay. What do you care about that? You don't care about creating a smart contract in that bank so your money can do certain stuff. No, no. They don't even provide that service, right? They only provide you the service of uh putting your money in your debit accounts and take it out whenever you want. Supposedly that is what they do, okay? And maybe send the money to someone else. So basically, you only need like the capacity to withdraw your phones and do a force trade. That's what we're doing here.

We don't need any more. Like we there's no smart contracts here, okay? It's only a uh fintech, a trading fintech that is providing you a single service. And I'm gonna talk about that in a minute. But yep, that bitch basically in this beautiful case, blockchain delivered on this promise of self-custody, everyone's happy, and we didn't need to decentralize these uh these bank accounts. So this thing is to the final part of the presentation, which is an app chain. So, just real quick. Uh, the definition of an app chain for for me is a chain that is dedicated to a specific application. It could be a layer three, layer four, layer two, layer one, whatever.

It doesn't, it doesn't matter. Basically, uh, as you can see, what is my purpose? My purpose is for to run an exchange. Okay? Again, a David account for uh for you in your bank, okay? So I know you don't know you don't need uh so escape hatches are for specific transactions, as I mentioned before, not for Ethereum as a whole, for example. Where you have smart contracts with a lot of different functionalities and uh you know like a Turing machine, so you can do a lot of different stuff. We're talking about something very specific, in this case, an exchange, for example. Now, uh what I'm talking is nothing that I'm talking about is theoretical.

Everything is applied already. I'm not talking to you about something that we are gonna release or that someone else is gonna release. No, this has been in in in in place since 2020. So if you go to L2B, you will see a lot of different layer tools that are actually app chains. So they have only one goal. Okay, for example, all the all the blue ones and orange ones are app chains. So we got millions, millions and millions of dollars on top of app chains that they do only one thing. And maybe you can recognize DYDX in there, immutable X, Apex, Reno Fi, Sorrare. So the ones in blue are actually on top of the starware ecosystem.

So starware has focused a lot on this type of app chains, and precisely uh practically uh several of them have already escape hatches implemented. Okay, so what I'm talking to you about is already implemented there, and they provide self-custody to different uh app chains. For example, DYDX version 3. So we got a lot a lot of different layer 2s, and I will give you the case of DYDX version 3. Again, this is a real case. So basically, DYDX, they they have escape hatch so they can claim legally that they provide self-custody to the clients and it's enough they theoretically they need it to decentralize but well they chose after that to to go to cosmos but that's another story but uh a lot of a lot of a lot of escape transactions already happen on top of the ADX if you go into L2 bit you will see that they have had a lot of different uh escape uh transactions for example some people withdraw BTC Dodge ETH USDC whatever okay so escape hatches work and they provide the users of an exchange like DYDX which is huge the capacity to withdraw the phones whenever you want okay again this could be this could be enough right if you're talking about a debit account or an exchange it could be enough and I'm happy to to discuss maybe for you it's not enough because again the centralization is the end goal that's where we where where we want to go everyone wants to go there but it's not cheap it's not easy and we we need to provide with self-custodial powers to as many people as possible as soon as possible now uh finally let's talk about exactly how escape hatch this is the technical part of my talk so how does uh escape hatch looks like in practice basically we have components in the layer one which is the lowest part and then we have components in the layer two which is the in this case I will talk about the start net so uh we're not making the story too long basically the main components in here are in the layer one the verifier the and the force transaction queue.

And also the bridge. And on the layer two, we have the balance calculator. So put attention to the balance calculator. And then we have off of off-chain, we have something that we call the escape tool, which is done by a sequencer, in this case Madana, and a prover in this case Stone. So these two will allow us to escape our funds. So again, this is the technical parts. Sorry if it gets a little bit weird, but imagine that I don't know, let's let's think about uh DYDX version 3, everyone dies in the company, or David Malicious, or I don't know, like something happened to them. So they are not able to give you your funds, all right?

So then we can use a forced transaction. It looks like this. The user first requests a forced transaction. It goes into the queue in the layer one. The red ones, the ones in red are the layer ones, the ones in blue are the layer twos, okay? So it goes to the to the transaction queue, submits a request to the layer two, asks, sorry, to the layer one, submits the request to the layer two asking for the money to be to be able to be withdraw. And then this uh assuming that everyone dies in, for example, I don't know, this uh app chain or whatever. So then uh they are censoring the transaction, okay?

Assuming that they are censoring the transaction. Then this will go to the sequencer, the sequencer will see the the sequencer will give this app chain certain amount of money, maybe if I'm not wrong, it's seven days for most of the app chains. Like if you don't give this user back their money in seven days, they will then we will freeze you, okay? They will we will freeze, imagine freezing, I don't know, a big company managing millions of dollars. Okay, so that's that wouldn't be good for them. But since everyone die, then we will freeze them. So the the app chain gets frozen, and then we we can go to the next step, which is the left part, and it's basically going to the to the escape tool.

And the escape tool, what we'll do is check how much money this user actually has. Okay, this user has uh $10. We calculate the balance for him and for all the all the other users. And then it will create a proof that will be sent to the verifier in the layer one. Okay, this user actually has $10. That's what he has. Okay. Finally, this will go to the layer one, and the user will have to request to the bridge. Hey, the bridge in layer one, hey, I want my USDC back, my $10 back.

Okay. So the bridge will consult with the layer two to see if actually the mechanism was frozen or not. If it was frozen, then it will check how much money this person actually has, so $10. They will check the proof that was sent by the escape tool before, and then it will allow the person to withdraw their phones. As easy as that. It's relatively simple to be honest. And this is all the all the process of how an uh escape hatch works. And actually, again, this is how it actually works. I'm not talking about something theoretical.

But now let's talk about the next steps. What are the next steps for us? The next steps is to uh because currently escape hatches are only available as I showed you before to app chains in the Starkex ecosystem, which actually is actually permission. So you need to ask for escape hatch implementation and so on. So what we want to create is up uh escape hatches for everyone to be able to build uh decentralized and actual well, not decentralized, to create uh an exchange that wants to provide self-costly powers, so we can allow anyone to be able to use a escape hatch for the withdrawal transaction. And second, because the starware the Star Wars team is is crazy.

They are very technical. So they are dreaming very far and thinking, what if we have escape hatch for all transactions? This is this is very technically complicated. Very, very technically complicated, but you know, these guys are very very good and and it's something that is being researched. A general escape hatch. That would be very, very crazy. Uh well, that's all my talk. I think we have some time for questions, but before that, thank you very much. My name is Omar Spehel. I work for the Starnets Foundation. Feel free to send me a telegram if you want at any point.

If you have any questions, if you want to join the Starnet ecosystem. Uh, before that I work at Star Wars, and before that in machine learning at Hogin Phase. Uh that's my my telegram, so feel free to go there. And well, thank you very much. Those are the slides, and I'm free to any question. Yeah, we have some time maybe just for just for one question. So if you have a question, feel free to to raise your hand and uh I will give you the mic. Yeah.

Now you know about escape hatches, no excuses. So it would be amazing to have this kind of implementation in other networks. Uh they have different types of things. We'll be happy to. I heard Optimism is doing something kind of similar, a different name, but we'll be happy. I would be very happy to to get to know all these different uh implementations. But as a summary, we need to provide as many people as possible with self-custody uh powers and make it as cheap as possible. So not always the centralization is the is the is the answer hi so I have a question if we want to start building an app chain uh what would you suggest um the first things to do uh if we want to start with an app chain I think that the the first the first thing that you need to do is go into into the Madara documentation installed is the question that I know and from there uh yeah try to to follow the the documentation the implementation and maybe then you can contact the Star Wars team or the Starnet Foundation team and ask them hey what if I want uh escape bridge uh sorry escape hatch because scape hatches actually what are requirement they they they they were asked by an app chain before like hey we need to provide we need to legally set say that we are providing self-custody so what the Star Wars team is doing is actually developing the scape hatch for for the public standards for them so you can ask these guys if you want to to create a escape hatch for your appchain so thank you thank you very much uh uh no question right okay thank you

Related talks