Inside an Ethereum Transaction

<p>When you send ETH to a friend, or exchange tokens on Uniswap, or even participate in a DAO vote, various things happen in the background to make it all possible. To better understand that process, it&rsquo;s important to remember how the&nbsp;<a href="https://banklesspublishing.com/ethereum-virtual-machine-basics/" rel="noopener ugc nofollow" target="_blank">Ethereum network</a>&nbsp;operates. The Ethereum blockchain is a distributed state machine, which means that every node in the Ethereum network maintains an up-to-date state of all the accounts.</p> <h1>What Happens When You Send 1 ETH to a Friend?</h1> <p>Let&rsquo;s say I hold 3 ETH and I want to send 1 ETH to my friend Anne. Once my transaction is complete, the state of my account will reduce by 1 ETH and Anne&rsquo;s account will show 1 ETH.</p> <p><img alt="Example of a blockchain’s state pre- and post-transaction." src="https://miro.medium.com/v2/resize:fit:700/0*qKs4BDvP6kQAMgvh" style="height:386px; width:700px" /></p> <p>Example of a blockchain&rsquo;s state pre- and post-transaction</p> <p>As shown above, the state of both our accounts is updated in the subsequent block once the transaction is complete. If this transaction were to fail, there would not be any state change. A&nbsp;<em>successful</em>&nbsp;transaction just updates the state of the blockchain. It&rsquo;s very common to think that ETH actually flows between accounts, but this is not the case. In our example, one account is debited and the next is credited. This is made possible by the transaction.</p> <p><a href="https://medium.com/bankless-dao/inside-an-ethereum-transaction-db3856cff539"><strong>Read More</strong></a></p>
Tags: Ethereum