Aug. 11, 2022

Pedro Gomes: WalletConnect v2, account abstraction, and building a communications protocol

Pedro Gomes is the cofounder of WalletConnect, a communications protocol that enables wallets and apps to securely connect and interact.


Pedro Gomes is the cofounder of WalletConnect, a communications protocol that enables wallets and apps to securely connect and interact.

In this conversation, We talked about WalletConnect v2 and its architecture, account abstraction, potential downstream effects of a crypto-native chat protocol, and other topics.

Timestamps:
0:00 intro
8:00 developing the user experience before creating the product
10:23 account abstraction and the spectrum of security and convenience
20:39 WalletConnect APIs and “Log in with Ethereum”
28:55 how WalletConnect works
37:45 light clients and generalized messaging protocols
45:36 the politics of making big changes to the Ethereum protocol
50:14 connecting wallets with WalletConnect Chat

Mentioned in the show:

EIP2938 (account abstraction) - https://eips.ethereum.org/EIPS/eip-2938

WalletConnect APIs - https://docs.walletconnect.com/2.0

Transcript

[00:00:00] Sina: Hey everyone. Welcome to another episode of Into the Bytecode. Today. I sat down with Pedro Gomes, the co-founder and CEO of Walletconnect, the open source protocol that connects wallets and applications.

So in this conversation, we talked about a bunch of interesting topics. We talked about wallet, connect V2, and how the wallet connect protocol is architected under the hood. We talked about Ethereum's public key infrastructure and why it could be one of its most meaningful contributions to the larger world, independent of what people are doing on chain.

And lastly, we also talked about account abstraction and why Pedro believes it might be the most critical bottleneck towards the larger scale adoption of crypto.

There were some super interesting ideas here. I'm still personally thinking through the ramifications and I think they could also be a source of inspiration for other builders in this space. And so with that, I'll leave you to it.

[00:01:22] Pedro: We incorporated the company in April, 2021. So this is like a one year and three months old company. And now we just hired our 23rd person. So we're now 23 already looking at 24 by the end of the month. And likely gonna be almost 30 by the end of the year. No.

[00:01:47] Sina: Wild. So all leading up to 2021, it was just kind of an unincorporated open source project on GitHub that you were working on.

[00:01:58] Pedro: Yes. So I started working on it. So I was at balance there, it was the wallet and we were building like the balance portfolio and the balance wallet. And essentially it was just really annoying that we had like these two products that couldn't talk to each other. So it was just really a self-serving initiative at first of like, how can we connect two products that we own other than using meta mask and what connect kind of solve that problem for us.

And then I applied to the Ethereum foundation grant to make it as a, like a. Open source thing. That's like its shared protocol and everything. And that's when I spin off of balance. So I was working at balance full-time then I dedicated myself full-time to Wal connect. That was in 2018. And after that, I basically just got to knowum very differently because it's very different when you're building a wallet and it's very different when you're building an open source project, you just become as almost like this piece of Ethereum that everyone uses.

And it just kind of have to kind of walk into different projects. And I got to learn a lot at that stage.

[00:03:11] Sina: Seems like, seems like quite a beautiful way to engage with the larger ecosystem. Like not in a way that most people get to do it, cuz you're, you're really like there's, there's nothing in this for me. I'm just trying to help the ecosystem and be collaborative and positive. Some.

[00:03:27] Pedro: I, I think I, I benefited from it so much because I got to learn things that I wouldn't be able to learn if I was a dab or a wallet. Because I remember if you were, were a wallet, other wallets don't want to talk to you because you are a competitor, but you would still have a good relationship with dApps.

But then even from D sites, there was always like this understanding of like, how can we get more users from a specific wallet? I like to see it almost as. You have users, but I have reasons for users to use Ethereum and that's essentially what this two-sided market looks like is Dapps give users reasons to use Ethereum and while it's enable users to use ter.

So they both have like power or leverage in this economy. And this relationship is what made wallet connect really interesting, because then I had to kind of bridge these relationships, finding overlap between gaps that wanted users and wallets that wanted more interactions for users to actually engage on Ethereum. yeah. I, I totally agree. you've been working on wallet connect 2.0, I'm, I'm curious if you could kind of sketch out how, like, when you started thinking about this, what, what the motivation behind the V2 has.

I mean, when you work on something like wall connect, you're talking to thousands of projects every day and you hear feedback from left and right. Obviously you start like, Digesting a wishlist that everyone has. And while connect 2.0, almost started with just that. It's just the idea that there's a lot that needs to be changed, but there's also a moving train that you can't stop and you have to basically make a smooth transition into like a much better, faster, and more comfortable trained to ride on without actually stopping them momentum.

And I've been like working on wall connect 2.0 since 2020. That's when I met my co-founder Sebastian, that we started working on it. So I was working solo until then. And then 2020, we got some grants and we started working on it. The first things that we addressed was basically performance and reliability.

Sure. I'm very happy with how well a connect version one turned out, but once you actually hit a certain scale that we have now, like having 0.6% missed messages, doesn't seem a lot. But when you have like 15 to 20 K messages per second, that's actually a lot of messages getting lost. So we fixing addressing those was the first thing, like message delivery was introduced.

