Skip to content

Percedal15019/BlockChain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

135 Commits
 
 
 
 

Repository files navigation

🔗 BlockChain

Blockchain Technology is a shared, unchangeable digital database spread across a network of computers, recording transactions in "blocks" linked chronologically with cryptography, creating a secure, transparent, and decentralized system for tracking assets and data without a central authority like a bank. Once data is added to a block and chained, it's nearly impossible to alter, requiring network consensus (agreement) to validate changes, ensuring high security and trust.



Its key characteristics are:

  • Decentralized: No single entity controls it; copies exist on many computers (nodes).
  • Immutable: Data, once recorded, cannot be changed or deleted without altering all subsequent blocks and getting network approval.
  • Transparent: All participants can see the shared ledger, allowing for easy tracking and auditing.
  • Secure: Uses cryptography (hashes) to link blocks, making tampering evident.
  • Consensus-driven: Transactions are verified by the network, not a middleman, through agreement mechanisms.

🌐 Web3

Web3 is the vision for the next generation of the internet, shifting from today's centralized platforms (Web2) to a decentralized, user-owned web built on blockchain, focusing on data ownership, privacy, and control for users, rather than big tech companies. It uses technologies like blockchain, cryptocurrency, NFTs, smart contracts, and dApps to create a more open, transparent, and censorship-resistant internet where users have direct say in platforms and digital assets.

Web3 aims to let communities and open protocols control infrastructure and rules through code, tokens, and smart contracts.

→ From Web1 and Web2 to Web3:

  • Web1 (roughly 1990s–early 2000s) focused on static websites where most users just read information; content and hosting were controlled by site owners.

  • Web2 (mid‑2000s onward) introduced dynamic, interactive platforms like social networks, app stores, and cloud services, but concentrated control of data and monetization in large “Big Tech” platforms.​

  • Web3 combines the richer interactivity of Web2 with decentralized infrastructure from blockchain and peer‑to‑peer networks, so that no single company has unilateral control over data, identity, or value flows.



But What are NFTs?

NFTs, or non‑fungible tokens, are unique digital tokens on a blockchain that are used to represent and prove ownership or authenticity of a specific item such as a piece of art, a game asset, or a collectible. Unlike cryptocurrencies like bitcoin or ether, where every unit is interchangeable with another, each NFT has its own distinct identity and cannot be exchanged on a one‑to‑one basis with another NFT.

An NFT is essentially a unique entry on a blockchain (often Ethereum or similar networks) that points to some asset and records who owns it. The blockchain stores a token ID under a contract address plus ownership history, so anyone can verify which wallet currently owns that token and how it has moved over time.

Fungible assets: One unit is effectively the same as any other unit (for example, one dollar or one bitcoin is interchangeable with another).​

Non‑fungible assets: Each unit is different in some way, like a specific painting, a concert ticket with a seat and date, or a specific parcel of land; NFTs encode this uniqueness on‑chain


→ How NFTs work technically?

Most NFTs are created (minted) using standards like ERC‑721 or ERC‑1155 on Ethereum, which define how a smart contract manages unique tokens. Each NFT has at least two key pieces of on‑chain data: the contract address and a token ID; usually there is also metadata (like a URI pointing to an image, name, and description) that describes the asset.​



→ What NFTs can represent?

  • Digital art and collectibles (images, animations, music files, videos, memes).
  • In‑game items and virtual land in metaverse or gaming platforms.

In many cases, the actual media file is stored off‑chain (e.g., on IPFS or a web server), and the NFT stores a link to it plus ownership data on‑chain.​

→ Practical examples are:

  • A Digital Artwork: An artist mints a single NFT that represents a specific artwork, lists it on an NFT marketplace, and sells it to a collector; the NFT’s owner field on the blockchain changes to the buyer’s wallet address.​

  • A Game Item: A sword or skin in a blockchain‑integrated game is an NFT; players can trade it on external marketplaces, and the game reads blockchain ownership to decide who can use the item.


⚙️ Smart Contracts

Smart Contracts are programs stored on a blockchain that automatically execute and enforce agreements when predefined conditions are met. They remove the need for a central intermediary (like a bank or platform) to run the logic or hold the state of the agreement. Every node in the blockchain network executes this code and records the result, so the outcome is transparent, tamper‑resistant, and agreed upon by the whole network.​

Once conditions are met (time, input, payment, signatures, etc.), the contract runs on its own and updates balances or state without manual intervention. After deployment, the code and state history are stored on the blockchain; changing logic usually requires deploying a new contract or using an upgrade pattern, and anyone can inspect the contract’s behavior on public chain. All honest nodes running the same contract with the same input must produce the same result, which is then written to the ledger.



From the above, we understand the Differnce between Traditional Contracts and Smart Contracts:

