原文标题:《 Buidler DAO:Push Protocol 如何填补 web3 通信空白 》
原文作者:JasonChen、Rui,Buidler DAO
01/ preface
02/ Name and location changes
03/ Why do you need decentralized communication protocols
04/ Comparison between Web2 and PUSH message push logic
05/ Protocol architecture: Users, channels, subscribers
06/ How to integrate PUSH Protocol
07/ Important future development direction
Push Protocol is a decentralized communication protocol for Web3. It enables any smart contract, dApp or even traditional service to send notifications to the wallet address, provided that the wallet address chooses to receive messages from these channels. It can be applied to the whole scenario of Web3. The company has sent 17.7 million messages to 60,000 subscribers, including DeFi's asset liquidation, ens' domain name expiration and media news feeds, making it the head of the decentralized communication circuit.
The name of PUSH before September 2022 is EPNS, which means "Ethereum message notification service" in Chinese. From the name, we can see that it was targeted at Ethereum projects before that, and at that time, it positioned itself as a service rather than a protocol, so the old name was broken down into three parts: Ethereum, notifications and services, and the new name breaks all three. As it starts to support other chains like Polygon, it will break through Ethereum to other L1 and L2, and the application scenario is not limited to notifications, but all notifications. Finally, because it supports multiple chains and scenarios, it is no longer a specific service but a Protocol. Therefore, continuing to call EPNS will limit its business and brand, so it is renamed Push Protocol.
Message push has been integrated into all aspects of traditional Web2, from IM chat, to news, to all kinds of marketing information, notification tips and so on. Both application scenarios and technology have been very mature, but in Web3, people rarely use Dapp with message push capability. Most notification requirements are addressed by mail for the following reasons:
At present, most DApps are in the form of web pages on PC, and the development of mobile terminals is extremely slow. Because message push is instantaneous, the lack of mobile terminals restricts the development of message push scenes. On the other hand, Web2 was not widely used until the emergence of mobile Internet.
The Web3 infrastructure layer's push is really a growth basket right now, and you don't see a lot of mature solutions.
Even so, Web3 still has a large number of scenarios that require message Push, such as DeFi price change, vote result notification, etc., and social Protocol products such as Lens Protocol also integrate Push Protocol, because there are also a large number of notification scenarios for users' attention and likes. Every time a new article is published on the CoinDesk blog, users will receive a notification, so as to quickly understand the industry trends. Therefore, with the development of Web3, the scene of news push will be more and more.
Everyone's mobile phone will receive a lot of messages sent to you by apps every day, including friends' messages from social software, headlines from news media, discounts from e-commerce platforms and so on. How do they achieve this? The following figure shows the process of sending messages to your mobile phone by APP in iPhone. The core is Apple Push Notification Service (APNS), which is divided into three stages:
Phase 1: The upstream project party packages the message to be sent with the iPhone ID to be received and sends it to APNS.
Stage 2: APNS looks for an iPhone with the corresponding ID in the list of iphones registered for Push service and sends the message to the iPhone.
Phase 3: The iPhone passes the message to the application and pops up a Push notification as set.
The following figure shows the principle of Push Protocol. In fact, it can be found that the structure is consistent with Web2 APNS. The top three types of dapp, server and smart contract are in the input layer, which is the source of message generation. The internal node listens for events in the protocol smart contract and forwards the message to the appropriate recipient.
In short, it can be understood that upstream contracts, back-end services, etc. can bury a piece of EPNS code in the place where the message needs to be pushed, and then Push Protocol will send the message to the corresponding address. Of course, you must also have a front-end in the downstream to receive and display the message. As the Protocol layer, Push Protocol is only responsible for the message distribution process. Of course, for the convenience of users, Push Protocol also makes a message box in the form of a plug-in, and the messages received by users through Push Protocol will be displayed inside.
There are three main concepts in Push Protocol: user, channel, and subscriber.
User: refers to all entities in EPNS, including contracts, wallets, people, etc
Channel: A message sender registered with Push Protocol. Users need to subscribe to a channel to receive messages
Subscriber: A user who initiates a subscription
As shown in the figure below, when I open the operation platform of Push Protocol and click on the right side of channels column, many channels will appear. These channels are the message sender created by the user.
When I join a channel, I need to sign as a subscriber of the channel. After signing the signature, the messages generated in the channel will be sent to my wallet address. Users can cancel the subscription at any time, so users have the absolute right to obtain messages without worrying about being spam messages. Pay in ETH or DAI, which can also prevent spam messages to a certain extent.
We can see that there is a lot of diversity in the channel now, not only almost most of the mainstream Web3 products and protocols such as Snapshot and MakerDAO, but also serialized novels, so the imagination of Push Protocol application scenarios is very large.
需要质押 50 $PUSH 才可以申请成为频道,其中 10 $PUSH 用于创建合约的协议费用,其余的 Token 会存储在频道所有者的合约池中,一旦频道停用池子中的Token将返还。
Channels can send 3 message types, broadcast notification, clove notification, and subset notification.
Broadcast notification: Send a message to all subscribers of the channel at once
Targeted notifications: Can be sent to specific wallet addresses, provided, of course, that they subscribe to the channel
Subset Notification: A variant of targeted notification that notifies a set of subscribers
Push Protocol supports sending messages through smart contracts, PUSH dApp, and SDK. Take smart contracts as an example. First, import the IPUSHCommInterface contract interface.
And define the address of the channel, each channel created by a user will be assigned a channel address, and then set the receiver address, you can specify certain subscription addresses, or you can set it directly to broadcast mode where all subscribers will receive it.
This allows a message content to be triggered when your contract code is executed at the appropriate location, and the content is relayed by a node of Push Protocol. After the message is sent, the downstream needs to receive the message and then display it. There are three modes of receiving Push Protocol.
The message data format is as follows, including the message receiving address, message content, and message type.
In addition, Push Protocol also makes its own Web3 native chat software, as shown in the figure below, which can realize the sending of text, expression and attachment. In addition, this chat capability supports SDK integration, and any dapp can have the native Web3 chat function after access.
PUSH allows all Dapps, smart contracts, backends, protocols, and even any distributed technology to communicate directly with the user's wallet address. PUSH partners are currently involved in a variety of important areas:
DeFi sends transaction-related information through PUSH: Decentralized financial activity has always been the mainstay of Web3. PUSH scenarios can be used: send some user education and keep abreast of the latest updates and pools during the daily state; In emergency situations, such as when a loan or collateral is close to liquidation, they need to use PUSH to remind their users to take action. When participating in the activity, users can be reminded about the changes in the prize pool, as well as the award situation.
DAO organizations use PUSH for governance and voting: Decentralized autonomous organizations often need a large number of proposals, votes, and announcements in their daily lives. However, the current situation of using a platform like Discord is that people block or ignore important information. Using PUSH can remind users to participate in DAO governance end-to-end.
GameFi uses PUSH to motivate users: there is a direct communication between the player and the platform, and all NFT drops, rewards, and upgrades can be notified through PUSH to motivate users and encourage retention.
Data analysis protocol combined with PUSH to inform users more timely: There are a large number of Web3 data analysis protocols on the market. By combining PUSH, users can directly customize their own needs, such as tracking a certain NFT trading volume on the aggregate trading platform, reading sushiswap's swap and pairing, notifizing when a certain nft floor price drops, etc.
In summary, there may be a place for PUSH in any important ToC area, such as the need for real-time notification of progress when a legal agreement is signed, the need to notify users in the first instance when a trading platform goes down, the fact that the results of security contract audits can be broadcast directly to the community, and so on.
After two years of development, Push Protocol has become the head project of the message push circuit, and also become an indispensable important infrastructure in the Web3 industry. In the future, we hope to see PUSH develop in end-to-end communication across chains, and Buidler DAO will help it flourish in Web3 communication.
Original link
Welcome to join the official BlockBeats community:
Telegram Subscription Group: https://t.me/theblockbeats
Telegram Discussion Group: https://t.me/BlockBeats_App
Official Twitter Account: https://twitter.com/BlockBeatsAsia