So we basically guaranteed that messages are sent and received.

[00:06:23] Sina: maybe, maybe, just take taking a step back. Can you also give like a, a description of what wallet connect is for people who might not be as familiar with.

[00:06:33] Pedro: For sure. So wallet connect like I said, in the beginning connects wallets to an application and that's how it started solving the problem between at my previous job to connect a wallet to the main app. And there was no solution out there because it was just considered that the, the standard was everyone is gonna download the Chrome extension on the desktop browser and just call it the wallets.

And I just didn't think that was the way things were gonna go. I think. Five years ago and today, like it's obvious that like mobile first is not just something that you say it as a buzzword for corporate, but it's actually a reality. Like most people nowadays use their phone without even using a desktop and some of them don't even own it.

So if we make this experience of ITER to be desktop focused, then we're basically siloing like the majority of the world from using it. So Wal connect added the ability that you could connect a mobile wallet to your desktop and then eventually became a mobile wallet to your mobile browser. So within your mobile phone, you could open anything on your safari or Chrome and just visit dium and then connect your wallet.

And it wouldn't be actually exclusive to any wallet and it would actually be supported by hundreds of wallets like it is today.

[00:07:59] Sina: Yeah, it's quite a magical experience. The first time you try it, like you almost like it's like, whoa, what just happened? Like how did my phone connect to the staff? And then you can sign messages and whatnot. It's really cool.

[00:08:12] Pedro: Yeah. I, I think that the reason for that is because I tried to develop the experience first. I just kind of like wrote down on paper, what I would like to see it happen from the user's perspective. And then I kinda just reversed engineer of how we would actually work at the technical level. And I think that's something that I try to convey to the wall connect team a lot is that like you don't develop the technology and then you develop the experience, you do the experience first, and then you just work really hard for the technology to match it and take any, any efforts possible to make the user comfortable.

It's all about the user experience. That's what wall connect strives for. And the interoperability is technically part of the user experience. I think that sometimes we advertise interoperability in the centralization as something as ethical and almost political, but it's honestly a user experience feature because if it works anywhere and everywhere, then anyone will be more than happy to use that technology.

[00:09:20] Sina: Whereas if, if it's not there, you'd, you'd feel you'd have to jump through a bunch of other hoops to be able to use an application

[00:09:30] Pedro: I think we can actually draw some parallel.

Like, if you think about loyalty cards where you go to a shop and it says, oh, you could have a discount. If you have loyalty card, a and then you go to another shop, oh, you could also have this one. If you had loyalty card B and you just think, why can't I use loyalty card a and you just use that, you know, I think that's how wallet kind of looks like.

It's like, if you go to different applications on Ethereum, they shouldn't have like different wallets. Like they just should work with whatever wallet I just happen to choose. And we almost end up building this team of ambassadors, which is different wallets, bringing more people to Ethereum for different reasons, with different experiences, but they all end up enjoying the same ecosystem that we built.

[00:10:23] Sina: yeah, yeah. It's, it's really cool that this was built. And I know that there's like a path dependence to how these things develop and the fact that wall connect existed from these early days is definitely a very positive thing. For the ecosystem. It also makes me think to, you know, the fact that some wallets and applications can't interoperate because of this whole like account abstraction thing.

And the fact that a lot of applications expect signatures to look a certain way. And that like really sucks. Like I would've been using a smart contract wallet all day, every day, but I can't because most applications on L one don't don't understand them.

[00:11:05] Pedro: I think that I, I have tweeted quite a lot about this. And I dunno if you just did your research really well, but like the account abstraction. I dunno why it's being overlooked so much because we could be literally unlocking at billing users right away. If it was implemented on the interior protocol just.

At the op code level, it, it should just be part of what it means to use Ethereum rather than having these whole companies developing smart contract wallets and trying to hack away like a good user experience for something that should be just solved by Ethereum itself. And I, it's probably the biggest blocker to mainstream adoption and I, I love the merge.

I think it's highly necessary, but like as soon as we get done with the merge, I hope that

[00:12:01] Sina: This is the highest priority.

[00:12:02] Pedro: the account of abstraction.

[00:12:04] Sina: Yeah. And the reason why this matters, like how do you, why is this important? Like, I guess partially like one of the reasons why I think it's a major blocker to mainstream adoption, is that in the absence of account abstraction, you basically users have to make this choice and either have to, like, in terms of how they're custody, Inc their, like their keys and their crypto, and either they have to trust some custodian that will give them an easy to use, like.

User experience and they don't have to deal with keys. Like, and that's, I mean, that's like 98% of the population. Like even some days, I'm like, how, how the hell am I like using these like hardware wallets? And like, how's this all secure. This is like insane at some level or the user has to basically go in that direction and be like, yeah, I'm gonna like store a mnemonic, like engrave it on metal and put it in a bank vault account abstraction, like lets you build lets you be more, much more flexible about how these keys, how, how a key maps to the idea of an account and allow them to be swapped in and out allow like third parties to hold, like, you know, keys that can, that can act on your behalf and whatnot.

So that's like one where my mind goes of like why this is so critical is because like managing keys is. Really difficult for the average person in the.

