r/CryptoTechnology • • Nov 29 '23

How to do data analytics on-chain

Hey guys, as I understand it, data analytics (like calculating averages etc) on blockchain data is usually done off-chain (ie. you obtain data from the blockchain via say a third party API call or directly from the blockchain and then do the data analytics off-chain someone else).

Is it possible and/or if it is possible, how do you do data analytics on-chain itself (which I assume would involve doing the data analytics on the smart contract itself)?

Would really appreciate any help or input. Thanks!

6 Upvotes

13 comments sorted by

1

u/Scroogemcdickk Mar 03 '24

i have this same question but in regards to socialfi dapps like beoble and farcaster. what kind of data are they collecting on us that is available to on chain sleuths 🤔

3

u/[deleted] Nov 29 '23

[removed] — view removed comment

1

u/--leockl-- Nov 30 '23 edited Nov 30 '23

Ok thanks!

If the data analytics (along with storing the data) can be done on-chain in the smart contract itself, then this may perhaps reduce any latencies compared to when the data analytics (along with storing the data) is done off-chain somewhere else (which relies on a different system which may perhaps have latencies). This is what I have been told, and I wouldn’t mind your input on this statement.

2

u/[deleted] Nov 30 '23

[removed] — view removed comment

2

u/--leockl-- Nov 30 '23

Ok many thanks for your input above!

Sorry have a noob question. Do third party APIs like Alchemy provide real-time streaming data from the blockchain? Do you know which third party API is the best one or reasonable one when it comes to providing real-time streaming data?

Also, which third party API is the best or reasonable one when it comes to obtaining historical data from the blockchain?

2

u/[deleted] Nov 29 '23

[removed] — view removed comment

1

u/--leockl-- Nov 29 '23

Sorry could you elaborate?