Push Notifications For Web3
Push Notifications are a crucial part of any dApp (or protocol) that wants to re-engage their users. It becomes more crucial for Web3 as users are anonymous wallet addresses (akin to web3 usernames) and you need a direct communication link between them and your protocol.
Push protocol solves this issue by providing the communication middleware that your dApp, smart contract, protocol or backend can use to seamlessly reach those users.
Who can Send Notifications?β
As per the current design of the protocol, these are the main actors who can send notifications:
- Channel Owners: The owners of a particular channel can send notifications to their subscribers.
- Channel Delegates: Channel owners can allow any particular wallet address to send notifications on behalf of their channel.
Sending notifications is a gasless transaction and therefore notification senders need not pay any gas fee while sending notifications via the Dapp.
Gas Fees are only applicable when on-chain notifications are triggered directly from smart contracts.
What are Channels?β
Any protocol that activates itself on Push protocol is known as a channel and gains the capability of sending notifications. The creation of a channel is a one-time process. Channel creation happens on the Ethereum blockchain and any other chains you want the channel to be.
Note: One wallet address can only create one channel only the protocol.
Although channel creation only happens on the Ethereum blockchain, the protocol is designed to be chain-agnostic, i.e., channel owners can choose to send notification on any chain of their choice and not just Ethereum network
This is acheived by setting up a Channel alias π
What is a Channel Alias?β
In order to enable your channel to be blockchain-agnostic and allow multi-chain communication, you need to setup a Channel alias. This enables your channel to send notifications on any other blockchain. In simpler terms, a channel alias address is a native representation of your Ethereum channel on any other EVM or Non-EVM chain through which you wish to communicate with your subscribers.
You can communicate with your subscribers on Polygon, BSC, Solana, etc. using an alias address that is compatible with that respective blockchain. Follow how to set-up a alias for your channel for step by step instructions.
What are Channel Delegates?β
Channel Delegates are additional wallets that the channel creators have authorised to send notifications on the channels behalf. They are extremely useful to expand on sending notification capabilities and helps in ensuring an additional level of security besides enabling multiple wallets to send notifications on your behalf.
Types of Notifications?β
Below listed are the different types of notifications you can send to the subscribers of your channel on Push protocol.
- Broadcast Notifications: This type of notification is broadcasted or sent to all the subscribers of a channel at once.
- Targeted Notifications: This type of notification is sent to a single wallet address.
- Subset Notifications: This type of notification is sent to a a subset (or a group) of your channel subscribers.
What are Delegated Notifications?β
Delegated notifications is a feature that allows channel owners to delegate their power of sending notifications to any other wallet address or multiple wallets of their choice.
Once approved by the channel owner, a wallet address can send notifications on behalf of the channel to its subscribers. The channel owner can, however, revoke the approval at any given time.
This mechanism of sending delegated notifications is quite effective in providing value-added services to the channels. It also ensures the availability of mechanisms that can be used by Push protocol or any other third-party infrastructure to send on-chain notifications on the channelβs behalf.
Adding a delegate notification sender doesn't remove the ability of the channel maintainer to send notifications.
They can keep on sending notifications as well as the delegate notification sender which will always be shown as coming from the same channel.
Designing Notification Content?β
Push Protocol enables you to send rich-media-enabled notifications and add suitable details to make them as engaging and useful as possible. Here is a quick dive into all the interesting stuff that you can send in a notification.