[00:13:40] Pedro: I mean, the easiest way to describe this is that any protocol developer will also try to find where to draw the line. Right? Ethereum is not gonna cure rare diseases, right? That's a line that we draw, obviously, like, what is Ethereum? Where does the line stop? Where Ethereum has significant power.

And we know that it's. Provide security over transactions. We know it's gonna provide security over a block history, but what if it actually provided security over key management? Right? This is something that in the initial design was kind of ruled out. And we just assume that either people are gonna know how to manage a seat phrase, or they're just gonna rely on a custodian.

And that was kind of something that if you just don't give a platform to actually have better private key management, people are just gonna use the most convenient one rather than the hard one. And I think that's something that pro the protocol, the protocol should actually take ownership and actually control and say, wait a minute, we could actually have a diversity of private key management solutions going from the hardware, hardware, wallet to the custodian, but a bunch of intermediary solutions, which we call account abstraction that allowed you to actually make it easier to.

Be both secure, but also have convenience. It doesn't have to be one or the other. You could actually have a spectrum of security and convenience and not just have to go like zero 100.

[00:15:19] Sina: Yeah. Yeah, it's, it's interesting kind of flipping this on its head. Like the way you described it makes me think that we could even think of the public key, the, the public key infrastructure as like, almost like a public good in the world. And Ethereum can facilitate the world's population having and managing keys in a secure way.

Like this could actually be a, this is like a very, this would be a huge deal. If, if blockchains facilitated this, it would be, it's like on par with it's like a prerequisite for all this other stuff that we're trying to do, but even independent of all the payments and the NFTs and all this other stuff, like it would be a very, very valuable thing for the world if each person had like keys.

Yeah,

[00:16:10] Pedro: In most distributed systems like need private key management in some form, instead of them reinventing the wheel, they could just leverage the existing account abstraction on Ethereum. And actually, basically Ethereum, wouldn't just be a safe place for transactions of high value. It would actually be a safe place for key management for completely non-financial use cases.

Like you would literally just decide a bunch of keys that are held by a community by using a multisig on Eter. Rather than you just developing your own solution because you don't have an option. And with account abstraction, we're basically building that platform. It's Ethereum is essentially not just settlement, but it's also private key management.

[00:17:04] Sina: Yeah. And in the absence of a protocol layer thing, each application like each, you know, non crypto application that relies on private keys needs to kind of roll out their own system. Similar to how, you know, we were talking about apps, building wallets in inside the browser. Like if, if, I don't know if like you could sign a DocuSign document without, you know, like where, where are my keys?

Like, how's that even working , you know, or even credit cards at some level, like why is there a three digit thing on the back that secures you know, this massive balance, like this is all crazy. And this is all downstream of people not having keys, basically.

[00:17:49] Pedro: Exactly. And I think we at least should be grateful that the cryptocurrency created this craze, that now we have more private keys in the hands of people that we ever had in the past. Like if you go back to even Bitcoin, nobody actually managed private keys. So if you see any history of private key management solutions, the closest thing that we've gotten was PGP.

And it was a complete failure, you know, like this is like what we consider anything non cryptocurrency related that actually got to some scale.

[00:18:27] Sina: Yeah. Why was PGP a failure?

[00:18:31] Pedro: Well, because PGP relied on the fact that you actually had to exchange public keys in some form. And in order to do that, it was extremely inconvenient because a, you either had to in person like exchange them and verify them which nobody's gonna do, or you just go the full centralized custodian way.

And you just have this ledger of public keys and say for Pedro, you have this public key, and then you ended up. What are you doing? It just kind of loses the whole purpose, like the idea of like PGP key servers. So, you know, it, it, it's essentially the same problem with like Ethereum not having accounts abstraction.

You either do it the hardcore way, where you have to be really diligent about how you manage your keys, or you have the super convenient way, which is so centralized. And so custodial that then you kind of lose the purpose of actually having private keys

[00:19:31] Sina: Yeah. Yeah. And I guess the PGP analog would and how it works in the crypto world is that the blockchains. State and like the, the accounts that exist and like ENS as a like narrower, you know, registry like SIM in a similar way. Those are those that's like basically where you can look to figure out what someone's key is to encrypt a message for them.

[00:19:57] Pedro: The biggest problem is that then PGP didn't have any form of consensus. So as a registry of keys in one place didn't mean it matched the other place. So what meant that Pedro's key was on a, was different than B. So then you didn't even know if which key was the right one. So that's what blockchains actually solved.

So you see there's plenty of opportunity for Ethereum as probably the most widely used blockchain or distributed technology on Earth to actually build at the protocol level, private key management that could impact like society.

[00:20:40] Sina: Well, maybe to tie this into wallet, connect one of the like wallet connect 2.0, which will, I guess we'll jump around a bit. But one of the APIs that you have is this a endpoint, right? Which basically allows a user allows like a wallet and an application to do this handshake of basically I hold this key and I can sign messages with it, which means that it can be used for all these sorts of applications.

[00:21:09] Pedro: Exactly. So I think one of the biggest changes with wallet connect version two is almost this modular approach where we essentially build so many infrastructure and tooling to connect to wallet remotely and sign transactions. And then we realize that there's so much more potential there and we built four APIs.

