Revealing Data in Ethereum Smart Contracts

Revealing Data in Ethereum Smart Contracts

VulcanizeDB

Web3

Challenge

Vulcanize sought to create an efficient solution that empowers users to query activity stored on a blockchain and gain a global view of overall activity.

Solution

We partnered with Vulcanize to develop an open source data indexing and availability tool for Ethereum that syncs, transforms, and stores smart contract events and storage updates in a relational database.

Result

Users can perform cryptographically verifiable and fast relational queries on blockchain data and monitor smart contract systems in production.

VulcanizeDB helps you understand what’s actually happening on Ethereum smart contracts.

Smart contract data is self-contained and stored in a way that is optimized for building blocks, not reading data. That means it's extremely difficult to gain a global view of activities on a blockchain smart contract system, and attempting to query this data is costly and slow. Efficient storage is the only way a blockchain can create a verifiable record of transactions with validation that's self-contained, without requiring any trusted third party to validate.

VulcanizeDB allows users to approach smart contract data with relational database Postgres. By ingesting live blockchain data and exposing it in an approachable toolset, users can observe and interact with Ethereum smart contracts in a direct way.

Building a Suite of Tools

8th Light partnered with Vulcanize to create a suite of Golang tools and libraries for extracting, decoding, and transforming EVM smart contract data.

The toolsuite has four main components:

  1. A custom patch (or fork) of Geth, the main Ethereum client, which exposes the low-level state change data across smart contracts. As part of this work, we maintained a fork of the go-ethereum client enabling subscriptions to smart contract storage changes.

  2. A DSL and data transformation tool for processing and transforming smart contract data — both events and storage changes — into a legible format.

  3. Postgres data store.

  4. GraphQL API layer.

By exposing the data using Postgres and Postgraphile, users can write complex queries that are performant and verifiable, using tools that are familiar and trusted.

We continued building out these tools for several years with Maker, creators of the DAI decentralized stablecoin. We created a forked version of the database, providing an application-specific indexer that is more closely tailored for their implementation. Maker used these tools to power their liquidation monitoring, internal monitoring, internal UI, and more bespoke tools.

Empowering Ethereum Users

What differentiates VulcanizeDB from other smart contract data indexing tools on the market is that its data is cryptographically verifiable. Other tools, like Graph, listen to and index event logs. However, event logs only display what the smart contract developers intended to share, and are not cryptographically verifiable.

Because VulcanizeDB accesses both events and storage changes, it's able to provide verifiable results that don't rely on event logs written specifically in smart contracts. It is a truly trustless solution for a trustless ecosystem.

The research work conducted for this project served as the foundation for ongoing work under the name Laconic. Laconic is a more general tool, agnostic to application and protocol implementations. The original VulcanizeDB tooling was used to build a new API in TypeScript, which will be more robust and easier to maintain in the long term.

Let’s work together

Get in touch

Get in touch