logo
Leveraging Polkadot's Unique Capabilities To Enable Web2 UX With Subsocial's New Off-Chain Signer

Leveraging Polkadot's Unique Capabilities To Enable Web2 UX With Subsocial's New Off-Chain Signer

TL;DR: Users of Subsocial apps can now delegate the signing and payment of their transactions to Subsocial’s signer service, allowing them to use Subsocial for free, without any confirmation pop-ups. This does introduce some centralization risk, but users are not required to use the Signer proxy, and they can continue using Subsocial in a completely decentralized way, and sign and pay for their own transactions.

In our continual quest to make Subsocial so user-friendly that even your grandma could use it, we have developed and released the final piece of the UX puzzle, overcoming significant barriers to the adoption of Web3 social networks.

The three main barriers for adoption were signing in, getting tokens, and signing transactions. Users must set up a wallet, manage their seed phrase, acquire tokens (through often convoluted methods), and then repeatedly sign transaction confirmations. For the social layer of the next generation of the internet, these barriers were a major roadblock to adoption.

Over the last year, we have worked to develop solutions to these barriers. We hold decentralization to be the highest ideal of a blockchain project, but recognize that, at least for the moment, decentralization brings with it various UX problems. As such, we have created multiple different options for interfacing with Subsocial, effectively creating a UX & Decentralization Spectrum.

Depending on what they are comfortable with, a user can choose what level of decentralization and UX they want. Crypto enthusiasts can still remain in complete control of their keys and assets, and confirm every transaction, while our grandmothers can use dapps built on Subsocial just like they use Facebook. Of course, the benefit is that they all use an open, shared social graph, and have the freedom to choose from various applications, algorithms, etc. — all of the benefits of a Web3 social networking platform. Opting for a more centralized user experience on Subsocial does not negate these benefits.

The Puzzle Pieces

The two main pieces of the UX puzzle work together to remove all of the previously mentioned UX barriers. Subsocial’s unique Energy system allows us to remove the need for users to acquire their own tokens, and our newly released Off-Chain Signer resolves the issues of having to repeatedly confirm transactions. Both of these systems working together in tandem allow us to remove the barrier for signing in; this can easily be seen on Grill.chat, which has an even faster onboarding process than any Web2 social network — you don’t even need to create an account!

We’ll explore the Off-Chain Signer in a second, but first, it’s important to mention that both our Energy system, and the Off-Chain Signer, are only possible because of the unique structure and capabilities of Polkadot’s tech stack. Due to its flexibility, we are able to easily customize our blockchain, making it much easier to develop the Off-Chain Signer system, as well as easily roll out updates as needed.

Building with Polkadot also enabled us to use novel methods for transaction fee payments. For example, at the time of writing, transaction fees paid with Energy are only 1/5th as expensive as transaction fees paid with Subsocial’s SUB token (one SUB lets you complete ~50 transactions, and one energy lets you complete ~250 transactions).

Additionally, the energy system allows for sponsored transactions, allowing applications to pay for their user’s transaction fees, which means that users do not need to even think about tokens! We can confidently say that all of this is possible only on Polkadot.

The Off-Chain Signer

Now, what is the Off-Chain Signer, and how does it work?

The Off-Chain Signer is a system that allows an application to sign and pay for social transactions (this does not include management actions such as transferring tokens or ownership of a space, managing roles, etc.) on behalf of a user. As a result, you no longer have to deal with constant confirmation pop-ups while using dapps powered by Subsocial, and you don’t have to worry about having enough tokens to pay for transactions.

To use the Off-Chain Signer system, you will log in to the service using either an email and password, or one of your existing Substrate accounts. If you use an email and password, we will create a Substrate account for you in your browser, and store the encrypted private key in your local storage (note that, with the current set up of the Off-Chain Signer, email and password users will not be able to access management features such as transferring spaces, managing roles, etc., though this will be fixed in the future).

After logging in, you will receive a small amount of free Energy as a gift, so that you can add our Signer service as a proxy account. Adding the Signer as a proxy will allow it to execute social actions on your behalf, so that you can use Subsocial with zero fees or confirmation pop-ups!

If you have previously used PolkaVerse with a Substrate wallet and would like to use our signer service, you can enable it from the Quickstart menu. You may have hidden the menu, but you can open it again from the right sidebar, and select Show Quickstart.

If at any time you would like to remove the signer service, you can re-enable confirmation pop-ups from the Quickstart menu.

Note: This system does introduce some centralization risks, which are explained below. If you are not comfortable with the associated risks, you are free to continue using dapps powered by Subsocial in a fully decentralized way.