So sign where you can actually sign transaction remotely that you had in V1, but then three new. Which is the chat API, where you can actually send in encrypted messages between users the off API, where you can actually have a one click login into any website or application, and then the push API that it would allow you to send portion notifications directly to your wallet based on your accounts on the blockchain, but the OFPI that you were mentioning.

I think it's gonna be quite a huge one because we already seen use cases where wall connect was being used by traditional tech tech, or Silicon valley companies like meta or. Twitter. And even discord had an announcement in Stripe. They all used wallet connect with the primary purpose of verifying wallet ownership.

And we ended up seeing this use case that was so apparent that people just wanted to authenticate themselves with their wallet. So why not build a dedicated API that has some limitations, but it specialize itself. And probably what is probably gonna be the most used one, which is logging in with your wallet.

[00:22:45] Sina: Yeah. I know this is an idea that Vitalic also, again, talked about for some time of this idea of like login with Ethereum which is this, this like awesome thing that we have in the crypto space, where you can literally log into any of the websites with the same account. You don't have to make different accounts.

And it's analog in the web two world is logging in with Gmail or with Facebook. So this is like providing. Another option in that list of login with your Ethereum account. And if someone clicks on that, then, you know, wallet connect would be one of the, one of the options there, which is like, we don't actually care, which like where your Ethereum identity or your, you know, crypto identity is like stored where these keys are.

You can, you can rely on the same, like network of wallet, connect integrations to basically just connect it to whatever wallet you use, which is a super cool idea.

[00:23:43] Pedro: Yeah, I, I think it will make a lot of sense because it, it essentially builds this bridge. Not, not so much a technological bridge, but like a, a social bridge where we start actually understanding that cryptocurrency and this whole, like a system actually lives beyond the tra the trading and the finance, and even the NFTs.

And the Dows like all of the speculation has created so much prejudice sometimes against web three. And with the login with atrium, we essentially bridging the two worlds where the people who are not, so fans of crypto can actually start getting accustomed to the fact that actually you could take advantage of this from a user experience perspective where you just make your life.

[00:24:33] Sina: Yeah. Have you seen early applications that use this paradigm that, that you think are interesting?

[00:24:43] Pedro: Well, I think that for starters, so what we're seeing is a very simple implementation of just. Signing a message. A verifying ownership of an account gives you some benefits because you can now associate centralized accounts like on Facebook, Instagram, and Twitter, with some activity that you've done on the blockchain.

But I think what it's gonna start looking more interesting is when they're actually used as the primary way of actually authenticating themselves into these applications in the past, you could just generate new email accounts, but what if you could actually just generate a new wallet account? It's not just a more ephemeral or easier way of generating accounts, but it's also an easier way of managing accounts because you no longer have to remember your password to your email, to recover your account.

You only thing you need is to manage your.

[00:25:40] Sina: Hm. So the idea would be that I wanna log into this new, like web two service. I don't know this new like event ticketing platform that I've never used before. And I could either link my existing, like ENS name my wallet with my ENS address in it. Or I could like go on my wallets, like go on rainbow or whatever, and like create a new address, link it to them right away.

And then just start using that and know that I can later go back in my wallet and look at all the permissions I've given out. It's like where I'm off, like all these sorts of things.

[00:26:17] Pedro: Yeah. I think that we have kind of been building our phones to be almost these passports or personal devices that control our lives, but we can even take a step further and they could actually even. Control the permissions remotely to everything that we've interacted. So we could keep a very close relationship with any interaction that we built with the product or service and manage it from your phone.

Because right now email has kind of built this and I think we can even take a much closer control with wallets because they actually embedded cryptography into this. So it will be cryptographically secure that these relationships are under your control because you hold a private keys rather than you own an email account on some centralized company.

[00:27:17] Sina: Yeah. And like, if you in like putting ourselves into this new world, let's say we're using our phones. While it's on them to log into everything. There really are digital like passports. What happens if I lose my phone then I guess, I guess like it relies on this idea of account abstraction, hopefully by that point where you have some other key that's in a much more secure place and you can go and use that thing to move the Mo like take over, take control of the wallet.

[00:27:56] Pedro: Yeah. So Wal connect is trying to improve the wallet experience. As a wallet, right? So as a piece of software or application that you download on your phone and makes your life easier, but these wallets are still designed in the same way that the blockchains actually enable them to work. So without the account abstraction, there's only a few things the wallet can improve because at the end of the day, the private key management solutions right now are basically seed phrases, smart, Contra wallets, or custodians.

We really have only three mechanisms today to actually build wallets. And with account abstraction, we can improve this dramatically because we can have a bigger diversity where you can actually tweak between convenience and security at a more granular level, rather than being all or nothing.

[00:28:52] Sina: Yeah. So maybe going back to this wallet connect story. So you were saying message like reliability and whatnot was getting hard and then yeah.

[00:29:07] Pedro: I think that few people understand that like under, under the hood wallet connect is essentially a messaging network. And basically we just ended up building what it looks like as a dedicated WhatsApp or signal for wallets. And we, it, what we did was we created an end to end encrypted chat where the only parties that talked in that chat was an application and a wallet.

