Get social on Streamr – Introducing thechat.app

The beta version of thechat.app has launched and is now available for use! It’s a new way to be social in Web3, built on the permissionless and decentralized Streamr Network.

thechat.app features

  • Decentralized & serverless group chat instant messaging via Streamr
  • Verifiable and tamper proof communication
  • ERC20 & NFT 721 token and stake gated chat rooms
  • Delegated ‘hot wallet’ message signing
  • ENS identities & ENS avatars
  • Offline key exchange via the Lit protocol
  • Chat room search via The Graph
  • Decentralized frontend—provided by the Fleek Network
  • Fast and affordable transactions on Polygon
Get social on Streamr – Introducing thechat.app
Thechat.app’s main lobby—Forget servers and databases. Say hello to serverless, p2p communication.

Why build a chat app?

For some time now, there’s been a strong uptick towards builders using the Streamr Network as a messaging medium for human-to-human communication. Instead of reaching for Amazon Kinesis or Google Firebase, they want their decentralized applications to be fast and serverless–Streamr has found a protocol market fit in Web3 social.

There have been many different flavors of chat apps built on Streamr, but none yet have been able to punch through mainstream Web3—we hope to change that with Thechat.app. And not just for the folks that want to chat with their friends on their own terms, but also to inspire builders to push the envelope of what’s possible and start creating new serverless communication experiences on Streamr.

How can I use it?

Thechat.app is being released in Beta version and is designed to work best as a desktop web app in your browser. The app works well with Metamask, so for now this is our recommendation but early feedback suggests a positive experience on mobile browsers as well. To create and join rooms you’ll need a few cents worth of MATIC tokens to pay for the required transactions on the Polygon chain. Creating chat rooms, invites as well as accepting invitations are all on-chain transactions. The invitee will automatically see the invitation within a few seconds of the transaction being mined on Polygon.

Chat rooms come in three flavors—public, private and token gated. If you wish to make a private group to chat with your friends, or with a community—you can now do so without any intermediary and with full confidence you are chatting with exactly who you think you’re chatting with! Public in this context means publicly viewable, private means viewable by only who you invite, enforced with end to end encryption.

Get social on Streamr – Introducing thechat.app
The Chat app in action

How does it work?

Every chatroom is a stream on the Streamr Network and the chat room participants are registered on the on-chain stream registry. The fabric underpinning every chat room is a peer-to-peer WebRTC mesh network composed of the participants of the chat room.  

The nodes ‘running’ the stream are the browser tabs that are on thechat.app. These browser tabs have formed an overlay network for which they communicate through, i.e. send messages to the chatroom and have everyone else see them. This is different to all other chat apps where everyone would connect to a central server.

Decentralized hosting

We chose the Fleek Network to deploy thechat.app on IPFS. The result is smooth performance, hasslefree infrastructure and most importantly, end-to-end decentralization. Thechat.app can also be built and run locally.

Since the app is hosted on IPFS, it can be accessed through various public IPFS gateways using the IPNS name, for example: https://cf-ipfs.com/ipns/thechat.app/ and https://dweb.link/ipns/thechat.app/. Various public ENS gateways work as well as long as the browsers support ENS names (Brave, Opera, others via Metamask plugin), e.g. https://thechat.eth.limo/ & https://thechat.eth.domains/.

Token gated access control

Who can read and write data inside streams on the Streamr Network is determined by the stream registry smart contract. This registry contains the list of Ethereum addresses along with their access rights on the Network for each stream. Because this registry is a smart contract, it can compose with other smart contracts, meaning that it can reference other smart contracts that can dictate their own terms of access.

For instance, a stream access control policy may check for a certain token, or a certain amount of tokens in your wallet, before granting access to the stream. Since streams are chat rooms, this pattern converts beautifully to thechat.app’s token gating room feature. These types of access control policies can be extended to all forms of generalized data flows over the Streamr Network.

Get social on Streamr – Introducing thechat.app
You’ll need to show some coin to enter this chat room

Hot wallet signing

On Streamr, every message payload is cryptographically signed by the author, and flows through a decentralized data transport network to reach any number of subscribers in under a third of a second. This gives the network the strongest of security guarantees but creates a UX pain point—are folks really expected to sign a Metamask popup every time they ‘gm’? Well, sort of, but we have developed a clever workaround called the delegated account pattern.

Delegated accounts, or “hot wallets” are generated by the user, then linked to the user’s main wallet by creating an on-chain mapping between the hot wallet and the main wallet. The hot wallet is stored in the local storage of the device or browser and can be used to sign ‘gm’ without having to deal with the unpleasantry of a Metamask popup. If the wallet is compromised, the main wallet is unaffected. This pattern aims to strike the right balance between usability and message provenance.

What comes next for the Chat app?

Later this year when the Network “1.0” milestone arrives, we may see a major leap in privacy guarantees provided on the Streamr Network. This is an especially relevant feature for human-to-human messaging and it’s something we look forward to talking more about!

Token gating could open new (car) doors, DIMO tesla drivers could join a chat room verified by their on-chain NFT credentials. Perhaps a social group chat with ChatGPT? A chat room for Streamr Broker node runners?

There’s many features we’d love to develop, but we will leave this steering, to our community and the broader Web3 space. Are there killer features we should extend the app with? Should it be its own project?

Try thechat.app beta today and share your feedback and ideas on Discord to help us explore this new territory and get social on Streamr.

Stay up to date

Get the latest Streamr news and articles delivered to your inbox