aragon / nest

A grants program to support the development of the ecosystem
https://aragon.org/project/grants
Creative Commons Zero v1.0 Universal
140 stars 78 forks source link

Aragon Nest Proposal: Webhooks for blockchain #28

Closed moodysalem closed 6 years ago

moodysalem commented 6 years ago

Aragon Nest Proposal: Webhooks for blockchain

Abstract

Getting events off the blockchain is not easy. Developers today have to run an Ethereum node and poll the node for new data. This requires two pieces of infrastructure-a fleet of Ethereum nodes to receive new blocks, and a server that is reliably receiving events from these nodes for events. Developers also have to consider how to handle chain reorganizations when listening for events to turn the new blocks into actions in their service. In addition, they have to handle decoding the transactions and logs based on contract ABIs.

Infura solves part of the problem but still requires a developer to poll an Ethereum node and parse events. An event-driven interface, e.g. webhooks, is the ideal solution. Developers would only have to build a familiar centralized architecture for handling blockchain events and would not have to parse transactions and logs coming from the blockchain.

Deliverables

  1. Deployed to mainnet, maintaining with TP99 5 minute delay for 1 month
  2. Deployed to testnets Ropsten, Kovan, Rinkeby with TP99 of 5 minute delay for 1 month
  3. Support event decoding and transaction data decoding
  4. (Optional) Support private consortium networks
  5. Support Bitcoin events
  6. Integrate with Zapier and IFTTT
  7. Implement consumption based billing

Grant size

TBD

Application requirements

Development timeline

  1. May 2018
  2. Jun 2018
  3. Jul 2018
  4. Aug 2018
  5. Aug 2018
  6. Aug-Sep 2018
  7. Sep 2018
luisivan commented 6 years ago

Hey @moodysalem, thanks for the proposal. I got a question: how does this improve/change the life of a dapp developer? I see this would be beneficial for plugging the decentralized web into the traditional web architecture, but how does it help a purely decentralized stack? Event snapshotting is a huge issue with dapp developers, but as far as I understand this wouldn't solve it for pure dapps, but for centralized services consuming blockchain events.

moodysalem commented 6 years ago

Hey @luisivan When you're building a dapp it's often useful to build an API in addition to your smart contracts that indexes data from the blockchain and makes it easier to search and consume. For example, CryptoKitties has an API that generates and stores kitty metadata and makes it searchable for their marketplace.

The same developers are often writing both decentralized apps and centralized apps to work with the smart contracts, and it's not easy to reliably pull data from the blockchain into the centralized app, or create notifications related to your decentralized app.

For a purely decentralized stack, this is still useful. One of our plans is to create a smart contract that you can call from your own smart contracts to create subscriptions. So a user might enter their e-mail address or phone number, that information would be encrypted for the consumption by your service while the webhook URL is encrypted for the notification service, and then you can have a serverless API (using something like AWS Lambda and API Gateway) that is listening for events to send notifications to the users. In this way you can send notifications to your users in response to blockchain events without owning any infrastructure.

mariapao commented 6 years ago

Hi @moodysalem thanks a lot for submitting the proposal. After internal consideration we have decided not to approve the proposal as we don't see it fits with the program. Right now we are focused on funding the development of basic tooling and use cases for the decentralized world first.

Thanks again for your participation, we appreciate it very much! And if in the future you have a new idea or you are working on something that is a fit for the program, do not hesitate to apply again :)