Eva Beylin
Aug 5 · 6 min read

Hello and welcome to another post in the Subgraph Highlight series, where we deep dive into subgraphs of important and promising Ethereum projects. Today we’re talking about MolochDAO.

Moloch whose mind is pure machinery! Moloch whose data query is decentralized!

MolochDAO

Moloch is a grants DAO (decentralized autonomous organization), made up of community members who have pledged funds to support Ethereum development.

The DAO’s mission is to coordinate decision making on how to spend funds in the best interest of Ethereum, with focus on ETH 2.0 efforts and vital infrastructure.

To date, the Moloch Guild Bank has received over 7,700 ETH (over $1.5M) from more than 70 contributors and provided over $100K in grants.

Members include Vitalik Buterin, Joe Lubin and individuals from the Ethereum Foundation, Consensys, Gnosis, Coinfund, MakerDAO, Connext Network, Pegasys, Grid+, Giveth, Kyokan, Funfair, Decentraland, Darma Capital, Mythos Capital, Concourse Open, Counterfactual, District0x, Gitcoin, Nomic Labs, The Secured Path, Spankchain, Whiteblock and others.

With only 400 lines of code, you can:

  • Be summoned in as a member by existing Moloch members
  • Pledge funds to the Guild Bank and receive voting shares
  • Submit membership and grant proposals
  • Vote on membership and grant proposals
  • Ragequit Moloch to retrieve remaining funds and rescind voting shares

To join Moloch as a voting member, an individual must fill out a questionnaire and find an existing member to sponsor their application. Check out the Summoning Guide to learn more.

Once summoned, a member can participate in governance over how grant funds are spent, by voting on proposals for new members, potential contributors or grants. Members can also submit other membership and grant proposals, approve and process proposals to earn a small reward.

If a member is unhappy with a vote’s outcome or no longer feels aligned with the vision, they can call the ragequit function during the voting grace period to safely exit their funds and revoke voting shares. This is a critical feature of the DAO that mitigates the attack vector of member funds being misappropriated, if they don’t agree with the result of a vote.

For those who’d like to contribute to Moloch but don’t want to participate in DAO governance, the MolochPool contract will be deployed shortly, allowing anybody to donate ETH to Moloch. Coming soon to molochdao.com.

Moloch Grant Proposals

The ability for members to ragequit serves as a strong incentive for collaboration as well as grant vetting. Prior to each grant submission, there has been significant discussion between members on the validity of the proposal, urgency of funding and alignment with Moloch goals.

So far, 93% of grant and membership proposals have passed. Of 19 grant proposals, 16 have received funding; suggesting strong internal coordination.

One of the most prominent proposals was for $20K for BlockX to build a UI for Hopper, a non-custodial Ethereum mixer built by Argent. While the contracts are already live on testnet, a large user base is critical to grow the mixer’s anonymity set. As a result, funding this desktop UI was a priority for Moloch to enable greater accessibility to privacy on Ethereum.

Another major grant was for $30K to ETH2.0 team Lodestar, to prioritize light client research, as well as development of in-browser tooling and ETH1.x migration plans. Lodestar, a team within Chainsafe Systems, is focusing on browser compatible clients and ETH2.0 dev tooling in Typescript and Javascript.

Subgraph Details

Subgraphs are great for indexing data and providing a GraphQL API for easy access by a frontend application. The Moloch UI fetches its data from The Graph and the Moloch Subgraph is now featured on Graph Explorer here!

A subgraph defines how to index data from decentralized data sources like Ethereum. The subgraph manifest describes which data sources to listen to, how that data can be queried with a GraphQL schema, and how to transform that data at ingestion time. Once a subgraph is deployed, a Graph node pulls and maps the appropriate data from Ethereum smart contracts and events.

The Moloch subgraph can be used to access all the data generated from interacting with the Moloch contract. The Guild Bank contract holds the collective tribute funds from all members.

We can use the Playground on the Moloch subgraph details page to run example queries.

Grant Proposals

Here we’re grabbing the five most recent proposals that passed by vote. We do this by sorting by the startingPeriod and setting the where filter to didPass = true.

For each proposal we request the applicant’s ethereum address, details, shares requested, number of tokens offered for tribute, and the number of yes and no votes. Note that the details shown above are stored as JSON strings but they could just as easily be stored as separate Details entities with title and description fields.

Other information you might want to see regarding proposals are:

  • Track the vote status of ongoing proposals
  • Query all past proposals to see which have passed or failed and the number of yes or no votes tallied
  • See how much money has been paid out in grants to date
  • Check a proposal’s starting period; 5 proposals can be submitted a day allowing for a maximum of 35 proposals at once
  • Learn about the applicant and the details of a proposal

Moloch Members

Now let’s check out some of the members in the DAO. We’ll query for the members with the largest number of shares but we’ll filter out members that haven’t voted. We can accomplish that by setting the where filter to only include members where the votes array is not empty.

For each member we want to see their delegate key (Ethereum address authorized to vote on their behalf), the number of shares they own, and how they voted on different proposals. As you can see the member in this query has good taste in voting!

To play around with existing subgraphs visit the Graph Explorer or check out our documentation to learn more.

Do-It-Yourself Subgraph!

The Graph aims to support decentralized applications by providing a complete solution for data querying and indexing.

If you’re a developer, you can deploy your own subgraph to the hosted service (and soon the Hybrid Network!) or run a Graph node yourself. Keep a look out for incentives, like The Graph + Coinlist hackathon where the top 10 subgraphs won $1,000 each.

We’re always looking forward to partnering with more protocols and applications! Whether you’ve launched on mainnet or still specing, join the Discord channel to chat about deploying a subgraph and joining The Graph community.

— — -

Follow The Graph on Twitter

Join us on Discord

Join our Telegram group

Subscribe to The Graph’s subreddit

We’re hiring!

The Graph

The Graph is a query protocol for Ethereum and IPFS using GraphQL. https://thegraph.com

Thanks to Yaniv Tal

Eva Beylin

Written by

art, economics & blockchain.

The Graph

The Graph

The Graph is a query protocol for Ethereum and IPFS using GraphQL. https://thegraph.com

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade