An Introduction to Ethereum, Cryptocurrency and Smart Contracts
What is Ethereum?
Ethereum is a decentralized blockchain network that is powered by the Ether token. It enables its users to make transactions, earn interest on their holdings through staking, use and store nonfungible tokens (NFTs), trade cryptocurrencies, play games, use social media and so much more.
Solidity is the programming language of Ethereum.
Who created Ethereum?
Vitalik Buterin created Ethereum.
Before understanding Ethereum, we need to have knowledge about Cryptocurrency first.
What is cryptocurrency?
Any form of currency that exists digitally or virtually and in which transactions are secured by cryptography. Transactions directly connect the sender and recipient without having to deal with any central authority. Nobody else will have access to your funds and nobody can tell you what services you can use.
How does cryptocurrency work?
Cryptocurrencies run on a blockchain, and the record of all transactions is updated and held by currency holders.
When we are talking about cryptocurrency, the first thing that will come to our mind is Bitcoin. We need to talk about it a little.
What is bitcoin?
Bitcoin uses peer-to-peer technology to operate without any central authority or bank. It manages transactions and issues bitcoins with this technology carried out collectively by the network. Bitcoin is open source. The design of Bitcoin is public, nobody owns or controls it, and everyone can take part in this. It is given to blockchain miners for the work done to verify transactions and can be purchased on many exchanges.
Blockchain technology is the by-product of the bitcoin invention.
It was created by fusing Cryptography, Proof of work, and Decentralized networks.
Bitcoin is the first and most well-known cryptocurrency.
It gives you complete control over your money, does not involve Middlemen, is Programmable, and is Open to all.
You can store it, exchange it, and make payments with it. It is decentralized and controlled by the consensus or will of its users.
Ethereum vs Bitcoin
Digital money is used both without payment providers and banks. But Ethereum is programmable, which means you can build and deploy decentralized applications on its network that use blockchain to store data.
While Bitcoin is only a payment network, Ethereum is more like a marketplace of financial services, games, social networks, and other apps that respect your privacy and cannot censor you.
Proof-of-stake
It is a cryptocurrency consensus mechanism used for processing transactions and creating new blocks in a blockchain.
Currently, Ethereum uses the proof-of-work consensus protocol. In the future, it will move to another consensus protocol called proof-of-stake.
In the proof of stake consensus protocol, ETH owners stake a specified amount of their ether. Staking ether prevents it from being used in transactions. It serves as an incentive and collateral for the privilege of mining.
Mining will work differently under this protocol because it will not require everyone on the network to compete for the rewards. Instead, the protocol will randomly be choosing users with staked ether to verify the transactions. These validators are then rewarded in ether for their work.
Ethereum will require 32 ETH to be staked before a user can become a validator.
Block will be validated by more than one validator, and when a specific number of validators will verify that the block is accurate, it will be finalized and closed.
Now, we will briefly discuss the differences between proof of work and proof of stake:
Proof of Work
- Block creators are called miners
- Participants must buy equipment and energy to become a miner
- Not energy efficient
- Does not allow for more scalability
- Robust security due to expensive upfront requirement
- Miners receive block rewards
- The greater the hash, the more secure the network
Proof of Stake
- Block creators are called validators
- Participants must buy some coins or tokens to become a validator
- Energy efficiency
- Allows for more scalability
- Network control can be bought
- Validators receive transactions fees as rewards
- Staking locks the cryptocurrency on the blockchain to secure the network
How does Ethereum work?
Ethereum works through Smart Contracts.
What are Smart Contracts?
Smart contracts are self-operating computer programs stored on Blockchain that automatically execute when specific conditions are met.
A smart contract is just a code. The code is neither smart nor is it a contract in the traditional sense. But we call it smart because it executes itself under certain conditions, and it could be regarded as a contract in that it enforces agreements between parties.
Smart contract benefits:
There are the following benefits of smart contracts:
Automation: Smart contracts are triggered automatically at an event.
Immutable: They cannot change.
Distributed: There are no Discrepancies. Everybody has access to them.
Speed, efficiency, and accuracy: Once a condition is met, the contract is executed immediately. Smart contracts are digital and automated. There is no paperwork to process, so it prevents the mistakes which often result from manually filling in documents.
Trust and transparency: As there is no third party involved, and encrypted records of transactions are shared across participants, there is no need to question whether information has been changed for personal benefit.
Security: Blockchain transaction records are encrypted, which makes them extremely hard to hack. On a distributed ledger Each record is connected to the previous and subsequent records, so hackers would have to alter the entire chain to change a single record.
Savings: Smart contracts do not need intermediaries to manage transactions and, by extension, their associated time delays, and fees.
Backup: More than one copy of data is stored in different ledgers, so it is backed up safely.
How does a smart contract work?
Smart contracts rely on blockchains for their viability and security. The data that is needed to inform the terms of the agreement gets enshrined in a blockchain.
Solidity & Serpent are among the primary languages used for writing Ethereum Smart Contracts.
Since we are talking about Ethereum, we must talk about Ether; The native token of the Ethereum blockchain.
What is Ether?
Ethereum has a native cryptocurrency called ether (ETH). It is digital, and you can send it to anyone anywhere in the world instantly. The supply of ETH is not controlled by any government or company – it is decentralized and completely transparent. You only need an internet connection and a wallet to accept ETH. You do not need access to a bank account to accept payments. The ETH can be divided up to eighteen decimal places. So, anyone will not have to buy one whole ETH. He can buy fractions at a time – as little as 0.000000000000000001 ETH if you want. You can buy ETH from exchanges or from wallets.
What does the term Gas mean when we talk about Ethereum?
Every action on the Ethereum network requires a certain amount of computational power. Gas is a measure of computational power. This fee is paid in the form of an ether. This means you need at least a small amount of ETH to use the network.
Ethereum Wallet:
Ethereum wallet is an application that you use to interact with your Ethereum account. It is like an internet banking app without a bank.
Your wallets help you check your balance, send transactions, and connect to applications
Your wallets show your balances, and transaction history and give you a way to send/receive funds. Some wallets may offer more
Your wallets let you connect to any decentralized application using your Ethereum account.
Hot wallets
A cryptocurrency wallet that is connected to the Internet in some way is called a hot wallet.
Trust wallet is an example of a hot wallet.
Cold wallets
A cold wallet is a crypto wallet that is not exposed to the Internet.
Examples of cold wallets include hardware wallets or paper wallets.
Decentralized Applications:
Decentralized Applications are apps that run using blockchain technology. They are permissionless, open-source, and allow the use of cryptocurrency to perform a wide variety of opportunities.
Benefits of dApps:
- They can only be built on a smart contract
- They are censorship resistant
- They never go offline
One of the uses of the Ethereum technology is decentralized finance (Defi) which opens entire areas of banking services to anybody having an internet connection. You can use your ether as collateral to take out loans or provide liquidity to earn interest on your funds.
Decentralized Finance (Defi)
Defi is a movement whose goal is to decentralize financial applications. Defi is built on public, open-source blockchains that are free to access by anyone with an Internet connection (permission less).
Ethereum 2.0
The most important upcoming change is a shift from the proof-of-work (PoW) to the proof-of-stake (PoS) model, which aims to improve the security and scalability of the blockchain network.
After shifting from proof of work to proof of stake, the energy consumption on the Ethereum network will be reduced by 99.95%.
This upgrade also adds sharding, which allows transactions to be processed simultaneously across smaller chains, resulting in faster transaction speeds.
Sharding is a method of partitioning that is utilized by blockchain organizations to increase scalability. This enables them to execute a greater number of transactions per second. This setup takes the stress off a single chain dealing with all transactions and interactions on a network. Each partitioned blockchain is known as a shard having a specific ledger.
Currently, the network can handle about 25 to 30 transactions per second, but Ethereum 2.0 promises to handle 100,000 transactions per second.