The road towards a truly decentralized messaging network
ETHCC 6 · July 2023 · 18:24
Pedro Gomes discusses WalletConnect’s effort to decentralize its messaging network in the project’s fifth year. The speaker describes the technical complexities and a partner-driven approach to that work.
Speakers
Topics
From ETHCC 6, hosted by Ethereum France.
Transcript
[Music] all right hello hello hello everyone uh thanks for coming uh we're gonna be talking about decentralized Network for wall connect and if you don't already know wallow connect connects your wallets and it supports more than 200 wallets it's an open protocol and we're in this long long mission to decentralize and today I'm going to share some progress on where are we going and where we've gone today so to start off like my name is Pedro Gomez I'm founder and CEO of wall connect and it's been a long journey with DCC so
I've actually attended FCC one but then I got the opportunity to talk at FCC 2019 about standards and how it influenced the mainstream adoption then I even had a guest appearance on starkware when they we did the wall connect starkware integration and then we presented about walconnect V2 in 2021 which was still in beta and then in walconnect in 2022 we actually launched wall connect V2 so what could I be talking more other than just walk and I go over and over again throughout all of these years what change in this time we had V1 and then we migrated the whole Community to V2 and now we have a much more scalable infrastructure so in this
new era for wall connect every wall that you have now has been upgraded to all All Connect 2.0 which means that we have a more scalable infrastructure that doesn't have outages whatsoever we even reduced the infrastructure costs by more than 60 percent and we have a more reliability so less than 0.1 percent of messages are not delivered and there's an all-around just improved ux you know because the web sockets work better like the infrastructure could work better but we also improved the clients on how they function the cryptography and the storage so all of these improvements are really nice but they're only nice if we can actually maintain the ethos or wall
connect which is to be decentralized in our mission with walconnect we launched last year V2 this year we migrated next year will be federating and fed rating is essentially a stepping stone into full decentralization where we can have multiple operators in the wall connect Network without having full decentralization in a permission Network to decentralize from wall connect the company you know where essentially the evangelists of this protocol and we want to bootstrap the first Network effects but the end goal is that we Fade Into in existence so in this protocol what we're essentially building is a messaging
Network for those that might not know the magic that happens behind the wall connect protocol is essentially end-to-end encrypted messaging and this comes in two components where your clients in your wallets are able to exchange keys with adapt to do a default Helmet Key exchange and then do end-to-end encrypted messaging but then you have to have like an actual Network that's always available and can actually relate these messages in real time the requirements are much much higher than what you would usually expect from a blockchain where if a blockchain does 12 seconds like ethereum that's pretty good and if it's a roll-up that's even lower than that and maybe even the fastest roll-up does one second in our scenario
we have to hit like 200 300 milliseconds we consider 500 milliseconds to be the worst case scenario and that's really hard to do when you want to maintain the decentralization where you want to get give optionality of different node operators but still maintain availability and make sure that it's everything is censorship resistant so in this challenge we kind of broke down the problem into smaller chunks we're not going to decentralize completely in one go it's not something that happens overnight and we want to make sure that we have all of those properties and then one day we can achieve the full vision of a fully decentralized permissionless and verifiable network that still maintains the same high reliability and low
latency that we experience today so as everyone knows it's not easy and there's some trade-offs obviously and the challenge is as I said the low latency so but the low latency could be easy if there wasn't millions of requests like in a single day there might be billions of requests because we have seen just in the last week more than 500k active users but those 500k active users connected their wallets almost 2 million times in that week and for each given connection there's billions of messages going on and he forward those messages you have to have a very low latency and of course it must be cheap like imagine
you're going to connect your wallet and costs one dollar to connect and you haven't even done anything so it has to be cheap to operate but it also has to be incentivized to be highly performant so with this added complexity to make it permissionless uh we essentially have to allow anyone to run the network without actually compromising on the permission on the Federation performance so the original design is that we're doing something that hasn't been done before because in other peer-to-peer networks the compromise was you can have a fully decentralized network but you compromise on latency in 2021 we announced wall connect V2 beta and it was using waku
but then waku was really great in terms of censorship resistance but then it compromised on latency and we were seeing up to two seconds just popping out the approval screen where you connect your wallet so you want to do something that is Battle tested by essentially scaling our operation and at the same time decentralize different components along the way so our approach is the following we currently this is what everyone saw in V1 yeah the bridge and client one and two connected to the same Bridge so there wasn't actually multiple Bridges there was just a single bridge and we run this bridge and this is how we
actually were able to shut down V1 V1 was not decentralized it gave you the optionality to actually self-host but you couldn't actually have two parties sharing a bridge you had to have the same bridge for everyone so in V2 what we did is we broke down the bridge into multiple relayers and that's how we kind of rename this uh and we basically used this with a shared database but the share database still has high coordination because while you can have multiple people reading it you could only have a single person writing it and this is the biggest problems that we had today but you still have the same performance as V1 but you have the centralization of
who can write and that's the part where the decentralization comes uh really important so the next step which is what we're going to do next year is we're already doing this internally but we want to have third parties our partners actually run relays and the only way we can do this is by having a curated list of who can run a relay so that's how we actually make a federation and they would use peer-to-peer network but they would be a very selected list of who can actually run it so you com you still maintain the latency because not everyone can join the network at the beginning but the end goal is to go fully permissionless and that's when you actually have like this very complicated
system and something that was so simple in the V1 with a single Bridge server became so complicated because now you actually have to have a relays talking directly but not relying on a shared registry so they now have the blockchain as their source of Truth and then they would need to stake to actually participate but then if the client doesn't have gas they would need to have a payer and the payer would be able to essentially act as a watcher If there really has done their work so this is the approach that we're taking so far it doesn't mean that it's not going to change but so far we have validated a lot of our concepts of how you can have a message routed between client one to
client two without the client one or client to interacting with the blockchain by having two parties the relayer and the payer and the payer make sure that can have proofs to validate that the relayer has actually done the correct transaction actually the biggest question to this day is actually the blockchain part you know this could be a sidechain this could be a roller this could just do like something like State proofs on like the beacon chain directly this is still pretty much the biggest unknown question the actual peer-to-peer Network and how you actually validate message delivery is the most worked part we still have to kind of connect the dots with the
blockchain and everything else and in the future you could see like Enterprise like actually sharing this network so you could have hobbyists run this network but it would be very high stakes like having below 300 milliseconds latency is really hard to maintain and it would require very high stakes so we will likely not have the ability to have uh something like only a thousand dollars in staking it would be very high stakes because you would be penalized a lot if you do not deliver messages but the good thing is that all of these participants would be able to share the same network and they would be highly incentivized to connect with each other so any traffic that would go for
example through infuro or Shopify or Google cloud or walk in a cloud would then interoperate with everyone else and we won't have the same problem of the silos in web 2. so having the blockchain coordination here to incentivize availability maintains the performance but it also makes sure that we are all contributing to the net positive of the same messaging Network and we don't end up with the scenario where some of them just realize they can just build their own wall connect and they don't participate in the welcome Network so our approach to going to permissionless we have three challenges uh the first one is the one that we tackled so far which is the consensus on proof of delivery so creating an
incentive layer where people can pause publish proofs when a message isn't delivered and they essentially validates uh signatures from the clients and that are countersigned by the relays and every time it does the route it almost feels very similar to how lightning network works where you have different routes but we incentivize to have the least hops as possible so there's only one to two hops and then the second challenge actually when something bad happens how can we have what we call like snitch notes or watch notes that essentially observe the network but do not participate in the actual message delivery so at any point in time they can actually create a proof that will slash the other corners and then
challenge trees when the token actually gets involved so this is the we're tackling each challenge as a different Milestone so that we can then have the full permissionless nature of the wall connect Network what we've done so far is um it was already kind of hard to put it in a multi-region so going from July to October 2022 what we've done is before if you were like base I don't know in Argentina or Australia you were super far off from our servers in Germany so the latency was really bad so having a shared database across different regions essentially creating an edge Network for wall connect reduce the latency down to
300 milliseconds so you have like multiple relays actually reading from the same database but only the European database could actually write to the messages and now we're going into October 2023 where we're gonna start rolling out an internal version of having the permission Network so it's still our own servers only wallet connect Cloud will operate these servers but we'll use not the shared database approach but with the permission registry approach and then in April 2024 we actually allow our partners to participate and we have the full Federation happen in April 2024. from 2024 to 2025 there's a big gap here there's no month in there on purpose
because we don't actually know if that's January or December you know so going from a federation into a fully decentralized will require a lot of coordination into how you actually do token distribution how do you actually involve like the staking how do you what are the slashing conditions what are the ideal number of nodes that we try to optimize for so we are very confident until April 2024 with the Federation it will be a massive improvement over what we have today but 2025 is still a big question about how do we make it decentralized but that's not all you know this was kind of exhausting you know it's like very technical and it's like well connect is just like protocol protocol
protocol but like we have a massive team like we have a lot of talent Engineers we build wallet connect sdks in JavaScript in Swift kotlin flutter Unity we basically built for every platform out there for both wallets and dapps and that means we can actually offer a very uh great experience for developers in different areas and we have a really great product suit which we call web2 wallet web2 model webtoonbox this is the product suit that allows today for you to build the best experience for web3 and it tackles different problems for different platforms all of these sdks will be available for iOS Android web react
native flutter and unity and let's start with the web 3 wallet so web3 wallet is our I guess you could all our partner SDK are more than 200 wallets use this SDK to provide a really great experience for connecting wallets to dapps and enables the experience that you're all familiar with but it also includes a brand new experience where you can have a one-click login so if you're familiar with sign in with ethereum you have to connect your wallet and then it asks you to sign a message we've reduced this to a single step where you don't have to connect your wallet and you sign the message right away another thing that we did add was a brand new security feature you can see there where you have Wall connect.com
now you can actually have a verified badge where we can guarantee the legitimacy of the website that you're connecting to it's very different when you connect with the browser extension because it's embedded into the browser so you have strong guarantees of the website that you're connecting to but while connect is a secure remote connection but the security part does not provide authenticity so we have a new feature called the verify API which allows you to actually do a DNS verification of your project and if someone tries to actually impersonate your project it will be targeted and the wallets will actually be able to flag it so for example you have the Walla connect website and then on the other
side someone is trying to impersonate the work at a website with example.com and you can have this domain is not verified check if it's legit you know so that way users have a better way to inform themselves about when connecting so that was for wallets and for model we have this connect wallet experience that goes beyond just wall connect so you can connect with metamask coinbase truss and other wallets but the most exciting feature that we're gonna launch this summer is actually the email and social login so embedded into the web3 model you will be able to have users who don't even have a wallet to actually log in with an email and create a wallet immediately for us this is what we call a pre-wallet experience where we will
incentivize users to move into a wallet but at least they won't leave your dab if they have this option before they actually decide to download the water and finally we are expanding into communication because wall connect is a messaging Network you can actually communicate by having two main features with web3 inbox you can add customer support into your dab where you can actually chat with chat Bots that will help you during your dap experience but most importantly you can have dap notifications directly into the wallet this means that the user doesn't have to create this anxiety where they constantly visiting your dab just to check the prices or their liquidity positions or the latest governance proposal and they can get a notified and
no very critical moments when they actually need to visit your Dad so web3 inbox SDK is still in development so we will launch a webg inbox app where you will be able to experience this before wallets actually integrate this directly into their apps so in web3inbox.com you will be able to have both dap notifications and customer support chat built in into this website where you can connect your wallet so that's it covered our journey to decentralization and also showed our product soon and I'm really excited to see where walconnect goes next year at fcc7 thank you [Applause] [Music]