#STATUSBUIDL week - Moderated Channels

Moderated Channels

In this project we added support for opt-in moderated public channels in status. It solves potential spam issues that exist in pure public channels, helps create communities, and provides additional use cases for SNT.

Additionaly, as part of this project SNT is now bridged in the xdai chain and available as xSNT.

Features

  • A user can register a channel and become a moderator of that channel
  • a moderator can add other moderators
  • moderators can whitelist users
  • anyone can join a channel to read messages but for someone to be able to write in a channel, they need to either be whitelisted by a moderator, or burn a certain threshold of SNT to join that channel
  • moderators can also revoke whitelisted users (i.e a kick/ban)
  • moderators can set/adjust the needed threshold of SNT to burn for someone to join that channel

Under the hood
We implemented a smart contract to manage channels & users and deployed it to the XDAI chain.

The Desktop client was then modified to have a concurrent connection to the XDai, We added a new type of channel to the desktop client called “moderated chats”, these are chats that start with the prefix “#moderated-” and are recognized by the client as moderated chats. The client will query the contract in the sidechain and verify that incoming messages are authorized to write, and ignore these messages if they are not.

If a user is a moderator of channel they will be able to whitelist or blacklist users on that channel given their chatkey.

If a user has not joined a channel, the input box is disabled and the user can join that channel by clicking a button to join and burning the set amount of SNT

Further explorations

  • “choose-your-moderators”: so users can choose what group of moderators they will follow
  • this implemented in the node / protocol level: i.e besides the client level, this could also be done at the node level.
  • another layer: register a group of channels (i.e a la your own discord/slack server)
  • include channel thumbnails/images, description, etc…

Bonus
SNT is now available on the xDai chain at 0x044F6ae3aEF34fdB8FdDc7c05F9cC17F19Acd516. You can jump in the sidechain by using the Omnibridge
XSNT
Omnibridge

Team

  • Andrea Franz
  • Iuri Matias
  • Jonathan Rainville
  • Richard Ramos

Code and Builds

You can get the builds here https://github.com/status-im/nim-status-client/releases/tag/buidl.1

You can check the code here https://github.com/status-im/nim-status-client/pull/1191

6 Likes

Cool work, and great project.

Does this mean that the xSNT is available for other applications? Is this main net ready?

Yes. xSNT is available for use in any application. You can see it in the list of bridged tokens here: https://blockscout.com/poa/xdai/bridged-tokens.

To move your SNT from mainnet to xDAI, you can use the Omnibridge extension here: https://xdai-omnibridge.web.app/ .