WalletConnect: The Self-Sovereign Identity Stack’s Layer 2 Solution

Bartek
WalletConnect
Published in
4 min readDec 1, 2022

--

WalletConnect is mainly known as the web3 protocol that connects dapps and wallets, and which allows users to sign blockchain-based transactions. To deliver the best UX for this particular purpose, WalletConnect had to develop a robust infrastructure and mature modularized frameworks, becoming an essential tool for every web3 developer and user.

In doing so, WalletConnect has emerged as a worthwhile solution for the existing protocols that serve as the lightweight layer 2 of the so-called self-sovereign identity stack. This is all due to WalletConnect’s modular approach, which emphasizes the utilization of a single communications channel not only for efficiency gains but as a launchpad for custom protocol development.

So, what exactly is layer 2 of the SSI stack?

Source: Hyperledger’s Aries GitHub

The SSI stack’s layer 2 is a secure communications layer that allows peers to establish trusted connections and exchange verifiable credentials and proofs. Without diving into the details of the other layers, layer 2 provides cryptographic trust for the communications channel between “DID controllers”, which aren’t very technically different from the controllers of cryptocurrency wallets and/or the decentralized applications that interface with smart contracts. This communications channel must be encrypted and authentic to ensure that malicious actors cannot read or tamper with messages.

Layer 2 also has several other essential requirements that may differ from the typical SSI use case.

  • It should be possible to reach actors in the network that are not running a web server or always-on cloud service, especially mobile wallets.
  • The above requires an intermediary infrastructure that is fast and resilient, so that actors can be sure to receive all messages and can exchange their credentials at any given time, even with clients that are only sporadically online.
  • The messaging infrastructure should be decentralized and open-source so that users do not have to trust a single service provider.
  • The protocol should be well adopted in web3, so that any participant can understand it. Simple and familiar UX is the key to user growth.
  • When a mobile agent is offline, incoming messages should be stored in the cloud and made available the moment the user returns online.
  • Ideally, a user would also receive a push notification when new messages are ready to be received upon the next connection.

What options can you choose from to build this layer today?

As of today, there are two main potential solutions for developers looking to build in this very specific space.

  • RESTful web services

While RESTful web services may be secure, mature, and understood by developers worldwide, there are significant limitations to this solution. It requires at least one participant to run an HTTPS server, excluding the possibility for two mobile wallets to connect directly. Additionally, the web server is passive and can only respond to wallet requests. Building real-time or peer-to-peer-friendly SSI infrastructure on top of this is therefore extremely challenging.

  • DIDComm

The DIDComm protocol is advanced and offers a lot of optionality and rich features; it is rather well-known within the SSI community. It allows for secure communications with encryption, signature, or both. It is transport-agnostic, meaning that you can utilize many different architectures to deliver messages over any transport (in theory). It could be HTTP, Bluetooth, or even a horseback rider — yes, even that!

While DIDComm seems like a solid solution, there are some drawbacks. It doesn’t appear to have been adopted by any widely-used cryptocurrency wallet. It also requires hosting mediator infrastructure from service providers, which can be troublesome for many projects. Plus, DIDComm can still be considered immature in certain aspects, as it requires more implementations in production-grade commercial deployments.

Why is WalletConnect a powerful alternative?

As a key protocol that serves just about every wallet and dapp in the broader EVM world, WalletConnect is used by millions of users worldwide. As we expand our footprint beyond Ethereum, the network effects that are already underway could prove valuable in pushing along the adoption of SSI protocols.

Moreover, WalletConnect secures messages with cryptographic algorithms used by TLS, ChaCha20 stream cipher, and Poly1305 message authentication code — the best available today for wallet-centric architecture. Plus, WalletConnect SDKs connect easily to a relay network that allows any two actors (wallet <> wallet or wallet <> dapp). Any participant can be reached at anytime without hosting a web server.

Our infrastructure stores all participants’ messages in cloud mailboxes to prevent loss. When the user is offline, their messages are directed to their cloud mailbox; once the user reconnects to the network, the messages come pinging in. Our network also supports push notifications for wallets when they are offline, allowing them to inform users instantly about the verifiable credential interactions awaiting them in their next session.

There are a lot of significant milestones in the WalletConnect pipeline as well. In 2023, the WalletConnect Network will first become federated and later fully decentralized, so that no one service provider can flip the on-off switch that determines whether you have access to the network. Additionally, our network is already regionalized — and insanely fast.

With the latest release of the WalletConnect Pairing API, injecting new protocols into WalletConnect Core has become remarkably easy, offering an incremental and composable upgrade path that can be driven by dapps to incentivize wallet adoption over time. If you want to try it, just take a look at my previous blog post and reach out to our team on Discord.

To keep up with our announcements, join our Discord and follow us on Twitter. If you are a wallet or an app that is interested in integrating WalletConnect, head over to our website and explore our documentation.

--

--