After a ton of research, reading blogs and referring documentation, I've tried to summarize the concept of blockchain by giving an overview about what exactly it is, covering all the important foundational information one needs to get started with it.
So what is blockchain?
Well in simple words, it’s basically a distributed immutable digital ledger of transactions that is duplicated across the entire network of computer systems (nodes).
In terms of blockchain, a single transaction or record is called a block[]. Which holds all the information with respect to that transaction. Forming a chain of such blocks(transactions) is called a blockchain.
So Why should we study blockchain?
Because it’s the future, it eliminates the concept of centralized data and helps in the verification and traceability of multistep transactions. Building decentralized applications is the way, which are safer and more secure.
In short build a sense of trust in making a transaction. (I'll explain the concept of immutability further, but for now understand it this way that once a transaction has been made, nobody can alter it).
How does blockchain work?
It's an immutable ledger - All the nodes are connected in a distributed peer to peer system. So suppose, if an attacker tries to mutate the data of an existing block (change some information in a blockchain), it will be immediately corrected by other nodes connected to the network.
When a block is added or changed in a blockchain, a message is broadcast to all other nodes connected in the network. Each node match the consistency of the information with their blockchain, if something is wrong, the victim node is immediately notified and the state is corrected.
The concept of correcting an incorrect blockchain consist of majority of the nodes having same state from the one which is different, because it's present in a distributed immutable environment.
Diving deeper - Let's see how a single block looks in blockchain...
A block consists of -
- A Block number
- Data
- Previous hash
- Hash
Note: First block is called the genesis block.
The Algorithm used is SHA 256 which Encrypts the data into a 64 hexadecimal char of 4 bits each, which is equal to 256 bits.
And how the blocks are connected?
So, its something like Block1 -> Block2 -> Block3 -> Each block contains prev hash value of block and its own hash.
Note: Data cannot be decrypted once encrypted.
What is a distributed P2P network?
Thousands (even more) of node connected to each other in a network, where each node contains a copy of the blockchain. Whenever a node adds a transaction, it transmits a message to all the other nodes connected and everyone adds that transaction to their chain(if course they verify whether the transaction is valid or not, but we'll talk about it later), maintaining the consistency of the network.
The advantage of having a distributed p2p network is that it eliminates data tampering. Suppose A’s data gets changed, it gets notified by all the other nodes connected to it about data tampering and since the majority of connected nodes have different data as compared to what A has now, it correct its mutated data and balances the integrity again. This scenario is also called the byzantine fault tolerance problem.
Consensus protocol - > which prevents attacks on blockchain and also validate each transaction addition.
POW(Proof of work) -> This is something which comes into play when a blockchain miner mines a particular transaction to add it into their blockchain. Miners have to solve a math problem and then a block is mined.
So suppose, a transaction is added to a blockchain in a node. When a miner solves a math problem and adds that transaction to the chain, they are rewarded, solving a problem and adding it into the blockchain is not at all an easy job, so they show their proof of work before adding the transaction to the blockchain and every other node runs an algorithm to verify that the added transaction is valid or not. Once verified, all the other nodes in the network add that block to their chains.
Curious question - What if two nodes add two transaction simultaneously? Which one will be added first?
So, if two nodes transact a two blocks simultaneously at the same time, then the entire network waits until one of the adjacent nodes or the main node(from where the initial transaction blocks were added) add one more block to them increasing their length. In such case the all the other nodes have to accept the that particular nodes added block and add it to their blockchain, discarding their initial node (which is also called the orphan node).
That’s why we follow a six-step confirmation approach to have a successful transaction.
Finally, I would like to conclude by emphasizing to research more about this technology which could revolutionize the concept of application security and transaction transparency. Not only this, blockchain has much more to offer, it can be an effective addition to some vital sectors like government, supply chain, healthcare, cyber security and many more...
Top comments (1)
Hello, Nice to meet you.
I plan to add a smart contract to decentralized finance (DeFi) dashboard that includes empowering users to interact directly with blockchain-based financial protocols in a secure, transparent, and efficient way. This aim to allows for real-time monitoring, management, and execution of smart contracts within the DeFi ecosystem.
Key Features:
Smart Contract Deployment: Users can deploy custom smart contracts to the blockchain directly from the dashboard, eliminating the need for third-party tools or interfaces.
Interaction with DeFi Protocols: Users can interact with existing smart contracts of popular DeFi protocols (such as lending platforms, liquidity pools, or decentralized exchanges) directly from the dashboard, enabling real-time transactions.
Contract Execution & Monitoring: View active smart contracts, monitor their status, and execute transactions with ease. This includes actions like staking, lending, or swapping assets, all powered by underlying smart contracts.
Transaction History & Analytics: Track the history of all interactions with smart contracts, including gas fees, execution details, and performance analytics. This allows users to make informed decisions and optimize their DeFi strategies.
Security & Privacy: Our platform ensures that all smart contract interactions are secure and transparent, with real-time feedback on transaction success or failure, as well as built-in error handling and gas optimization tools.
Customizable Contract Templates: Advanced users can create, test, and deploy custom smart contracts using pre-built templates, or deploy from scratch with Solidity or other supported languages. This adds flexibility for developers and advanced users to customize their DeFi experience.
With the addition of smart contract capabilities, our DeFi dashboard will be a powerful, all-in-one platform for managing your decentralized finance activities with full transparency and control.
My focus is on making a contract with a senior blockchain developer to add smart contracts for my project. Additionally, in the future, I plan to launch my own token, similar to Shiba token or Mega Trump tokens. Therefore, I am particularly interested in candidates with a deep understanding and experience in blockchain development and the Web3 space.
If you are interested in my project, please feel free to reach out to me on telegram.
t.me/thunder0828
Best regards.
Adam Jordan.