Traditional Contracts Smart Contracts
1. Two parties first agree and sign a written contract. 1. Two parties agree on terms that are encoded directly into a smart contract (shown as a digital contract with a crypto/Ethereum-like symbol).
2. A trusted third party (like a bank, court, or intermediary institution) is then involved to enforce or process the agreement. 2. There is no separate third-party institution step; the blockchain-based smart contract itself acts as the enforcer.
3. Finally, the agreement is executed, illustrated by gears showing the process happening after the third party’s involvement. 3. Execution (again shown by gears) happens automatically when the contract’s programmed conditions are met.

🪙 Tokens

A token is a programmable digital asset created and managed by smart contracts on an existing blockchain (like Ethereum, Solana, or BNB Chain), rather than having its own standalone chain. Tokens follow standards (for example ERC‑20 or ERC‑721) so wallets and dApps know how to store, transfer, and interact with them.

In Simplier terms, In blockchain and Web3, “tokens” are digital units that represent value, rights, or assets on top of a blockchain. They can stand for currency, access to a service, governance power, or even ownership of real‑world things like real estate or art.


→ Coins vs Tokens:

  • Coins (like BTC, ETH) are native assets of their own blockchains and are mainly used to pay transaction fees and as general‑purpose money in those networks.​

  • Tokens are created on top of these blockchains and can encode arbitrary logic: access rights, voting power, claims on revenue, or representation of another asset.​

  • So, all NFTs and many “altcoins” you see on Ethereum or other smart‑contract chains are technically tokens.


Ethereum

Ethereum is a decentralized, open-source blockchain platform enabling developers to build and run decentralized applications (dApps) and smart contracts, extending blockchain beyond just currency like Bitcoin, with its own cryptocurrency, Ether (ETH), powering network transactions and fees.

Ether (ETH) is the native cryptocurrency of Ethereum and is used to pay “gas fees”, which are charges for executing transactions or running smart contracts on the network. These fees compensate the validators who secure the network and help prevent spam or abuse by making computation economically costly.


Vitalik Buterin: Founder Of Ethereum

Ethereum is like a global shared computer that anyone can use, where the rules are enforced by code instead of by a central company or government. The blockchain technique records all transactions and contract executions in a transparent, tamper‑resistant ledger maintained by thousands of nodes around the world.

Also, Ethereum is the second‑largest crypto network by market capitalization after Bitcoin, but its main focus is general‑purpose computation rather than just digital money. It underpins large parts of the DeFi(Decentralized Finance) and NFT ecosystems and serves as a base layer for many other networks and layer‑2 scaling solutions.


Solidity

Solidity is a high-level, object-oriented programming language designed for writing smart contracts that run on the Ethereum Virtual Machine (EVM).

It is statically typed and features a curly-brace syntax influenced by C++, Python, and JavaScript, making it familiar to many developers.

Its Key characteristics are:

  1. Smart Contract Focus: Specifically created to implement smart contracts—programs that govern the behavior of accounts within the Ethereum state and execute automatically when conditions are met.​

  2. EVM Compatibility: While built for Ethereum, it also works on other EVM-compatible blockchains (e.g., Polygon, Avalanche, Binance Smart Chain). ​

  3. Language Traits: It supports inheritance, libraries, and complex user-defined types, allowing for modular and reusable code. ​

  4. Turing Completeness: It can simulate any logical step of problem-solving, enabling the creation of complex decentralized applications (dApps) like voting systems, crowdfunding, and multi-signature wallets.

  5. Security: Because transactions are often irreversible and involve value (like tokens or ETH), Solidity includes features for strict error handling (e.g., require, revert) to minimize vulnerabilities.



Also, we are steping into a new era of software development and web development many communities are created such as thirdweb (they have their website as well as youtube videos to teach future developers about web3 and blockchain)

If your interested more about blockchain and how it works, then i will recommend you to check out this youtube video ---> https://youtu.be/gyMwXuJrbJQ

To work in solidity, you must know about EVM and how to access it:

  1. First,

🔴 NOTE:

  • I know learning a new language takes time and its necessary for you to understand that "Dont consider it as a new language/task to complete". As you will just learn it for learning purpose, create a different perspective of it.

  • For example: If you want to create an app that is safe and nobody can hack it or steal data from it, then dApp is a solution for it as in many hackathons or can i say Vibe Coded apps are vulnerable to basic data breaches like SQL Injection and many more. A dApp somewhat minimizes the issue with no errors whatsoever. Now, think like this to create that kind of security i have to learn that mechanism so that its easy for me to implement in my real-life projects as well as personal projects. This is how you should think about languages as tools to be used and learn about them.

  • Happy Learning and In future i will do some projects on blockchain so stay tune !!!

About

A Step Towards Future...

Topics

Resources

Stars

Watchers

Forks

Contributors