<p><em>Hi!</em></p>
<p>Steemit is fun and addictive, yet how many of us are actually familiar with crypto-currencies? I think many of us get very excited about the money we can earn here, but don't really know where it's coming from and how the system actually works. Bet many of you have heard the term 'blockchain'. Today I'll take a look at it and try to explain what a <em>blockchain</em> is and how it works as simply as possible. I'm new to this too, but it's very exciting and I encourage everyone new to <em>crypto</em> to research it!</p>
<p><img src="https://i.imgsafe.org/dbf742885d.png" /></p>
<p><em> "Well, let's get right into it then!"</em></p>
<p><br /></p>
<h3><em> So, what is a blockchain?</em></h3>
<p>The simple answer is that a <em>blockchain</em> is an open book where all the previous transactions of said currency are stored in a precise manner. Much like an <em>'event log'</em> where every action is logged in a chronological order or your bank account - all transactions are written down and the final balance is calculated. <em>Blockchains </em>however store a vast amount more information and are limited to one user's bank account history.</p>
<p>To understand why we need it, we need to investigate how virtual currencies work. Lets take '<em>BitCoin'</em>, also known as the world first <em>decentralized virtual currency</em>.</p>
<p><br /></p>
<p>Unlike fiat currencies (<em>USD, EUR</em> etc) BitCoin is not influenced by authorities and the value is only dependent on the users. This has it's advantages, mainly that governments have no control over it. Secondly, all transactions are entrusted to a network of nodes (<em>miners</em> aka <em>witnesses</em>) instead of a central intermediary like a bank. That's what makes this currency '<em>decentralized</em>'. Each time a transaction is made, it's being made throught the network, where miners validate the transaction. Our fiat currency system depends on one central bank to register all transactions. This can be slow and has it's fair share of disadvantages because there are so many different banks around the world and different ways to pay.</p>
<p><br /></p>
<h3> What are transactions?</h3>
<p>Just like your current fiat currency doesn't hold any real value (just numbers on a bank account), so don't BitCoins. BitCoins do not exist, in a sense. There are only records of transactions between adresses(<em>BTC wallets</em>) with balances that increase or decrease.</p>
<p>A transaction is an order to the network to transfer value between two wallets. No value is ever held inside an wallet. To find out the value of a wallet we need to reconstruct all transactions that ever took place. Here, <em>blockchain</em> comes in. Because all transactions are chronologically stored on the blockchain, we can figure out how much value a wallet posesses. All transactions are signed with your private key which provides a mathematical proof for verification. On the network it's the miners job to verify all transactions.</p>
<p><br /></p>
<h3> But, the system is decentralized. How can we keep track of all transactions?</h3>
<p>To keep all miners synchronized, every miner needs to have a copy of the existing blockchain. The local copy of the blockchain is updated each time a miner starts. Because speed is of upmost importance when verifying transactions, it's counterproductive to send each miner the whole blockchain if it's updated. That's why we use small blocks(a certain amount of transactions) instead. That's where the name 'blockchain' comes from.</p>
<p>To prevent someone editing the blockchain, every block is run through a mathematical formula which creates a <em>hash</em> (a series of seemingly random numbers and letters that are unique to each block - a hash is calculated from the information on the block and changes completely if even one value in the block is changed). The hash is stored in the end of the blockchain. In addition, each created hash also uses the hash from the previous block to create itself. That way it becomes obvious if a block is changed - every other hash would change too and the blockchain would be considered 'fake' and disregarded.</p>
<p>Because creating a hash from a block is very easy, miners could potentially hash thousands of blocks in seconds and mine all the coins. To avoid this every hash has a specific requirement it must meet(certain set of characters in the beginning for example). To find the right hash, a so called '<em>nonce</em>' is added to the block, a changing variable. Every time a hash is created and doesn't meet the requirement, the nonce is changed and the block gets hashed again. If a miner successfully completes a block, it is rewarded. Here, the reward is 1 steem.(Note: Steem doesn't have a fixed limit like BitCoin. Steem can be mined indefinitely, but with time it brings inflation. BitCoin has a limit of 21 million coins.)</p>
<h3><em> Mining</em></h3>
<p>Miners use special rigs and equipment to mine those blocks, but basically every CPU or GPU can be a miner and finding the right hash is a matter of luck. Although having a farm of miners that can mine 100 faster than a normal PC means it's also 100 more likely that this farm will find the right hash before a normal PC.</p>
<p>Steem mining is done on CPU's. For example my 4 core Athlon 651K can mine at a rate of 16,9Khps. After ~16 hours my PC mined a total of 3 blocks which equals 3 Steem. Because my electricity costs me around 97,78€/MWh the cost for those 2 Steem(market price 5~6$) was about 0,2€(consider my PC takes 150w total) which means it's profitable, but really slow. The takeaway is: if you have cheap electricity, mine ahead!</p>
<p><br /></p>
<p><br /></p>
<p> That's it for now!</p>
<p> Next time I'll look at<em> the advantages and disadvantages of Blockchains.</em></p>
<p> <img src="https://i.imgsafe.org/dbe39966ac.png" /></p>
<p><br /></p>
<p><br /></p>
<p><br /></p>
<p><br /></p>
<p>#cryptocurrency #blockchain #crypto #education #learning #craigrant #</p>
<p><br /></p>