What should web3.0 social media look like? — ULAS PostFi

ULAS Network
ULAS Network
Published in
10 min readAug 3, 2022

We cannot solve our problems with the same thinking we used when we created them. — Albert Einstein

Introduction

Web2.0 social needs to change. We have suffered enough from the ever-existing echo chamber and cyberbullying due to the Information Cocoons built by the big social media companies. The social graphs that we spent time building are now toxic and polluted. Don’t even mention the uneven wealth distribution of the parties on the social media platform — users contribute the most yet receive the least.

A decentralized social protocol, which gives the opportunities to solve mentioned problems to users themselves, is inevitable. But how?

According to the Nature of the Future written by Marina Gorbis, a new social graph building requires five of the following:

  1. Reward micro contributions which encourage social sharing;
  2. Decentralized right confirmation of one’s personal data (NFT);
  3. On-chain ranking system that leads to sociality formation.
  4. Community organizers instead of managers;
  5. Collaborative network at a universal scale to gather “The Wisdom of Crowds” and capture value more efficiently.

With the methodology of bringing changes to the existing social media landscape, we launched PostFi.

What is ULAS PostFi?

PostFi is a decentralized social media application, built on the ULAS social application chain. The game-changing application is committed to building a social reciprocal network in the WEB3 world, returning users’ their own social data, the right of whether they want to commercialize it or not and more importantly, commercialized services that makes commercialization of social influence easier than ever.

Enough of concepts, let’s talk business.

The following is a detailed explanation of ULAS-PostFi product features & mechanism design.

Note: ULAS-PostFi is currently open for use only by existing users who have DID cards, and will be open for use by everyone once the functionality is stable.

Delete the old chain

Note: Because ULAS-PostFi has done a lot of function upgrades and additions to the chain, to avoid incompatible or unstable chains, please make sure to delete the old chain!

Open the installed Keplr wallet and select a chain other than ULAS (take Cosmos Hub as an example):

After switching to the Cosmos Hub chain, click on the top selection box, slide down to the bottom (Beta support) and delete the ulas chain:

After removing the ULAS, you can start the following process.

Wallet connection and Sign-in

To make it easier to understand and use Ulas-PostFi, we can compare it to Web2’s Twitter, which mainly revolves around the PostFi function. After we finish adding the Ulas chain to the wallet, connecting the account, and authorizing the login, we can start using it.

First, visit the PostFi (app.ulas.network/PostFi):

Click the Connect Wallet button in the upper left corner to:

The Connect Wallet window pops up:

If your account is inactive, a Go to faucet prompt will appear when you click on Connect, follow the instructions:

Note: If you don’t have Keplr Wallet installed, please go to Chrome Plugin Marketplace and install it before proceeding

After claiming the test token, click to connect the wallet again, the wallet will have multiple pop-ups Request Approval windows, click Approve:

The first time the wallet has connected, a total of three pop-ups will be made for Approve, which are:

  • Add ULAS testnet chain to the wallet
  • ULAS connects to the wallet account
  • Sign in with ULAS

Once the account is connected and signed in, we can start exploring the features.

Post/Comment/Like/Follow

Create Post

Once we have an account, we can immediately start creating a Post and say Hello to ULAS!

Enter the Post content and click Create. The first time the Post has created the wallet will pop up requesting users’ approval, and if no Feegrant authorization is made an additional pop-up will request approval, as follows respectively.

- The user approves the granting of MsgPost permission to Grantee (as shown ulas1pxxfwa3e…8zrpy4ew), and the subsequent Post will be operated by Grantee on behalf of the chain, only the first time the wallet interaction is required for approval.
- The user approves the Feegrant operation and grant Grantee the number of ulas tokens that can be spent, the current default is 10ulas (Allowance = 10ulas, change is not supported for now), and only the first time the wallet interaction is required for approval.

The screenshot of the pop-up window is as follows:

After creating a Post, the page will automatically refresh and your Post will appear at the top and everyone can Comment/Like it. Try it now!

Create Comment

Comment on the just-posted Post:

Similarly, when making a Comment for the first time, the wallet will request the user’s approval in a pop-up:

  • The user approves the granting of MsgComment permission to Grantee, and subsequent creation of Comment will be operated by Grantee on behalf of the chain, requiring only the first wallet interaction for approve

After the approval is completed, you need to click “REPLY” again, and then you don’t need to interact with the wallet when you comment again.

Create Like

When a Like is clicked on a Post/Comment, the wallet will pop up requesting user approval for:

  • The user approves the granting of the MsgLike permission to Grantee, and subsequent clicks on Like will be operated by Grantee on behalf of the chain, only the first time the wallet interaction is required for approvals.

Follow