Digging Into The Technical Details

Let’s walk through the technical flow, shown in the image below. The end users of an application will set that application’s MainProxy as a proxy account. This allows the MainProxy account to sign social transactions on behalf of the user (social transactions are those from the Posts, Reactions, AccountFollows, SpaceFollows, Spaces, and Profiles pallets; all management actions will still require you to manually confirm the transaction).

The application’s MainProxy account will also set a Signer account as a proxy, allowing the Signer account to sign (and pay for) social transactions on behalf of the MainProxy account, which signs them on behalf of the end users.

What is the purpose of using two layers of proxies? Well, the private key for the Signer account is stored on the server running the Signer — this needs to be done so that the Signer service can sign transactions. Naturally, this is not totally secure, as someone could hack into the server, and be able to sign social extrinsics on behalf of a user (such as posting from a user’s account, or changing their profile information).

To minimize the negative effects of this potential risk, the MainProxy account is used as an intermediary, and the private key for the MainProxy account can be securely stored offline by the application’s development team (as we have done). In the event that the Signer account is compromised, the team can replace it with a new Signer, and remove the old Signer account.

Without this setup, if the Signer account was compromised, every user using the Off-Chain Signer system would have to manually change their proxy settings. By using a MainProxy account as an intermediary, teams can solve this issue on behalf of their users.

How Do Users Benefit?

Constant confirmation pop-ups, which have been one of the biggest barriers to high traffic adoption of Subsocial, are now a thing of the past! Frequent users of Web2 apps like Twitter, Facebook, Instagram, Reddit, and Medium will now feel right at home as they use dapps on Subsocial without any interruptions.

We feel confident that at this point, even your grandma could use an app like PolkaVerse; she might not even notice that she’s using a blockchain! A new era of Web3 adoption has arrived.

It is worth noting that this will only affect users that choose to use the Off-Chain Signer. If you are not comfortable with the associated risks, you are free to continue interacting with the Subsocial network without the use of proxies. Or, if you are technically savvy, you can set up your own Signer service to sign your transactions for you, using a similar setup, without entrusting a third party. We will have instructions out for this soon, so please let us know if you are interested in running your own Signer.

Developer Integrations

If you are a developer of an existing application powered by Subsocial, or are interested in building on Subsocial, the Off-Chain Signer will be very exciting for you! The main concern when building an application is, “Will people use it?” The team at Subsocial is working hard to remove every single reason that someone could give for not using your dapp, allowing you to focus on doing what you do best — building awesome applications!

At the moment, you have two options for integrating the Off-Chain Signer tech into your application:

  1. You can create your own MainProxy account (not required, but highly recommended) and run a Signer service on your own server, signing transactions on behalf of your users and paying their transaction fees, or
  2. Use our system for the time being, as we are currently happy to handle signatures and transaction fees for users of our network.

It will undoubtedly be easier to go with option two, but that will not be an option forever. Also, please note that you can customize your own signer. For example, you might only accept transactions for posts within a certain space, posts related to video content, posts in a certain language, or even just whitelist a few accounts that are premium subscribers to your dapp!

If you are interested in building on Subsocial, or setting up your own signer service, join our developer chat and let us know.

We Are Just Getting Started!

With over three years of building under our belt, we feel that Subsocial is finally in a position to achieve its full form. With the three main barriers to adoption out of the way, and an awesome developer ecosystem forming, 2023 will continue to be a big year.

The release of the Off-Chain Signer vastly increases the feasibility of integrating social features into other Web3 applications, as those apps can sign and pay for the social interactions of their users, to the point where some may not even realize they are socializing on-chain. We are committed to adding social features to as many applications as we can this year, in order to bring extra value to dapps in the space, acquire users, fill the Subsocial network with content, and let the world interact on an open social graph.

We’ll see you on-chain!

Create Your Own Creator Chat Community!

Yung Beef 4.2

Updates To Grill's Login Flow

Updates To Grill's Login Flow

The “Connect via Polkadot” login option has been returned to the main page of the login modal, along with some changes for users choosing to login wit

Yung Beef 4.2

March 2024 In Review

March 2024 In Review

Last month saw the launch of Subsocial’s super-app! Launched as Grill, the existing Grill.chat and PolkaVerse apps were both combined into one, with s

Yung Beef 4.2

Feedback Request For The Future Of Content Storage

Feedback Request For The Future Of Content Storage

While storage is cheap and Grill’s current storage requirements are not enormous, they will be at some point in the future, and the network should fin

Yung Beef 4.2