3 Comments

Hey great read. Just a question. When you say- "On a blockchain, the current state is never explicitly represented because only transactions are stored. In other words, there’s no record saying “Bob currently at this moment has $x.”" what do you mean? I mean how do the various wallets show the user's current balance then? A follow up question is does accessing the state each time count as a transaction bc then that would be very costly and not using the blockchain for such a task would make a lot of sense.

Expand full comment
author

Hi! Great question.

The likely way that various wallets show the user's current balance is that they use an API like https://alchemy.com.

But then, of course, how does Alchemy get this info? Alchemy actually runs their own nodes (things that write transactions to the blockchain), which means they're part of the decentralized system. They then expose the information through an API for anybody to use.

Accessing the state does not count as a transaction! Again, you can just use an api like Alchemy to get the state. Typically, write operations can be expensive but reads are generally pretty cheap through an API. (it would be expensive if you wanted to run your own node).

Let me know if that makes sense. Cheers!

Expand full comment

yes it does! thanks

Expand full comment