And in that conversation, they talked about, Hey, I'm this application, I wanna talk to your wallet and the wallet say, Hey, I'm this wallet I have these accounts. And then the conversation just goes on as you have this interaction between the application and the wallet. So it, this was very interesting when I developed in the first time, because essentially what I was dev the building was to be used on top of whisper, which was the messaging network that Ethereum was working on.

But then as whisper didn't get worked as much as I wish it was. I ended up building what I called, like almost as an emulator, which was a centralized service that looked like whisper, but it wasn't whisper and it just behaved in the same way. And I'm glad I did that because four years later, whisper project got completely shut down and status then built a similar project called Waco.

But as we. As we increased our requirements as a company, we realized that like all of these millions of connections require a degree of performance, reliability that not even whisper or Waco could actually offer. So we ended up building our own solution which we call Walla connect network today. It's only centralized controlled by us.

We have essentially an internal network and the goal in the future is actually to federate it with other node operators. And we're trying to do this rollout very smoothly over the next three years, so that we ensure that we don't compromise on the use your experience. We wanna make sure that we have distributed ourselves as a service, but still maintaining that good experience that people have kind of relied on as a seamless experience to connect your.

[00:31:25] Sina: Yeah. Interesting. So you're, you're not using Waku anymore. You've built something new.

[00:31:31] Pedro: Yes. So we built almost as a, if you, if you're familiar with matrix matrixes, this decentralized slash federated chat system, that it does some things really nicely, but then Waku does other things that does it very nicely. And we basically just had a baby created between matrix and Waco. We just have like this intermediate where it just sits really nicely in between the two, but it, it does not.

Become compatible with either we, we just call it wall connect network. Now I think, I think it deserves its own name, honestly. Because I think wall connect has a end user facing product makes a lot of sense, but this network could in the future be used for other purposes and not just wall connect.

[00:32:25] Sina: Yeah. Can you maybe. Just because it's interesting to understand the system a bit more, just sketch out like the, the 80 20 of how the network works. Like what is the architecture of it? What are, what are like the, the highest order bits of how it works?

[00:32:44] Pedro: the fir the first thing that we we developed is the idea that there's no such thing as full node operators on the mobile phone. And this whole system had to basically be built as light clients by design. It's something that like blockchain. Blockchain designers usually don't take into consideration as a priority because they obviously are securing millions of dollars and billions of dollars in transactions when they're building smart contract blockchains.

But for a messaging network, building light car light clients was the priority. But we also wanted to make sure that these light clients were not, how do I say this? They removed the liability of depending on the full node operators as much. So this is something that I, I believe that the matrix the matrix system is solving, but they haven't solved yet, which is.

You as a light client have delegated your power to one of the full node operators, but then if you change full node operator, you basically wiped out your whole experience and you have to start from scratch. And this causes a liability in the light clients, because that means that if a full node operator becomes malicious, yes, the switching costs are so high that you basically are at the hands of the full node operator.

So with the wall connect network, we make the switching costs between light clients, between full node operators, as smooth as possible. Because then that actually puts a liability in the full node operators to actually create the best experience possible because then the light clients would just choose to switch.

Right? So there's an incentive there for you to provide the best service possible. Otherwise, all the light clients would switch to another Nel operator with like, as easy as that. So that's the

[00:34:38] Sina: I guess the, the, the it's, it's, it's a simpler problem than building a blockchain network is because each, each end each end user or account only cares about the slice of the states that has to do with their own, with their own sessions. Right.

[00:34:57] Pedro: you could almost think of it as like, as a charted block.

[00:35:00] Sina: Right.

And each user is on its own chart, basically.

[00:35:04] Pedro: Exactly. Like we call it mailboxes because it was just an easier term so each, each light client has its own mailbox. So for each mailbox, you only care about your mailbox. It's not like you're keeping state for other light client's mailboxes. So the full node operator then only cares about the mailboxes of its own light clients.

It doesn't care about the light clients on other full node operators. So that kind of like charters, the state that like full node operators are also not keeping the state of like mailboxes of users that they do not know. It kind of almost replicates what IPFS does with pinning services. So where you could consider like full note operators, basically pinning mailboxes of their peers.

You.

[00:35:55] Sina: Yeah. And then how does this, are you using the same network for the chat API or is that like, cuz that's a case where users do care about other people or is that like happening on some other data storage layer? And this is like the, the kind of, I don't know, the, the registry and the permissioning layer of it is happening on, on the, on the network.

[00:36:18] Pedro: So, this is an interesting question because we actually described this as very different problems, right? Because a mailbox in the context of the wall connect network is actually described as undelivered messages and delivered messages are considered to be the responsibility of the light. So a light client would then have the responsibility to choose its own backup solution or even provider for the already delivered messages.

And the wall connect network would only be responsible to deliver any messages while the party was offline.

[00:36:59] Sina: Got it.

[00:37:00] Pedro: So, yes, so wall connect, sign off chat and push. The four APIs are built on top of the same wall connect network. So they have very strong assumptions about how E femoral these mailboxes exist. You could see these messages being cashed from a couple of hours to a full week, but they're not expected to kind of retrieve a full history of messages that happen within the last six months.

[00:37:28] Sina: Yeah. It's like, it's a stateless protocol, similar to how HTTP is stateless. It doesn't know like anything about the past.

