We'd think that decentralized exchanges are just the same as centralized exchanges in terms of functional purposes which are
- trading
- storing crypto assets
However, the second item is not readily apparent on decentralized exchanges. Uniswap, for example, doesn't act as custodian of your crypto to just hold it there on the Uniswap exchange. Or does it?
All I could think is that the decentralized equivalent of storing assets on centralized exchanges are the liquidity pools made by decentralized exchange participants. Is this the correct analogy to explain how the second item is represented in DeFi?
If so, how to properly cement the analogy, given that liquidity pools are in many ways a cloud representation of many participants' holdings floating in thin air, in many ways very abstract and loosely defined. The concept still doesn't square up with the metaphysical act of storing holdings as would be done on centralized exchanges
geth
client will have all the transactions, you simply get all transactions of a block, and check theTo
address, if it isnil
, then a new contract was deployed. To get the code of the contract you callgetCode()
function. And to read all the storage of the contract you need to usetrie
package ofgo-ethereum
, you can iterate through contract storage with iterator functions and check its content, the are posts in Medium on how to do this, just google "merkle trie ethereum"