I believe by now we have a good enough understanding of BTC. A quick recap will tell you that BTC was created as an alternative to the fiat currency that is currently in use throughout the world. Now as we discussed earlier, the chief disruptor wasn’t BTC itself, developers realized that ‘blockchains’ which were developed accidentally as a byproduct of BTC was something amazing in itself. So what if one could do more with this? Why restrict the use of such a technology in a currency space itself?
If it is hard to understand let me help you out with an analogy:
BTC is like an App, whereas Ethereum is like Android.
Explanation: When BTC was created, the developers focused more on the end goal, which at that time was to provide an alternate to traditional currency. But while doing that they had accidentally created blockchain, so BTC’s blockchain was fine tuned for just one kind of operation, and that was to serve primarily as an enabler for BTC. In other words, imagine a scenario where one had written the Operating System (Like android) just to run a particular app on it. And that system could not support any other apps.
Now owing to the popularity of that system, what others did was exclaim, “Hey, this platform and tech is good? Why don’t we write an all-purpose OS that can support various apps?”
The result was ethereum. Ethereum was never meant to be a crypto currency at all, it was meant to be a platform where a developer can instantly log in and write his own app by using the ethereum OS. Just like today a developer can write an App in android and publish it to the play store, the same is expected for ethereum, where in the future, if one wants to write a blockchain app, he or she won’t need to reinvent the wheel by securing hardware for a blockchain and a coding a fundamental program to run it. Instead it can just plug into ethereum’s blockchain, and there are standard functions defined with which you can send commands to the blockchain.
Q: So, can one can make BTC in ethereum?
A: Yes, they can. The blockchain used will be ethereum’s but a system can be made within ethereum to achieve operations/functionality similar to BTC.
To get another lucid explanation of ethereum I suggest you visit the link.
Q: How does it work?
I will get into the coding part later. (Yes boys, it is very easy to code and make ethereum programs)
A: So if you wanted to make a blockchain based OS what would you have to do?
Blockchains need nodes right? Where we store all the transactions! That’s exactly what ethereum started off with. It set up thousands of nodes, most owned by a single core team initially. As others joined the network.
Now that the base was formed, they needed to store transactions, but ethereum was trying to be a multipurpose blockchain, and not one restricted to just BTC. So it simply replaced the idea of transactions (which recorded the transfer of ownership of money) with the idea of smart contracts.
Q: What are smart contracts?
A: These are contracts, as simple as that. We have seen many forms of contracts in our day to day lives. Some are more formal than others. Any transaction that happens can be said to happen on the basis of an inherent contract. If you pay money to a vendor for any article, said vendor will have to give you that article. Here the contract is implied and is not recorded on a piece of paper.
But then there are other kinds of contracts where recording becomes essential. For example the proof of providing goods and services to another party, especially if the counter party will be someone that you do not know or do not trust. Again we have marriage contracts (the papers documenting the registration of marriage), which enforces legality in such a marriage. These are immensely helpful during conflict resolution, and the law depends heavily on these records to mete out justice in case of a dispute.
But to do this imagine the hassle that one has to go through. You need to appoint a lawyer, you need officially recognized stamp papers. You need a proper federal agency which can enforce the law, and if you are from a third world country with a bit of civil war going on, then lo and behold, none can be expected to honor a contract.
But ethereum does away with all this by implementing a sort of virtual contract. Here a developer can make an app (which in this case can be in the form of a contract or a mechanism that handles a contract). The developer may define the contract as per the needs of the contract.
For example let us take the previously mentioned cases:
In case of a normal contract between a buyer and seller, we have 3 parties in the conventional case:
1. One who pays for the services
2. One who provides the services
3. One who lays down the law i.e. the judicial institutions that are relevant to the jurisdiction you are in
1. Legal complications
2. Fees for lawyers
3. Corruption/compromise of the legal system
4. Time lag between conflict and conflict resolution
Now imagine another situation where we make a contract [Which is nothing but a snippet of code that does the following]
1. Recognizes the sender [by the unique address provided to him in the ethereum system]
2. Recognizes the receiver [by the unique address provided to him in the ethereum system]
3. Recognizes the kind of goods and services and the functions that can be performed which in this case would be
a. Checking if the sender has sent the item/performed the services
b. Checking if the receiver has sent the money
c. If both parties confirm the receipt of the intended
d. Releases the money to the designated sender/provider of items/services
4. Now this contract will be stored in each and every node in the ethereum blockchain. Not only can any party not back out of it, but also the contract is inherently enforceable, since without a confirmation, the funds won’t be released.
5. But now comes the implementation part, to achieve this we are taking the help of 2 different entities,
a. The developer who had made this app
b. The miners/nodes of ethereum that will take their time to add this new contract to the list. (The same concept as the BTC list of transactions)
6. To take their help we need to pay them something, else why will they spend their precious time/intellect/processing power to help us? To address this, ethereum has a system of rewarding their miners/developers with ethers. A user of a contract will have to pay both these entities.
a. The developer that draws up the template of the contract assigns a fixed charge to use the contract. This charge is called ‘gas’ and this ethereum’s gas can be bought by ‘ethers’. And ethers are what you buy when you buy ethereum from the exchange.
b. The miners will charge you, but the charge will be dependent on the transaction costs. Now in the above example, to create the contract the developer could have written the code in multiple ways to achieve the same result. But here is where a smart developer will have an edge over a dumb developer. A smart developer will make the contract in such a way that it takes the minimum possible amount of computations to do the same work. He will ideally only store the final data in the distributed ledger and ensure that all the trivial calculations are done locally on the system. Because it only costs you if you do operations that need to be stored in all the nodes of the system. There are many ways to achieve that, one can write a code where say all the nodes receive inputs, and has to add and subtract locally. Or one can do addition and subtraction in the local machine and only store the result on the central blockchain nodes.
Hence, a smart developers contracts will be cheaper and for two contracts which are written by a smart and a dumb developer, people will prefer to use the smart developer’s contract since it charges less fee, even in a situation where the developer fee for both the cases are same. (For those of you who still didn’t get it, the overall fee is lesser for the smart developer because for executing the code written by him, miners charge you less)
7. If as a developer you manage to develop a contract that becomes widely used then you will be paid in ether. And this ether will be received by you each time someone avails your template of the smart contract.
8. Thus to make a Decentralized App, all you need to do is just write a contract, for everything else, i.e. the individual nodes of the ledger and the functions to interact with these nodes are already defined in the ethereum system.
Now that I have kind of explained what the ethereum system is, I shall now try to identify certain parameters that can help us understand the fundamental viability/ measure the value of ethereum.
1. Imagine a scenario in the future where decentralized computing becomes a rage, and everyone moves to blockchains for certain daily operations that we do. In a scenario like that we will have numerous ethereum developers and numerous ethereum users.
2. In such a case, to run an app like that, one has to pay in ethers, and price of ethers will increase.
3. Miners will become richer, since they are skimming money from the
a. System itself which rewards them with ether each time they append a block to the existing blockchain list
b. And they receive any part of the gas that the user of the contract will supply through ether, i.e. a part of his ether goes to the developer, in addition to the part dedicated for the owner, this is called the transaction cost.
Q: Now one may wonder, why contracts differ from each other:
A: Because they differ in real life too! A contract between a buyer and seller will differ from a marriage contract. In case of a transaction a contract may recognize one buyer, and one seller, along with one owner (Who is actually the developer writing the contract). On the other hand, in a marriage contract, the involved parties maybe the bride and the groom, and maybe some sort of witness for the marriage, (ofcourse the owner of the contract as well).
Now even same kind of contracts can differ from each other. It all depends on the kind of terms that the two parties can negotiate.
In addition to the kind of contract developed by the first developer, a second one can come along and develop a contract which in addition to the above parties, identifies how division of property will be in case of a divorce thereby acting like a prenuptial agreement. It can also identify other parties of the contract, like the child of the groom/bride from a previous marriage.
Now this can be more efficiently implemented by using multiple smart contracts. Say there is a scenario of a divorce the couple decides to split all the funds that they hold in a joint account. In that case one can be a smart contract for marriage, which can depend upon each individual of the couple to notify it of divorce, and as soon as that triggers, the marriage contract can send a signal to another contract that holds the funds, and that can automatically send the payment across to the two individual addresses associated with the erstwhile bride and groom.
(Ok, that was a very grim example, but I guess that is the only one that came to mind. You are welcome to suggest better ones)
This system of smart contracts communicating with each other has the ability to disrupt the institutions as we know it. Very soon we will have to change our laws to incorporate transactions/contracts enacted in the system. The legal system is also changing slowly, so if you are a budding lawyer, then this might be a good field to go into, considering skills in this field are going to be needed a lot in the future. Go here for more details.