owned this note
owned this note
Published
Linked with GitHub
# Social Feed Algorithm Design
---
### Introduction:
Teritori Social Network is fully decentralized, using :
- a custom CosmWasm smartcontract for all posts
- InterPlanetary FileSystem for decentralised media hosting
- decentralized usernames service
3 main experimentations:
- Suggestion Algorithm
- Decentralized Ads Service
- Decentralized Moderation System
## Abstract:
Teritori Social network is based on a decentralized philosophy bringing power back to the users.
The mission of this feature is to provide a censorship resistant expression and communication tool allowing humans to publish content (posts, articles, media, etc.) even in worst political situations and restrictions they could live.
Radically different from all existing social networks applications, Teritori is based on a onchain architecture that doesn’t rely on any backend infrastructure, which means the only moderation can be done on the front side of the dApp, and should be decided in a decentralized philosophy, by users themself.
With this vision comes a lot of technical challenges, but also philosophical challenges that will need to be cared both by the development core team, community developers, and users.
## The Suggestion Algorithm Challenge:
In the state of the art of Social Network experiences, algorithms are a key component of the user experience, since the all suggestions logics are based on various data and metadata analysed by the centralised company owning the application.
At Teritori core team, we want to propose an experimentation based on a new concept.
Various possibilities are currently existing in the algorithm approach:
### 1. The engagement metrics
The more users interact with a content, the more this content is displayed to new users.
This model is interesting, since it’s based on an organic design, but many studies from last 10 years have proven that this design encourage mostly ‘haters behaviours’ and aggressive comments. Basically, people that love a content will represent a smaller impact that the aggressive people hating it, which will be more engaged. A falling tree makes less noise than a growing forest.
We believe that this design cannot be used alone in Teritori Social feed experience, since we would like to create a safe place, where the hate is not pushed forward and encouraged by technology.
### 2. The Prescriber design
An other famous design is the suggestion of content based on the “most famous” (or followed) users. He is supposedly a creator of valuable content, or a prescriber who interests a wide audience. It is therefore supported by the algorithm and offered to an increasingly large audience.
This logic generates the creation of star users, who potentially become "stars" of a new network, and take a very important part of the audience of the platform as time goes by.
The crowd attracts the crowd.
This logic is also found in sociological studies in real life. Ask 10 friends to stop in the middle of the street, look at the 5th floor of a building together, act out something happening, and film something that is going to happen.
You will then see a crowd building, drawn in by the feeling that they are going to miss something. Then, your friends can gradually leave, and a larger and larger crowd will meet, without the initiators of the experience even being there yet.
We can consider that in the digital age, bots play the role of your friends, and generate the "start of attraction", purely artificial.
In the context of Teritori Social network, the creation of "fake audience" bots will be discouraged by various mechanisms, in particular first of all by the fact that the posts are on chain, and therefore require the signing of a wallet, and transaction fees .
So if bots are used (which is technically not possible to prevent), they potentially generate value for the whole ecosystem at large.—
### 3. Ads System owned by decentralized organisations
In all centralised networks (Facebook, Twitter, etc.), we know that advertising is the key element of their business model and we believe that we cannot avoid to allow ads in a future proof approach, since it would be whatever done in the long run in a roundabout way that would not benefit users in the long run, with advertising logic that does not speak its name.
Our vision as core team is to rethink this Ads Network system, using a decentralized process that give both the responsibility of validating ads, and the rewards from the ads budget to users themself.
We believe that we could use different DAOs (eg: R!OTERS collection, since they’re here from the early days of Teritori Network) to become a kind of council validating Ads campaign on the Social Feed.
Randomly chosen in the DAO every month, they’ll have to review ads proposals, and accept or not on the network.
By doing this job for the community, they’ll generate proof-of-contributions that will unlock some rewards.
### 4. Onchain data post generation - Make onchain data great again.
With Teritori Social Feed, we want to bring a new way to display onchain data to users.Years after years, we’re exposed to more and more informations in our online activities, but most of content that are shot in our eyes are not related to informations that could be very important for governance decisions. For example, a citizen is currently not informed every time an important proposal is voted by deputies, etc.
We believe that we need to experiment a new way to display all governances news, because it’s a crucial element for the future of decentralized communities to care about “politics” topics of their networks and applications. Currently, only 5 to 20% of DAO members contribute to governance discussions and votes (mixing all ecosystems) and it’s a shame that people doesn’t put attention on future of projects.
We think interesting to experiment a new user experience where all important proposals are automatically displayed in the user feed, if he’s member of a project, and this information must be accessible at the same place this user goes everyday, additionally to the “governance place” in a dApp.
Basically, this means the user doesn’t have to “think to check” every day/week/month to go to check the governance activities, but find a highlighted version and sump on the social feed if something is pushed there.
## Teritori Proposal for Social Feed Suggestion Algorithm v0.1
During the Alpha version, we’ll experiment two things:
1. The jungle mode.
Basically, that means EVERYTHING is posted and displayed on the feed, all the time, without any filter and any suggestion.
2. The foundations of a Teritori Suggestion Algorithme managed by community.
This experimentation will require various tests, iterations, and community feedback to identify smartest options and optimise the algorithm in the long run.
We started to think about this Suggestion Algorithm that should be composed of :
- 50% from accounts the user is following (users, daos, companies)
- 20% from random accounts posts that fit with users tag of interests
- 10% from governances activities the user is engaged on (holding an NFT, token, etc)
- 10% from high level engagement
- 10% from Ads dOrg (paid ads validated by the Ads DAO members, generating revenues for the network)
This model must be experimented and optimised since no one can know how does users will interact, how valuable will be the content, and how much the network effect will start.
## Implementation proposals (first investigation):
### Information source
All the information should come from the blockchain itself, Redis on the following section it just a mechanism to distribute the content among the users.
Having that on mind we could have a service like the indexer we currently have, scanning the transacions of the blockchain and classifying them and posting them to one or several topics. What we need to ensure is that even if we delete redis entirely we can rebuild all the notifications reindexing all the events on the blockchain.
Maybe we could even empty the entire redis distribution frequently and reindex the events from the chain in order to keep integrity all times. To do that is neccessary to persist the notifications seen/open in order to do not show them as new notification each time the user fetches the social feed. Maybe this information can be stored off chain at it is not really critical if we present a notification as new to one user (and this should not happen frequently).
### Kind of channels:
- We should handle several kinds of channels one exemple of that is money tips and money transfers or other personnal event should only be know by at most 2 users (From & To). Each client should have a personal channel.
- Maybe we should have a different channel for the content creator, for notifications that affect only to the post owner (reports, donations, reactions to posts etc)
- Normal channels, channels to which any user can subscribe / unsubscribe.
### Kind of topics:
> (please feel free to add to all the sections of this document but specially this one that is kind of tricky to define):
- User topics: follow a given user will subscribe to that user (normal or public channel)
- Hashtags: topics linked depending on the post content (technology, politics, economics, etc).
- Publicity posts
- Governance
- ...
We should have after indexing one event a service that classifies it to one or several of these topics.
### Redis
One way of implementing social feed algorithm would be using Redis as explained on [twitter-clone](https://redis.io/docs/manual/patterns/twitter-clone/).
On synthesis a user will represent a topic, this topic is filled with all the posts a given user will make. In addition to the user topic, we should manually or automatically classify each post depending on the post content (technology, politics, economics, etc).
We could have some topics coming from custom sources such as governance or ads. Each time an user consults his timeline for updates, we will retrieve a mix of some of these topics as explained by **zôÖma.tori** before.
One of the advantages of using Redis would be the performance and the possibility of consulting Redis several times without suffering from performance struggles. ["All the processing is doing while writing, all the topics related to the post are computed and filled with the freshly created content"](http://highscalability.com/blog/2013/7/8/the-architecture-twitter-uses-to-deal-with-150m-active-users.html).
![](https://i.imgur.com/o5uWQyN.png)
On Twitter arch the path I'm suggesting would be central path With fanout (to decide the post's topics) and Redis as content server for the users.
### Nice to have
AI algorithm to suggest with new experimental post to the user. Content that the user is not currently interested or following but have possibilities to like.
### API
- allow users to access and interact with the feed
- features such as notifications, search
- personalization (subscribe / unsubscribe) a topic
---