Connecting DAOs to webhooks

Hey everyone!

We at the MESG Foundation just finished work on the first milestone of the MESG integration with Aragon DAOs and also starting the first iteration of our testnet running on Tendermint.

The goal of the first milestone is to create a backend application connecting Aragon DAOs to a webhook connector. This will include all the core Aragon apps built and maintained by Aragon One, listed here: https://github.com/aragon/aragon-apps.

Here are the results of what we have done:

Architecture
The application has been created using the MESG SDK that we have developed internally. It consists of enabling the flow of data from and to services using processes.

For the Aragon integration, we developed a process that connects an Ethereum service to a Webhook service as follows:


+------------+                                +-------------+
|            |                                |             |
| Aragon DAO |                                |   Webhook   |
|            |                                |             |
+-----+------+                                +------+------+
      |                                              ^
      |                                              |
    listen                                        trigger
      |                                              |
      v                                              |
+------------+                                +-------------+
|            |                                |             |
|  Ethereum  |                                |   Webhook   |
|  services  |                                |   service   |
|            |                                |             |
+-----+------+                                +------+------+
      |                                              ^
      |                                              |
      |                                              |
    event                                          call
      |             +------------------+             |
      |             |                  |             |
      +------------>+     Process      +-------------+
                    |                  |
                    +------------------+


Step-by-step explanation

  1. Multiple MESG Ethereum services are running and actively listening for events from specific applications of an Aragon DAO.
  2. When an Ethereum event is detected, the service emits it to the MESG Engine.
  3. If the event matches a MESG Process, the process gets triggered.
  4. In this case, the process executes the task call of the Webhook service.
  5. The Webhook service creates a HTTP request and executes it.

Demo
Check out the demo video: https://www.youtube.com/watch?v=Mji0ee1l4z8

Source
Check out the source code of this demo and see how to install it on the Github repo: https://github.com/mesg-foundation/aragon

Current limitations:

  • The Ethereum service used has some limitations due to its design. It works only with one specific smart contract. As Aragon DAOs rely on one smart contract per application per DAO, the service has to be deployed multiple times with different configurations. For the next milestones, we will use a generic-purpose Ethereum service that only needs to be deployed once and works with any event of any smart contracts. The process will have to filter the exact events to match.

  • The Ethereum service requires an external provider to connect to Ethereum. We will work on a version that directly integrates geth configured as a light client.

  • The webhook service could used a secret token or to sign the request in order to prove the origin and prevent abuse. I would like to hear your feedback and suggestions on this one.

  • Getting the ABI and smart contract address of the Aragon App is manual. Is there any way to programmatically get the ABI corresponding to the specific version used by a DAO? Can an Aragon application get the address and ABI of other applications within the same DAO?

We’d love to hear your feedback and suggestions! Particularly if this sort of functionality would be useful or needed on other DAO platforms.

We started to work on the next milestone: create an Aragon app that manages the connection between the users’ DAO and the webhook.
While completing this milestone, we will start to run the MESG application on our testnet so we should be able to do a public and live demo.