[00:37:36] Pedro: it's like a stateless protocol with some caching mechanisms that have limitations.

[00:37:42] Sina: Got it. Got it. Okay. So a big part of the design is this idea of light clients and being able to switch between full nodes with relative ease.

[00:37:53] Pedro: Yes. So basically light clients would register to a full node and the full node would be responsible for sending and receiving messages on their behalf. And then the other interesting part is about how the full node operators actually exchange messages. There is a very common thing in distributor systems, which is gossip as a mechanism.

So Waco and whisper, both use gossip by default. And that's very useful when you wanna reach consensus over large set of operators. But then in the case of wall connect network, every conversation usually has to. Maybe three participants, but never more than that. So having gossip actually becomes disadvantages because it only becomes interesting to use gossip if you had like 10 plus participants listening to the same messages.

So what we did instead was gossip would then be used to understand how messages are gonna be routed, but then you actually route the messages on a single hop from sender to recipient node operators.

[00:39:07] Sina: Interesting. So you're figuring out like, what, what, like the IP address of, of like a receiver is through these like multiple handshakes potentially with like servers in the middle holding like incomplete registry. So they might give you the answer more quickly, but then the actual messages are just happening one to one between these servers.

[00:39:30] Pedro: Exactly. That's exactly right. Is essentially the full node operators maintain almost what it looks like as a a DNS

for the

[00:39:42] Pedro: messages. And they just reach consensus over this DNS or distributed hash table. And then they essentially read the distributed hash table and they route the message directly to the recipient rather than gossiping the message across all notes.

[00:40:01] Sina: Wow crazy. it's a whole new protocol.

[00:40:07] Pedro: yes. Yes, it is. I, and I think that. There is definitely a lot of space for other protocols when it comes to messaging. Because when we looked at Waku Waku was a generalized messaging protocol and it definitely fills that bill, like it's a general purpose messaging network. While in Wal connect, we had a very specific user experience that we wanted to achieve.

And in order to achieve that, we had to take some compromises. Like this is not a good system for 10 people to listen to the same messages, right. It's just not designed for that. But if you have a single sender in a single recipient, then this design becomes way more performant and reliable for that.

You're not gonna wait almost up to a second for a message. It's gonna look like milliseconds because you have direct routes being agreed upon by the network. So when a sender life client sends to the its node, it will route directly to the recipient's node. So the message would not take longer than 300 to 5,500 milliseconds.

[00:41:18] Sina: Hmm. Do you see other other types of use cases that might benefit from the same network? I guess where my mind goes is they're, they're kind of out of style nowadays, but like stay channels feels like something that has a similar type model

[00:41:39] Pedro: we could, we could see either state channels or any other one to one protocols taking advantage of the wall connect network. That's why we co completely decouple the wall connect network with the wall connect KPIs so that they could be used for other purposes. Another purpose that was actually proposed by one of the wallets was actually to do syncing between wallets where. A user could actually own the same wallets on two devices or even on a mobile and a desktop, and would like to synchronize the state between the two. And this would be completely off shame, state, maybe something private, where they would like to keep some profiles and some contact list or an address book.

And they would like to have that synchronized across its devices, but they don't wanna use a centralized service like iCloud or something from Google. And they would actually use the network to broadcast these messages between devices. So they would actually synchronize between themselves that whenever you change a setting on your phone, it also changes on your.

[00:42:50] Sina: Yeah, okay. That makes sense. So it's this like stateless protocol, these full nodes are finding each other through this kind of DNS, like system finding each other's locations, sending messages, one on back and forth. and and once the message arrives there, there could be some caching and whatnot, but then it's, it's the responsibility of the user and other third parties they use to kind of maintain a history of what's happened.

[00:43:20] Pedro: Exactly. Yes. That's what we introduced last week on FCC.

[00:43:25] Sina: Yeah. How how's it been like building this thing? It feels like a different sort of an animal than the APIs or like the, the, what you've worked on in the past.

[00:43:38] Pedro: I mean, I, I almost feel like. We build something modular for the sake of composability, but it almost feels like they're just variations of the same thing, you know? What we build with the sign API for the last four years has been built on top of this idea of publish and subscribe server that we managed and then building a network that could essentially do that as a Federation rather than as a centralized server was a very small evolution.

I think the biggest concerns was we needed to make a lot of decisions about what's right and wrong. I think that's the biggest challenge that I faced is just sometimes it's not about the right answer. You just have to have one, you know, having one is better than having the perfect one and making sure that we are pragmatic is something that we value a lot.

It's better to have something that's 80% good today than 90%, like two years from now. And if we keep that kinda. Move fast and break things, kinda energy. Like we can deliver more valuable because if I knew how hard it would've been to build Walla connect, when I started, I probably wouldn't have started.

And it was because I was naive enough to even start that we have this very beautiful ecosystem and this amazing public good that allowed this experience that people enjoy today. And I think we need to be experimental and take shortcuts in some places just to fit the user experience. We need to enable people to use wallets more easily, and sometimes you need to build imperfect.

[00:45:35] Sina: Yeah. Yeah. I, I really resonate with that. It's something I've had to learn over the years as well, but various projects I've worked on, it's particularly interesting in the context of like designing protocols, cuz I feel like they have a lot of inertia to them once they're out there, especially if there's multiple stakeholders.