The social scene is of course inseparable from following, which will gradually build a social relationship network. The following try to Follow people you are interested in (take CitizenU as an example), on the first click of the Follow button, the wallet will pop up a window requesting user approval:

  • The user approves the permission to grant MsgFollow to Grantee, and the subsequent Follow other users will be operated by Grantee on behalf of the chain, only the first time the wallet interaction is required for approval.

After completing the above approvals, you need to follow CitizenU again, and finally, when the page is presented as follows, it means that the following is successful and you have completed the confirmation of the on-chain relationship with CitizenU.

Profile

ULAS created the DID campaign in the first place. When a user receives a DID, it means that the user has a unified WEB3 identity for ULAS, which will be used throughout the entire ULAS ecosystem. Therefore, if you have received a DID card during the DID campaign, your personal information, such as your avatar, nickname and other Metadata, will be automatically imported after you sign in to Ulas-PostFi with your original account wallet.

Of course, if you did not receive a DID card during the DID campaign, you can still create new personal information directly in the profile of Ulas-PostFi (Ulas-PostFi is not open to new users at this stage, so you will need to wait for a stable version to be released before you can use it).

Below we click on Profile in the left navigation bar to view our social behaviour as we try to update our DID:

Profile Settings

Note: It is recommended that the Banner does not exceed 10M, otherwise the IPFS upload may fail and you may face some unknown exceptions.

After filling out all the relevant input boxes, click Claim my did at the bottom and the wallet will pop up asking for user approval.

  • User approval will be granted to Grantee for MsgUpdateProfile, subsequent clicks on Like will be operated by Grantee on behalf of the chain, only the first-time wallet interaction is required for approval.

After completing the wallet interaction, you need to click “Claim my did” again, and when the transaction is successful, your DID is done updating!

Grant signature-free mechanism

For the goal of simplifying user interaction experience, we did not choose a wallet signature scheme similar to Lenster, which would cause frequent wallet interaction requests, but built a signature-free issuing and withholding mechanism based on Cosmos SDK’s authz and feegrant modules, similar to granting a specified number of tokens to the contract account, the user as Granter will specify the type of Msg authorized to Grantee, the various types of transactions initiated are actually executed by Grantee on behalf of the user, and the Gas fee generated by the transaction is set to Granter, i.e. the user itself, through the feegrant module.

And inside Ulas-PostFi, Post / Comment / Like / Follow / are different Message types, and each type of Message needs to be granted separately (which is a feature of Cosmos), so when users create Post, create Comment, click Like, follow someone, the first operation After the approve is done, we will grant a Feegrant, which will grant the Grantee a total of 10ulas of gas spending (which is enough to cover all the social gas spending of the user in 1 year), and then the subsequent operations will not need to interact with the wallet.

In a future version, we will centralize multiple types of Msg authorization into a unified permission control page, providing users with a permission management center that they can control on their own.

Reference

On-chain Trendy Posts

On-chain trendy posts is a post hotlist function based on on-chain calculation, using a low-overhead sorting algorithm to make the entire calculation process performed on the chain, and the hotlist is calculated in real-time for each block of Posts in the list.

The hot list on the chain maintains 10 of the trending Post, Post popularity from Comment and Like/Unlike, respectively, have different hotness value weights finally summed up to get the Post popularity score.

At the same time, we also introduce the heat decay calculation, and will gradually introduce weighting items such as personal identity and social network, in order to make the on-chain trending posts easier to use.

The Trendy Posts on the chain are still under continuous iteration.

Optimized Solution

When a new user connects to the wallet, 3 wallet interactions are required, the last one is when the wallet uses the private key to sign the message and sends it to the backend for signature verification, which ultimately enables the server to verify the client account identity.

Why do we still have a server-side? What does the server side do?

Our original reason for building the server side: the current WEB3 infrastructure is still not mature enough, and we need to support some Web2 infrastructure to make the overall service experience better!

Although our Post / Comment / Like / Follow behaviours are all on-chain, the text and images contained in Post and text and images contained in Comment are stored on IPFS, and the profile information is all stored on IPFS, this also poses the problem that the IPFS network is currently unable to meet the high-frequency content read/write requests of the Social scenario. This requires some web2 means to optimize the service and bring a smoother experience for users. Therefore, after uploading the original images from users’ Posts to IPFS, we additionally thumbnail the image resources and store them in AWS S3, which makes the client load the feeds faster and the users’ waiting time shorter.

Even if AWS is shut down due to an accident in the future, all our Metadata is on the IPFS network, our service can remain resilient.

In addition, we do a lot of structural encapsulation of IPFS resources on the server side to return to the client, which reduces the pressure of data processing on the client and makes the whole application lighter.

In the future, even if the server side is interrupted due to abnormalities, all the metadata will not be damaged. We will also adopt the server side for more optimization later.

--

--

ULAS Network
ULAS Network

ULAS Network — Foundation of trustless society Landed in #Ulas, a shining star in #Cosmos