Visualizing Gitcoin Votes with Splunk’s Web3 Indexer

Janice Ng
Splunk DLT
Published in
5 min readMay 20, 2022

Gitcoin is an online community specializing in building and funding public goods. Gitcoin is managed by a decentralized autonomous organization (DAO) which makes proposals and takes action by a community through votes. You can learn more about Gitcoin’s mission here and start participating in bounties and hackathons with gitcoin.co.

Our team, the Blockchain Team at Splunk, has identified a way to understand the process of how Gitcoin performs votes on-chain.

First, we looked for the Gitcoin contract and its ABI, which identifies the contract as 0xDbD27635A534A3d3169Ef0498beB56Fb9c937489 (refer to: Etherscan). In the events tab, an interesting event: Vote Cast can be seen.

With Splunk, using the search in Figure 1, it shows all events VoteCast in the contract has been associated with in the last 2 months.

Figure 1: VoteCast Events

In Figure 2, it can be seen that 135 votes took place in the last 2 months. For this transaction event that reflects one particular vote, the event has parameters of:

  • The proposal number: 23
  • If the voter is voting in favor: True
  • Number of coins cast for this proposal: 3029636799745066202711
Figure 2: Transaction Event

More interesting and specific questions can now be answered. First, what is the voting power engaged in those votes — how many total shares do we see?

The sum of all votes are shown in this proposal through this search:

Figure 3: Sum of All Votes

Second, how many voters participated in these votes?

It can be seen, in Figure 4, that there’s a significant increase for proposal 22, but how do we know if the proposal was rejected or accepted? And do we know how many votes were against or for the proposal? Look at Figure 5.

Figure 4: Voters Participation for Proposals
Figure 5: Votes Casted

From Figure 6, we can see how much people voted for. As in, how many coins each person committed to their vote? It can be seen that the majority committed less than 102 coins to vote, while some varied at ~450 coins.

Figure 6: Coins Committed to Vote

However, it can be seen in Figure 7, that some individuals voted but did not assign any shares to the vote, becoming signal voters. In Figure 8, it can be seen the number of signal voters for each proposal.

Figure 7: Signal Voters
Figure 8: Total Signal Voters

With this, a dashboard (Figure 9) on Splunk can compile all the data and searches to be shared with everyone. This visualization will be able to catch information in real-time going forward.

Figure 9: Dashboard Compilation of Searches

However, there is more that you can do to answer the leftover questions. Like, what is the cost of running all these votes? What should the budget be for those? From this, we can:

  • Find all transactions with a transaction event of VoteCast
  • Capture their gas cost and gas price
  • Multiply by the price of ethereum in USD at the time
  • Sum up by vote
  • Render the cost of each vote in a neat table.

Ethereum contains 2 types of ledger records, one that records transactions and another that contains the events in a transaction. In order to calculate fees, the data must be put together. Here’s how we do that in Splunk:

First, get all the transaction events for Gitcoin VoteCast events:

Then, get all the transactions for those events and join the two together into a single dataset:

This joins the transaction events and the transactions for our contract and the event VoteCast. Now we’re ready to do some renaming and a little simple mathto capture gas used and gas price:

From this, we can continue to calculate the Eth for each transaction, the block number and the current vote.

Now, we have the Ethereum cost of each of those transactions. To see the price, the price of Ethereum in USD at the time must be multiplied by the amount of Eth. To do so, we use the price feed of ETH / USD by Chainlink, which is ingested into Splunk. In addition, we know that the gas price is in Wei, as an 18th decimal of an eth. We will divide our result by 10¹⁸ as a result. Here’s the completed search:

All done! We can add a bit more to sum up by vote:

Finally, in Figure 10, we can see the cost for running all these votes for each proposal. Here are our results:

Figure 10: Final Voting Costs

Using Splunk’s Web3 Index, all your questions about a DAO’s voting and costs can be answered, which can be visualized through a customized dashboard.

What questions were we unable to get to that you’d like to know? Get in touch with our team and answer them, contact us at: blockchain@splunk.com.

Join our Discord Server for more information and access to our Web3 Indexer.

Follow our Twitter: @splunkweb3

--

--

Janice Ng
Splunk DLT

Product Manager @ Splunk’s Blockchain Team.