So it's like you have to balance being like thoughtful and trying to look around corners with shipping and just like moving forward at some level. It also makes me think of this whole account fraction thing again. Right. Which is, I think like Ethereum did a really good job with shipping something in the very beginning.

You know that the V two E two has been more. What is like, we know how hard it is to upgrade these systems. So let's try to like figure out, let's try to be build the best version of it possible. But the first version is like, literally just like, what are the different pieces? What is like the 80, 20 on all of 'em the best we can do.

And then it's crazy that like six, seven years later we have the same kind of like we're using the same infrastructure. So it it's really interesting in that way.

[00:46:49] Pedro: Yeah. I honestly also get impressed that the wall connect V1 is even being used today. I was, I was expecting it to be like a temporary solution and not like to have production traffic at this scale for four years in a row. Like, so it just shows how valuable it was for Ethereum to just start and not have to wait for it to be perfect, you know, but then they also should not forget.

Just because they started and they have all of these stakeholders that then shouldn't change it. I mean, and it all ends up being extremely political. I I've participated in a lot of EIP and even became an author of a few and you just really have to pull strings wherever you can. And this account abstraction is gonna look exactly like that.

If you look at the IP 1, 5 59 with the gas market changes that's something that we could easily say that would never would've happened, but then it just had the correct people involved. And that kind of just like took off dramatically. Had a lot of funding, had a lot of political support in multiple sides and account abstraction just needs to find that like safe drive politically.

[00:48:07] Sina: Yeah. Yeah. It's pretty wild. That E I P 1559 happened. It's like the biggest change. And honestly, if you think about it, it's another place where a Perle has decided that before we drew the line, that the Eter Perle did not decide on the gas, it was the community, it was kind of just organically decided. And then they realized there was just too easy to gamify it. So now the protocol took ownership as now, this is my responsibility to understand what price of the gas it should be.

[00:48:46] Pedro: And that's how it actually. Became easier to transact. And I think that's the same thing that's gonna be with account abstraction. The difference is that there's not so much economic gain from account abstraction, other than indirect economic gain. While with the IP 1 50 59 with burning the gas, there was a lot of political support because obviously that would reduce the issuance of Ethereum.

So therefore existing stakeholders were motivated to fund it to happen.

[00:49:17] Sina: Yeah. Yeah. It was like at the, at the, you know, user at the like edge, you know, the larger sphere of people who care about Ethereum, it did hook into the notion of like, we're gonna decrease the supply. You're all gonna make money. This is like good. And I wonder what the similar, I mean, for account attraction, like there is this like very intense burning pain point of like dealing with keys.

Like, I feel like this is something, everyone, everyone who uses Ethereum agrees that this sucks and like is so maybe that's. that's like the emotional hook to like really, to really go after.

[00:50:03] Pedro: well, yeah, I think emotional hooks can have an impact, but economical hooks have even more.

[00:50:11] Sina: Yeah. So maybe one more thing to talk about is the chat, the wallet connect chat, cuz that's also something you've talked about more recently. So yeah. What is, how do you think about that? Like why, why did you build chat?

[00:50:29] Pedro: The reason we built chat was because we were already doing chat. The only difference is that we essentially opened. Almost like this API on an existing infrastructure, where before we had a very specialized chat where you had the wallet and the app talking about a very specific conversation, which was exchanging accounts and signing transactions.

And then we realized if you have 150 wallets all connected to the same network, why are they not allowing their users to chat between each other? And that's essentially how the whole conversation came because

the biggest,

[00:51:12] Sina: that feels like a galaxy brain. Like, whoa. like everything shatters and you see a new reality.

[00:51:19] Pedro: I think, I think the biggest realization was realizing that. Big wallets, like even meta Musk and status and like rainbow and trust wallet, all of them wanted this, but nobody wanted to do the first step. And the reason they didn't wanna do the first step is because they didn't just want to become the same thing is every other web two project where everyone just has their proprietary chat solution that they now maintain.

And it's used only for their segment of users. And ideally they would like to see something just happen at an ecosystem level, something that was just assumed as a public good that we all share. And it's not the trust wallet chat or the meta mask chat or the rainbow chat or the, the status chat. It's something.

It's Ethereum chat. And we then realized that like, wait a minute. All of these stakeholders that we just listed very popular wallets are all using wallet connect. So why aren't they just chatting through the existing infrastructure that we already built? We put so much effort into routing messages for the purpose of signing transactions.

It takes zero effort to actually open up this API for end users to chat between each other. So we then shipped wall connect chat based on that

assumption.

[00:52:44] Sina: It's kind of interesting. It's one of these problems, these like product ideas that people almost joke about of like building a chat application to unite to, to act as an inbox for all the other chat applications. And I know that this isn't going to, this is gonna integrate with wallets rather than like telegram and this discord and whatnot, but like that world could also be down the corner, you know, they could all, I guess, similar to how Facebook United WhatsApp and Instagram and messenger chat under the hood.

This is like an open version of that.

