A Detailed Explanation of the Decentralized Communication Protocol Push Protocol
Original Title: "Buidler DAO: How Push Protocol Fills the Communication Gap in Web3"
Authors: JasonChen, Rui, Buidler DAO
Introduction
Push Protocol is a decentralized communication protocol for Web3 that allows any smart contract, dApp, or even traditional services to send notifications to wallet addresses, provided that these wallet addresses choose to receive messages from these channels. It can be applied in all scenarios of Web3, including asset liquidation in DeFi, domain expiration in ENS, and media news push notifications. Currently, it has sent 17.7 million messages to 60,000 subscribers, making it a leading project in the decentralized communication space.
Change of Name and Positioning
Before September 2022, PUSH was called EPNS, which stands for "Ethereum Push Notification Service" in Chinese. From the name, we can see that it was previously focused on Ethereum, and at that time, it positioned itself as a service rather than a protocol. The old name can be broken down into three parts: Ethereum, message notification, and service. The new name breaks these three parts, as it begins to support other chains like Polygon, it will expand from Ethereum to other L1 and L2. Furthermore, the application scenarios are not limited to notifications but encompass all message-pushing scenarios. Lastly, because it supports multiple chains and scenarios, it is no longer a specific service but has become a protocol. Therefore, continuing to call it EPNS would limit its business and brand, leading to the renaming to Push Protocol.
Why a Decentralized Communication Protocol is Needed
Message pushing has permeated every aspect of traditional Web2, from IM chats to news and various marketing messages and notifications. Both in application scenarios and technology, it has become very mature. However, in Web3, there are very few Dapps with message-pushing capabilities, and most notification needs are resolved through email. The main reasons are:
- Currently, most Dapps are in the form of PC web applications, with mobile development being extremely slow. Since message pushing is instantaneous, the lack of mobile support restricts the development of message-pushing scenarios. In contrast, Web2 only saw widespread application of message pushing after the emergence of mobile internet.
- The infrastructure layer of Web3 for message pushing is indeed a development gap, with few mature solutions available.
Even so, Web3 still has a large number of scenarios requiring message pushing, such as price changes in DeFi, voting result notifications, etc. Social protocol products like Lens Protocol have also integrated Push Protocol, as there are numerous notification scenarios arising from user interactions like follows and likes. CoinDesk has also integrated it, notifying users whenever a new article is published on the CoinDesk blog, allowing them to quickly understand industry trends. Therefore, as Web3 develops, the scenarios for message pushing will continue to increase.
Comparison of Web2 and PUSH Message Pushing Logic
Every day, your phone receives many messages from various apps, including friend messages from social software, headline events from news media, discounts from e-commerce platforms, etc. How is this achieved? The following diagram illustrates the process of apps sending messages to your iPhone, with APNS (Apple Push Notification Service) serving as the intermediary, divided into three stages:
Stage 1: The upstream project packages the message to be sent and the receiving iPhone identifier and sends it to APNS.
Stage 2: APNS searches for the corresponding iPhone in the list of registered Push service iPhones and sends the message to the iPhone.
Stage 3: The iPhone passes the incoming message to the application and pops up the Push notification as set.
The following diagram shows the principle of Push Protocol, where the structure is consistent with Web2's APNS. The top layer consists of dapps, servers, and smart contracts, which are at the input layer, the source of message generation. After the message is input into Push Protocol, internal nodes will listen for events in the protocol's smart contracts and relay the messages to the corresponding recipients.
In simple terms, it can be understood that contracts, backend services, etc., can embed a piece of EPNS code where message pushing is needed and input the corresponding message content. Push Protocol will then relay this message to the corresponding address. Of course, you must also have a frontend downstream responsible for receiving and displaying the message. Push Protocol, as the protocol layer, only handles the message distribution process. To facilitate user use, Push Protocol has also created a plugin-style message box, where messages received via Push Protocol will also be displayed.
PUSH Architecture: Users, Channels, Subscribers
In Push Protocol, there are three main concepts: users, channels, and subscribers.
- Users: Refers to all entities in EPNS, including contracts, wallets, individuals, etc.
- Channels: Message senders registered in Push Protocol. Users need to subscribe to a channel to receive corresponding messages.
- Subscribers: Users who have engaged in subscription behavior.
As shown in the diagram below, when I open the Push Protocol console and click on the channels section, many channels will appear on the right. These channels are the message senders created by users.
I can choose to join or exit a channel. When joining, I need to sign to become a subscriber of that channel. After completing the signature, messages generated within the channel will be sent to my wallet address. Users can unsubscribe at any time, so users have absolute control over message acquisition and do not need to worry about being spammed. Additionally, channels must bear costs to send notifications, paid in ETH or DAI, which can help prevent spam messages to some extent.
We can see that the diversity of channels is very strong now, with almost all mainstream Web3 products and protocols like Snapshot, MakerDAO, etc., participating, and even serialized novels have joined. Therefore, the imaginative space for Push Protocol's application scenarios is still very large.
A deposit of 50 $PUSH is required to apply for a channel, of which 10 $PUSH is used for the protocol fee for creating the contract, and the remaining tokens will be stored in the channel owner's contract pool. Once the channel is deactivated, the tokens in the pool will be returned.
Channels can send out three types of messages: broadcast notifications, directed notifications, and subset notifications.
Broadcast Notifications: Send a message to all subscribers of the channel at once.
Directed Notifications: Can be sent to specific wallet addresses, provided they have subscribed to the channel.
Subset Notifications: A variant of directed notifications, notifying a specific group of subscribers.
How to Integrate PUSH Protocol
Push Protocol supports sending messages through various methods, including smart contracts, PUSH dApp, SDK, etc. Taking smart contracts as an example, you first need to import the IPUSHCommInterface contract interface.
Then define the channel address. Each channel created by a user will be assigned a channel address, and then set the receiving address. You can specify certain subscription addresses or set it to broadcast mode, meaning all subscribers will receive it.
When your contract code executes to the corresponding position, it can trigger a message content, which will be relayed by Push Protocol's nodes. After the message is sent out, the downstream needs to receive and display the message. Push Protocol provides three ways to receive messages.
The format of the received message data is as follows, including the message receiving address, message content, type, and other information.
In addition, Push Protocol has also developed its own Web3 native chat software. As shown in the figure below, it can send text, emojis, and attachments, and this chat capability supports SDK integration, allowing any dApp to integrate and have native Web3 chat functionality.
Future Important Development Directions
PUSH allows all dApps, smart contracts, backends, protocols, and even any distributed technology to communicate directly with users' wallet addresses. Currently, PUSH's partners are involved in various important fields:
DeFi sends transaction-related information through PUSH: Decentralized finance activities have always been the mainstay of Web3. Scenarios that can utilize PUSH include: sending user education and updates during normal status; in emergencies, such as when loans or collateral are close to liquidation, PUSH needs to remind users to take action; during events, users can be reminded about changes in prize pools and winning situations.
DAO organizations use PUSH for governance and voting: Decentralized autonomous organizations often require a large number of proposals, votes, and announcements in their daily operations. However, using platforms like Discord often leads to people ignoring or blocking important information. Using PUSH can provide end-to-end reminders for users to participate in DAO governance.
GameFi uses PUSH for user incentives: Players and platforms can communicate directly, and through PUSH, all NFT airdrops, rewards, and upgrade progress can be sent as notifications to incentivize users and encourage retention.
Data analysis protocols combine with PUSH for more timely user notifications: There are many Web3 data analysis protocols on the market. By combining with PUSH, users can directly customize their needs, such as tracking the trading volume of a certain NFT on aggregation trading platforms, reading swaps and pairs from Sushiswap, and receiving notifications when the floor price of a certain NFT drops.
In summary, PUSH may have a place in any important ToC field, such as needing real-time notifications of progress during legal agreement signings, notifying users immediately of exchange collapses, and broadcasting the results of security contract audits directly to the community.
After two years of development, Push Protocol has become a leading project in the message-pushing space and an indispensable important infrastructure in the Web3 industry. In the future, we hope to see PUSH develop in cross-chain end-to-end communication, and Buidler DAO will also support its vigorous growth in Web3 communication.