Blockchain 101: Understanding the Building Blocks of Blockchain Technology
Blockchain technology is one of the most talked about and rapidly growing areas of technology today. It is built on a number of key elements, each of which plays a crucial role in the functioning of the system. In this blog post, we will demystify and break down some of the key ingredients of blockchain technology and explain the inner workings of this revolutionary new wave.
1. Introducing Blockchain, Cryptocurrency, Coins, Fungible and Non-Fungible Tokens
- Blockchain: as an overview, blockchain technology is a decentralized digital ledger that is used to record transactions across a network of computers. Its decentralized nature makes it resistant to tampering and modification, creating a transparent infrastructure for users to store and transfer their digital assets.
- Cryptocurrency: (as a broader term) is a digital virtual currency that is secured by cryptography as a means of securing communications and using key-pairs as a provable identity, to execute transactions on the blockchain network. All transactions made with cryptocurrency are recorded on a decentralized digital ledger that is maintained by a network of computers (nodes), rather than a central authority like a government or financial institution. This makes cryptocurrency transactions fast, tamper-proof, secure and transparent which allow for more freedom and flexibility while maintaining the integrity of the transactions. Think of blockchain as the technical backbone that enables the functionality of the blockchain network, and cryptocurrency is the incentive i.e. digital assets that relies on this backbone to drive the maintenance and growth of the blockchain network. Without the technical backbone, the blockchain network could not exist and without the incentive, there would not be any motivation (rewards in the forms of coins) for the blockchain users to maintain and grow the network.
- Coins: (one of the specific types of cryptocurrency) are digital assets that are native to its own blockchain. These coins can be sold, bought, and traded on cryptocurrency exchanges and they are often used as a means of payment (gas fee) to incentivize the miners or validators for verifying and processing the transactions. Some examples include ADA (native coin of the Cardano blockchain), HBAR (native coin of the Hedera Hashgraph), and ETH (native coin of the Ethereum blockchain).
- Fungible Native Tokens: (one of the specific types of cryptocurrency) are fungible digital assets that are minted on top of a blockchain technology. An example to illustrate this would be ERC-20, a token minted on the Ethereum blockchain. These native tokens are typically used as utility tokens which serve as a key for accessing a specific platform or service, and security tokens to represent ownership of an underlying asset such as stocks, bonds and company shares. Stablecoins are also one of the typical usage of native tokens (and native coins) for maintaining a stable value by having the tokens pegged to the value of a fiat currency or commodity to reduce price volatility. The value of the stablecoin is fixed to the value of something else, and it will change accordingly with the value of the entity it is pegged to, similar to having a currency with a fixed exchange rate. This makes stablecoins more predictable and less risky to hold or use as a means of exchange. For example, the value of a stablecoin that is pegged to the value of USD will rise if the USD value goes up, and vice versa.
- Non-Fungible Tokens (NFTs): (one of the specific types of cryptocurrency) represents a one-of-a-kind digital or physical assets on the blockchain with a unique token ID and metadata that sets it apart from one another. It is indivisible and immutable, cannot be replaced nor interchanged for an equal value. NFTs that represent digital or physical assets are traceable and verifiable with the owner staying pseudonymous, and the ownership rights can be easily passed over between different parties through the peer-to-peer blockchain network.
The relationship between cryptocurrency, coins and tokens is somewhat unique in that they are indirectly interconnected to one another. In a simpler term, think of cryptocurrency as a big umbrella (broad term), and coins and tokens are both specific types of cryptocurrency that fall under this category.
2. What Makes up a Pair of Blockchain Keys?
In the context of blockchain technology, a pair of keys is made up of a private key and a corresponding public key, which are created together and mathematically connected.
A private key, also known as a secret key and account key, is a long string of letters and numbers that is used to sign transactions and verify authenticity. Think of it like a secret password that you use to access your bank account or email, it allows you to transfer, buy, or sell your assets. A private key is a secret code that is unique to you, and just like you wouldn’t share your bank account password with anyone, you should never share your private key with anyone. A corresponding public key is generated automatically when a new private key is created.
A public key is derived from the private key through a mathematical process. The public key is not secret and is used to verify the identity of the owner of a digital asset and prove ownership, which necessitates a larger amount of data and calculation than a private key. This is reflected in the longer length of the public key, which is generally 128 characters or more. A public key also generates a unique address, commonly referred to as a wallet address, which is used to receive and send digital assets on the blockchain network.
3. Understanding Wallets: Storing and Managing Digital Assets
A wallet is a digital storage space where you keep your digital assets on the blockchain, such as NFTs and native tokens. It can be thought of as similar to a physical wallet where you keep your cash and cards.
A wallet is made up of a private key and a public key, and a wallet address is a unique string of letters and numbers that is generated from the public key. It is like a bank account number, but it is specific to the blockchain network where the assets are held, and is used to receive and send digital assets.
For example, let’s say you have a wallet for Hedera Hashgraph. The private key is like a password that you use to access and manage your HBAR, which is the native coin of Hedera. The public key is like an account number, it is used to verify your identity and prove that you own the HBAR and to generate a unique address, commonly referred to as a wallet address, which is used to receive and send HBAR on the Hedera Hashgraph blockchain network.
A transaction history in a wallet is a record of all transactions that have been made using that specific wallet. It includes information such as the date and time of the transaction, the amount of digital assets that were sent or received, and the wallet address of the sender and receiver. It also includes a unique transaction ID that is generated by the blockchain network and can be used to track the status of a transaction on a block explorer.
4. Consensus Timestamps in Blockchain
A consensus timestamp is the time at which a block of transactions is added to the blockchain and is agreed upon by the majority of the nodes in the network. It is used to establish the order of blocks in the blockchain and is an important part of the consensus mechanism used by the blockchain.
Some blockchains use a process called “mining” (see appendix 2) to add new transactions to the blockchain. Each block (see appendix 1) of transactions added to the blockchain have a consensus timestamp added to the block by the miner who mined the block (based on the time on their computers), to record the time the block is added to the blockchain, which then becomes a permanent part of the blockchain. Since the consensus timestamp is added to the transaction at the time of mining, any attempts to change the timestamp would alter the final calculated transaction hash as well, which would be easily detected by the network.
The consensus timestamp serves as a way to order the transactions within the blockchain, it helps to prevent double-spending and to ensure that all transactions are processed in the correct order. It also serves as a way to track the age of a transaction and to know how long it took for a transaction to be processed by the blockchain network.
Appendix 1: In the context of blockchain technology, a block refers to a collection of transactions that are grouped together and added to the blockchain. Each block contains a certain number of transactions, and once those transactions are added to the block, they become a permanent part of the blockchain. Each block also contains a reference to the previous block, forming a chain of blocks that make up the blockchain.
Appendix 2: When a miner “mines” a block, they are essentially adding a group of transactions to the blockchain. Each block can contain multiple transactions and a miner can include multiple transactions in a single block that they mine. Once a block is mined, it is added and broadcasted to the blockchain and the transactions it contains are considered confirmed and can no longer be altered or deleted. Miners are incentivized to add new blocks to the blockchain by receiving a reward in the form of the blockchain’s native coin for each block they mine.
5. What is a Gas Fee?
A gas fee is a small amount of cryptocurrency that is required to pay for the computational power needed to execute a transaction on the blockchain. Gas fees are required to incentivize the miners to process and include a user’s transaction in a block.
Think of gas fees as the cost to use the blockchain network. Just like how you need to pay for electricity to power your computer, you need to pay a small fee to use the blockchain network. This fee is used to pay the miners or validators who are responsible for verifying and processing your transaction.
The more complex the transaction, the more computational power it requires, and the higher the gas fee. For example, if you are sending a simple payment, the gas fee will be lower. But if you are executing a smart contract, which requires more computational power and generally has a larger transaction size, the gas fee will be higher. Aside from that, gas fees can fluctuate depending on the demand for the network at a given time. When more people are using the network, the gas fee may be higher as there are more transactions competing for the same block space.
6. Understanding PoW and PoS
Proof-of-work (PoW) and Proof-of-stake (PoS) are two different popular consensus algorithms used by blockchain networks to validate and add new transactions to the blockchain.
Proof-of-Work:
- It is a process where miners use their computational power to solve complex mathematical problems in order to validate transactions and create/add new blocks on the blockchain.
- Anyone can participate in mining and the chances of winning a block reward are based on computational power and electricity consumption.
- Miners are rewarded with coins for their efforts.
- Bitcoin is one of the most well-known examples of a blockchain that uses PoW.
- The process of solving these mathematical problems requires a lot of computational power and energy, which can be costly and not environmentally friendly.
Proof-of-Stake:
- It is a process where users are chosen to validate transactions and create/add new blocks on the blockchain based on the amount of coins they hold and “stake” (or lock up) in the network.
- The more coins a user holds in their wallet and locks up through staking, the higher their chances of being selected as a validator by the blockchain network.
- The selection process is based on a combination of the user’s staked token amount and a random element.
- Users are rewarded with coins for helping to secure the network.
- Cardano is one of the blockchain platforms that uses a PoS consensus algorithm.
- This process is seen as more energy efficient compared to PoW as it does not require as much computational power to calculate hashes.
For example, let’s say there is a blockchain network that uses PoW and has 10 miners. Each miner competes with each other to solve a mathematical problem, and the first one to solve it gets to validate the transactions and create a new block, and also gets rewarded with new coins.
On the other hand, in a blockchain network that uses PoS, the role of miners is replaced by validators where instead of solving mathematical problems, it validates transactions based on the amount of coins held by the users. Users who hold more coins and stake them, have a higher chance of being chosen as validators and get rewarded.
7. Mining, Staking, and Minting
Mining, staking and minting are three different ways that new digital assets can be created and distributed on a blockchain network.
Mining is a process that is used to create new coins on a blockchain network that uses proof-of-work (PoW) consensus algorithm. Miners use their computational power (hashrate) to solve complex mathematical problems which are known as hashes, in order to validate transactions and add new blocks to the blockchain. The process of solving these mathematical problems is called “mining” and miners receive coins as a reward for their work. Bitcoin, for example, is created through mining using PoW mechanism. Very often, the mining process consumes a lot of energy, and it is not environmentally friendly.
Staking, typically performed by the user of a wallet, is a process that uses a proof-of-stake (PoS) consensus algorithm to create new coins. These users hold a certain amount of existing coins in their wallet and stakes them by not using them for transactions and keeping them locked. This helps to secure the blockchain network and in return, the user is rewarded with new coins. This process is called “staking” because it is similar to putting money in a savings account, where you earn interest on the amount you deposit.
Minting is the process of creating new digital assets such as native tokens and NFTs on a blockchain network. These new assets can then be distributed to users, sold on a cryptocurrency exchange or used in other ways within the blockchain ecosystem. In the case of NFTs, the process typically involves creating digital assets such as images, videos or audio files, and then minting them as unique, one-of-a-kind assets on a blockchain network. For example, if a music band wants to create an NFT that represents ownership of a limited edition album, they can mint it on the Cardano blockchain and sell the NFT with a unique token ID to fans or other interested parties. This NFT cannot be replicated, divided or exchanged for an equal value.
8. Transforming Blockchain Adoption with No-Code/Low-Code
With blockchain technologies like Cardano and Hedera integrated with no-code/low-code platforms like Joget DX, not only can you perform blockchain transactions, but you can also easily design and implement an end-to-end user experience all the way from digital forms, customizable table lists with multiple form factor views, process designs and tailored user interfaces.
Joget recently released the Cardano Blockchain Pack and Hedera Ledger Pack on the JogetOSS to empower non-technical business users to build applications that interact with the Cardano blockchain and Hedera Hashgraph. Ultimately, these plugins abstract away the technical complexity of executing transactions, minting, and burning tokens on the blockchain network with its visual interface, making it more versatile and adaptable to a wide range of use cases.
Considering some users might want to store and access their digital assets such as documents on a decentralized network to be used in conjunction with blockchain technology, the IPFS File Upload Plugin is also made available in the JogetOSS repository to ease the handling of file uploads and pinning with IPFS that comes with the following capabilities:
- When a new file is uploaded, the file is also uploaded to IPFS and pinned on the IPFS node.
- When a file replaces an existing file, if the file content differs, the old file is unpinned and the new file is uploaded to IPFS and pinned on the IPFS node.
- When a file is removed or its related form record is deleted, the file is unpinned from the IPFS node.
9. Get Started
As a Joget app designer, you will only need to understand the concepts of a particular blockchain technology to start building full-fledged enterprise apps with your preferred blockchain pack as composable/modular blockchain components, all without writing any code.
Watch Video Tutorials and Webinar On-Demand:
- How to Create a Cardano-Integrated Joget App in Less than 10 Minutes
- How to Create a Hedera-Integrated Joget App in Less than 15 Minutes
- [Webinar] Joget DX Application Building Series: Cardano DApp Development Made Easy with Joget
Related Joget Knowledge Base Articles:
- Introducing Joget-Cardano Blockchain Plugin Pack
- Designing Your First Cardano Integrated Joget App
- Introducing Joget-Hedera Ledger Plugin Pack
- IPFS File Upload Form Element
Related Joget Blog Posts:
- What Everybody Ought to Know About Distributed Ledger Technology and Blockchain When Combined With No-Code
- Cardano and Joget: Building No-Code, Composable Blockchain Apps
- Want to Know Where Your Coffee Comes From
Other resources to help you get started:
- Get Started — On-premise, on-demand, public/private cloud, cloud native and more.
- Try Joget DX 8 — Joget DX 8 is now available as a public beta.
- Joget Demo — Experience the Joget DX platform and witness how a POC can easily be built in no time.
- Joget DX Video Tutorials — Quick overview and build your first app.
- Joget DX Knowledge Base — User and developer reference, samples and other documentation.
- Community Q&A — Ask questions, get answers, and help others.
- Language Translations — Translations for more than 20 languages.
- Joget Mindshare™ Series — Information sharing and educational content ranging from whitepapers, webinars, video tutorials, customer success stories and more.
- Joget Academy — Self-paced online learning and certification.
- Joget Marketplace — Download ready made apps, plugins, templates and more.
- Joget Events — Upcoming and past Joget events & webinars.
- Joget Press — Joget press releases.
- Joget Reviews — Joget reviews and customer testimonials.