[00:53:17] Pedro: well, the, that was also one of the realizations, right? Because if MEA could connect all of its products, because they all share the same infrastructure, why can't Wallace, who all share the wall, connect infrastructure, do the same thing. Like they are, they're all connected now to the world connect network.

They're just not using it. Maybe they're not even aware they could have used it. So we basically just enabled that as an API. Now it's up to them to actually introduce this as an experience to their users. And then eventually we will. Find it almost as a industry standard, that if you have a wallet, you have a chat, you know, it's just something that it needs to be unlocked.

And once it happens, it becomes just predominant. And we just assume as this is a wallet feature that we expect everyone to have.

[00:54:12] Sina: So I, I kind of mentioned this in our telegram, I, I actually worked on a messaging project, like in 2018, based on the same premise of like connect, like allowing wallets to like log in and then have their, have their handles, be their addresses and build this communication layer on top of like on chain behavior.

I'm curious, like what what do, what do you think the world will look like once chat is woven into woven into the fabric of this crypto ecosystem? Because it's, it's really something that doesn't exist today. Like people are hacking around it in various ways, but what does the world look like post this exist?

[00:54:59] Pedro: I think that we will not see as much private chat as we believe we're gonna see like, Two end users exchanging messages through wallet connect chat. Won't be as common as businesses and apps and services actually chatting to their users. I think that wallet connect chat will evolve to be a business slash support chat, and even potentially almost as a board chat feature.

The reason for this is because normally people either have already mechanisms to chat to their peers, whether that's telegram or WhatsApp or discord that have solved these problems, but businesses, products, and services usually are lacking on that area. And we've seen things like Intercom, which are. But Intercom is still very contextual over a single application.

And in this case, we actually have a much wider context of a whole blockchain. You don't just know that this user used Uniswap you know, that this user used Uniswap, OpenSeea and some new app that just came out and you have this whole understanding about who this is, that you can actually engage a much more curated and tailored experience rather than what Intercom has after.

[00:56:36] Sina: Yeah, it's I, I think a, a big part of it will also go in the direction of like customer acquisition, right? Because now you have a direct channel to like all these users, you can qualify them based on their past behavior. And these like crypto products and protocols are literally spending like tens of millions of dollars on these liquidity mining programs that are so inefficient.

I think at acquiring users, they're not targeted at all. And you can put a fraction of that budget into a system like this. And basically like, you can, you can develop the, the equivalent of performance marketing, you know, where you're like, Hey, we like nudged the user in this way. And they had this behavior on chain after that.

And I feel like that will just be like a whole space of things that, that will open up.

[00:57:32] Pedro: And you could even have so one of the things that we made sure that Wal connect chat was, it was fully opted. So a lot of people talk about we, how we can actually build spam protection. And there's still a lot of things to be thought about spam protection at the invite level. So we have an invite system where you could actually make someone.

Publicly discoverable and then invite them into a chat. And we still do not have spam protection at that level, but at least we have spam protection at the level. That number one, you by default are private. So people can't find you, you have to opt in into being public. And number two, the invite system actually requires you to do key exchange with the invite so that you can actually start chatting.

So you could literally erase that conversation from a single message, rather than getting spammed with a bunch of random messages and never receive a message from that participant anymore. So given that the person has opt in, we could build like bot experiences where you could have like almost these assistants and people get lost on Webre a lot.

And we could have like a wall connect, chat experience where. They Abbo with the tech that you failed your transaction, analyze it, using some sort of like chain analysis and understanding exactly what this transaction was trying to do. And then literally describe it in a message to the user. Hey, it looks like you try to send to unit swap, but you have the very short time window, or you have the, the range wrong or something.

And literally explain to the user automatically as the fail transaction gets mined on the blockchain.

[00:59:22] Sina: Yeah. Wow. That's such a cool idea. Cause it's, it's also, it's like kind of an. Ecosystem support line, you know, that works across the applications, cuz like, who do you go talk to if you're like, I guess like meta mask and some of these folks just gets the, get the brunt end of all of these issues that users have, right.

Or like I think my ether wallet back in the day would talk about all these like crazy support requests they get where they're like, we don't know, we don't have anything to do with this. It's the application you're using or.

[00:59:57] Pedro: exactly. And it, it, I like the fact that it's so modular and interoperable, because then it doesn't even need to be the actual wallet provider to provide this service. Maybe there's like some really good like chain like blockchain Explorer, blockchain indexer company that builds like the Bo the best support experience.

So whether you're like on trust, wallet, I'm token or rainbow or meta, you could take advantage of that service in all of these wallets by just subscribing to this bot. And then this bot just like helps you out regardless of the world that you use.

[01:00:36] Sina: Yeah, totally Well, I, I feel like we've, we've really traversed this face of, of a lot of ideas here, but I'm, I'm super excited about. The the future. I feel like you're, you're kind of opening up just huge open spaces on multiple sides, like with the chat with, with this like private public infrastructure with the ath.

I'm, I'm really excited.

[01:01:03] Pedro: I feel like we are very privileged because we never build an actual app or a wallet, but we actually get to receive feedback from both sides and understand everyone's problems. And then we just try to fix them.

[01:01:17] Sina: yeah. Well, thanks for having me. It was great chatting about count abstraction and all the good stuff we'll have in the future.