Hello Everyone..
Welcome to another day of Web3 Engineering. Today, we are going to explore a new layer 1 blockchain called Aeternity. It was launched by Yanislav Mahalov in 2016 to deal with the blockchain scalability problem. So, without any further ado, let's get started.
Aeternity Blockchain.
Aeternity is a scalable blockchain network which uses an hybrid consensus of Proof-of-Work(PoW)
and Proof-of-Stake(PoS)
to increase the transaction speed of the network. It has proven efficiency over the classic approach by using PoW for transaction validation and PoS for Community Governance Decisions like block size, transaction fee etc.
Along with the hybrid consensus, aeternity also uses state channels to increase the throughput. The smart contracts are executed off-chain using state channels to reduce the load on the main network and also granted enhanced privacy with faster executions.
Major Components
Aeternity blockchain comprises several major components to increase its functionality. Some of them are
Hybrid Consensus - A combined consensus of PoW and PoS to increase the transactions by separating processes for community decisions and transaction execution.
State Channels - State channels are a significant feature that allows transactions to occur off-chain. This enables faster and cheaper transactions, as they require only two on-chain transactions for opening and closing the channel.
Oracles - Aeternity integrates oracles that provide real-world data to smart contracts. This capability allows dApps to interact with external information, such as weather data or sports results, thereby expanding the utility of smart contracts beyond the blockchain.
Sophia Smart Contracts - Smart contracts are written in Sophia language. It is a functional programming language designed for smart contract development on Aeternity blockchain which is strongly types and provides higher level abstraction.
AENS - An in-built Decentralized Naming System which helps users to assign human readable names to their addresses and smart contracts.
Interoperability Protocol - Aeternity comes with a built-in interoperability protocol allowing it to interact with other blockchain system and support cross-functional dApps.
How the Hybrid Consensus Works
PoW Working
In Aeternity's setup, the PoW component is responsible for creating new blocks and validating transactions. It utilizes a unique algorithm called Cuckoo Cycle, which is ASIC-resistant and optimized for memory usage, allowing for efficient mining with lower energy consumption. This aspect enables miners to generate blocks approximately every 15 seconds, contributing to the network's speed and scalability.
PoS Working
The PoS mechanism in Aeternity serves primarily for governance rather than traditional staking. AE token holders can vote on critical system parameters such as block size, transaction fees, and protocol upgrades. This governance model ensures that the community has a say in the platform's evolution, promoting transparency and user engagement.
Interaction Between PoW and PoS
Block Creation: PoW miners create new blocks and add them to the blockchain.
Block Confirmation: Once blocks are created, PoS participants review and confirm these blocks. This dual-layer validation process enhances security, as blocks must be validated by both miners and stakeholders.
Voting and Governance: AE token holders use their tokens to vote on governance issues, with their voting power proportional to the number of tokens they hold. This structure allows for a decentralized decision-making process that reflects the interests of the community.
State Channels
State channels increase the transactions by offloading transactions from the main chain and private off chain transactions. They can also include smart contract executions as well. The process of making a transaction through state channel happens in 4 steps:
Channel Opening
To open up a state channel, the parties involved need to lockup funds on special smart contract on the blockchain.
This contract defines the terms of the channel such as timeout, lockup amount etc
Off-chain Transaction
Once the channel is established, the parties can continue with perform limitless transactions without worrying about the network congestion.
Now the parties will sign the state updates to make a new transaction. These transactions are private between the participants and are not recorded on the network.
Smart Contract Execution
If a contract is involved, the smart contract will be deployed on the channel when it is opened.
Alongside the channel's signed state, the contract is also updated allowing it to execute off chain without being deployed on main network.
Dispute Resolution
If the parties involved raises any dispute, it can be settled on the main net, by closing the final state on the main net.
This is done by publishing the updated signed state on the blockchain. And the other party will be given the timeout period to respond and dispute the published data.
If no disputes are raised, the channel will be closed recording the final state on the network and the locked-in funds are distributed according to the published state.