Skip to content

BUIDL week - Moderated channels build

Pre-release
Pre-release
Compare
Choose a tag to compare
@jrainville jrainville released this 15 Oct 14:23

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 choose to 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

Team

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