Notiboy: A decentralized notification service on Algorand

Vidhyanand CS
5 min readAug 22, 2022

--

Img 1.0 Notiboy

Notiboy is a notification system on algorand blockchain which will help the decentralized applications (dApps) to send notifications to their users in a censorship resistant and decentralized way based on on-chain and off-chain events. Events include but not limited to liquidation warning, NFT offers, DAO governance and voting remainders, on-chain lottery updates etc…

Why Algorand?

Algorand is based on Pure Proof of Stake consensus mechanism which allows it to be decentralized, secure and scalable at the same time. Its low cost of transaction and instant finality(4.5 sec) will make sure that we can store notifications natively in the blockchain (rather than using other decentralized storage platforms like IPFS).

Channel

A channel is the basic building block of the notification system. Each channel is a contract account smart signature that has to be created by the dApp/owner address after opting into the smart contract which holds the list of channel name and creator address as key value pairs.

Notifications

Personal Notifications are user specific notification that may be related to the user’s interaction with the dApp. They are stored as key-value pairs in the local state of the user address and as of now is limited to 16 notifications (latest one notification from each of the 16 channels).

One example for a personal notification will be an offer made by a community member for the NFT that is placed on sale by the user. The marketplace can send a personal notification to the user informing him/her about this event.

Another example for personal notification is liquidation warning for an investor. If the user has to add more liquidity (when price of a token falls) for a stable coin pool, the notifications have to be sent personally to the user on which they can take necessary action.

We feel that importance of personal notification will increase as the number of dApps on algorand grows to a huge number that the user cannot connect to each app and check for the status.

Public Notifications are common information that are sent to all the community members from the sender. They are stored as key-value pairs in local state of contract smart signature.

Some of the examples of public notification are updates to the dApp, new features added to the application,Governance voting results, NFT drops etc…

What we have built?

We have built a proof of concept of this application which consist of these functionalities for a user.

  1. Creating a channel
  2. Sending Personal Notification
  3. Sending Public Notification
  4. Receiving Personal Notification
  5. List of Channels
  6. Receiving Public Notification

Let use see how it is done

  1. Creating a channel
Img 1.1 Channel Creation

To create a channel the dApp has to connect via MyAlgo wallet and type a channel name and click create channel button.

2. Sending Personal Notification

Img 1.2 Sending Personal Notification

To send a personal notification the sender has to select the channel from the list of channels and provide the address to which the personal notification has to be send. The sender also need to type the notification and click Send Notification button to authorize the transaction.

3. Sending Public Notification

Img 1.3 Sending Public Notification

To send a public notification the sender has to select the channel from the list of channels and type the notification and click Send Notification button to authorize the transaction.

4. Receiving Personal Notification

Img 1.4 Receiving Personal Notification

The Notibox tab will show all the personal notifications sent to the specific user address.

5. List of Channels

Img 1.5 List of channels

This provides the list of channels created by all the channel owner addresses. A user has to opt-in to the smart contract to start receiving the notifications(both public and private).

6. Receiving Public Notification

Public notifications can be received by clicking on the channels from the list of channels (Img 1.5).

Limitations

As of now the personal notifications are limited to 16 because of the limitation in the number of key-value pairs stored in the local state of an address. Also the first 16 channels that start sending personal notifications to an address will only be able to send notifications until the user removes a channel from the list.

Due to limitations in the storage space of smart contract we are not able to map a channel status (opt-in or opt-out) to each user. So when a user opt-in to the smart contract all the channels will be able to send notifications to the user.

Future Updates

We would like to use Memory Boxes feature of Algorand (update coming soon) to map channel status to each user. This will allow the user to opt-in and opt-out of a particular channel and thus receive notifications only from channels that they have opted-in. We would also like to increase the number of personal notifications that can be sent from each channel to a user before the oldest notification get replaced in the memory.

We are also planning to publish a JavaScript SDK that can be integrated into the dApps and webpages of NFT creators so that they can send notifications and receive notifications without depending upon our user interface.

Useful Links

User interface
Smart contract
Twitter

--

--

Vidhyanand CS

Co-founder of Securecerts Technologies, JS Enthusiast, Loves Blockchain