Tutorial 3: NMR vs LPT Daily comparison

Let's build a bar chart to compare the daily transaction volume between Livepeer token (LPT) and Numerai token (NRM).

Step1: Use Filter to find transactions which contain logs with name called "Transfer" and address of both tokens.

Many smart contracts have a log called Transfer (but with different parameters). Make sure you choose Transfer(from, to, value). If you are familiar with the raw data on Ethereum, the hash (also known as methodId) of Transfer(from, to, value) is: ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef

Step2: Since each transaction could contain many different token transactions, it means each transaction could have multiple Transfer logs which belong to the same or different tokens. To make our life easier, use Project to get rid of token transactions which are not from Livepeer or Numerai.

Don't forget to carry over blockTimestamp field with "blockTimestamp=Display" since it's not included in the above screenshot due to my screen size. We will need it in the next step.

At this point, we have made sure that each transaction from now on will only have Numerai and Livepeer token "Transfer" logs.

Step3: Use Project and the operator "arraySize" to count how many token transfers per transactions. A transaction could contain more than one Livepeer token transfer or Numerai token transfer.

At this point, we are 100% certain that we have factored in all the possible scenarios. Now let's group!

Step4: Use Group to do the final touch. Group by "blockTimestamp" and set the interval to "daily".

Step5: Choose the bar chart and assign the right fields to both x and y axis. And that's it!

Seems like lots of steps, right? Well, as you get better, you will be able to combine Step2, 3 and 4 into one Group step like below:

One day, you will get there!

Last updated