ETHWarsaw 2024

ETHWarsaw 2024

Blockchain Storage - The Ultimate Source of Truth for Analytics
2024-09-05 , Vistula stage

Storage diffs are the unsung heroes of the EVM compliant blockchains. They ensure all nodes agree on the current blockchain state, enabling smart contracts to function correctly, saving resources, and enhancing security by detecting unauthorised changes. Obtaining storage diffs is a complex task that demands considerable computational resources, making it less accessible to the average consumer. In the current state of web3 analytics, we are hamstrung as we're unable to reconstruct and thus understand exactly what is happening on chain without this critical component.
At the same time, they are incredibly difficult to decode making the information they hold not available to the majority of the network users. If you want to know the value at a specific memory location, you can use web3's getStorageAt function. However, when it comes to tracking storage changes within a block, it's a challenge. You typically only see the values before and after the entire block, which is less than ideal. To make matters more difficult, many memory locations are calculated as hashes of slots and keys, making it difficult to iterate over hash-maps without knowing the key in advance.
Token Flow has been working on making using storage easier. This presentation explains how to do analytics without having to rely on calls and events alone.

Co-Founder & Chief Data Officer at Token Flow. Ex-MakerDAO, analyst with 20 yrs of experience.