Blockchain Fundamentals
This guide provides an introduction to blockchain technology fundamentals for developers who are new to the space. Understanding these core concepts will help you build more effectively on Ettios.
What is Blockchain?
A blockchain is a distributed, immutable ledger that records transactions across a network of computers. Each block contains a list of transactions and is linked to the previous block, forming a chain.
Smart Contracts
Smart contracts are self-executing programs that run on the blockchain. They automatically enforce and execute the terms of an agreement when predefined conditions are met.
Consensus Mechanisms
Consensus mechanisms are protocols that ensure all nodes in the network agree on the state of the blockchain. Common mechanisms include Proof of Work (PoW) and Proof of Stake (PoS).
Tokens & Assets
Blockchain tokens represent digital assets or utilities that can be bought, sold, and traded. They can represent anything from currencies to voting rights to digital collectibles.
How Blockchain Works
At its core, a blockchain is a chain of blocks, each containing a set of transactions. Here's a simplified explanation of how it works:
1. Transaction Initiation
A user initiates a transaction (e.g., sending tokens, deploying a smart contract, interacting with a contract). The transaction is signed with the user's private key to prove their identity.
2. Transaction Propagation
The signed transaction is broadcast to the network, where it enters a pool of pending transactions. Nodes (computers in the network) verify the transaction's validity by checking the signature and ensuring the sender has sufficient balance.
3. Block Creation
Validators (miners in PoW or stakers in PoS) group multiple verified transactions into a block. The validator adds a reference to the previous block (creating the chain) and solves a computational puzzle (in PoW) or is selected based on their stake (in PoS).
4. Consensus
Other nodes validate the new block according to the network's consensus rules. If the majority of nodes agree that the block is valid, it's added to the blockchain.
5. Finality
Once a block is added to the chain, it becomes extremely difficult to alter (immutability). As more blocks are added on top, the older blocks become even more secure.
Understanding Smart Contracts
Smart contracts are the building blocks of blockchain applications. They're programs stored on the blockchain that run when predetermined conditions are met.
Key Characteristics of Smart Contracts
Autonomy
Once deployed, smart contracts operate independently. No need for intermediaries to execute or enforce agreements.
Transparency
Anyone can see the contract's code and verify how it works. The execution of the contract is also visible to all participants in the network.
Immutability
Once deployed, the code cannot be changed (unless specifically designed to be upgradable), ensuring that the rules won't change unexpectedly.
Deterministic
Given the same input, a smart contract will always produce the same output, making its behavior predictable.
Ethereum Virtual Machine (EVM)
The Ethereum Virtual Machine (EVM) is a computation engine that serves as the runtime environment for smart contracts. Ettios is EVM-compatible, meaning:
- Smart contracts written for Ethereum can run on Ettios without modification
- You can use the same development tools (Solidity, Hardhat, Truffle, etc.)
- Existing Ethereum libraries and patterns work seamlessly
- Developers familiar with Ethereum can easily transition to Ettios
Learning Solidity
Solidity is the most popular language for writing smart contracts. If you're new to Solidity, check out the official Solidity documentation or our First Smart Contract guide.
Blockchain Tokens
Tokens are digital assets created and managed on a blockchain, often using smart contracts. There are several types of tokens:
Fungible Tokens (ERC-20)
Fungible tokens are interchangeable with one another. Each token has the same value and properties as any other token of the same type.
Examples: Cryptocurrencies, utility tokens
Standard: ERC-20
Non-Fungible Tokens (ERC-721)
Non-fungible tokens (NFTs) are unique and cannot be exchanged on a one-to-one basis. Each token has unique properties and value.
Examples: Digital art, collectibles, property deeds
Standard: ERC-721
Semi-Fungible Tokens (ERC-1155)
Semi-fungible tokens combine features of both fungible and non-fungible tokens, allowing for batched operations and more efficient transfers.
Examples: Gaming items, mixed asset collections
Standard: ERC-1155
Native Token (ETTIA)
ETTIA is the native token of the Ettios blockchain, used for paying transaction fees (gas) and participating in network governance.
Unlike other tokens, ETTIA is built into the protocol itself and not implemented as a smart contract.
Gas and Transaction Fees
Every operation on the blockchain costs computational resources. Gas is the unit that measures this computational work. Users pay transaction fees in ETTIA to compensate validators for executing and securing these operations. Ettios offers significantly lower gas fees compared to Ethereum mainnet.
Ready to Start Building?
Now that you understand the fundamentals of blockchain technology, you're ready to start building on Ettios: