Key Takeaways
- zkCloud: A decentralized off-chain computing environment ensuring privacy and scalability through zero-knowledge proofs.
- snarkOS and snarkVM: Core components enabling private smart contracts and program execution on Aleo’s blockchain.
- AleoBFT Consensus: Combines Proof-of-Stake and Proof of Work for scalable, privacy-focused consensus.
- Leo Programming Language: Simplifies building zero-knowledge applications with high-level abstraction.
- Developer Tools: A robust SDK and tooling support privacy-preserving dApp development.
An Introduction to Aleo’s Technical Architecture
Aleo is a Layer 1 privacy-focused blockchain and cloud computation network that employs zero-knowledge (ZK) technology. Because of the network’s programmability, the protocol utilizes smart contracts, arbitrary computation, and zero-knowledge proofs (ZKPs) to preserve privacy.
Aleo is an extremely complex platform with a host of features focused on the development of a privacy-focused cloud computation network. The technical architecture of Aleo makes use of several foundational aspects to ensure the integrity, scalability, decentralization, and privacy of the larger Aleo network. These include:
- zkCloud - an off-chain trustless cloud computing environment (with the two main components being snarkOS and snarkVM) that allows for program execution in a private, secure, and inexpensive manner with unlimited runtime
- snarkOS - a privacy-centric zero-knowledge operating system (OS) that is the foundational backbone of the Aleo platform
- snarkVM - a privacy-focused zero-knowledge-enabled virtual machine and smart contract creation, execution, and deployment platform
- AleoBFT - Aleo’s scalable, secure, and developer-friendly hybrid BFT consensus mechanism
- Aleo Network Participants - Aleo network participants include validators, provers, and stakers
- Aleo SDK - four main software development kits (SDKs) that allow developers to create protocols and dApps on the Aleo network with different programming languages (Python, Leo, WASM etc.)
- Leo programming language - an in-house programming language designed for privacy-enabled zero-knowledge application development
If you want to learn more about ALEO check out our introduction blog post: Aleo (ALEO): A Privacy-Focused ZK Cloud Computation Network.
zkCloud: An Off-Chain Privacy-Focused Computation Environment
zkCloud is built to solve the “privacy dilemma” in blockchain, a continued challenge that privacy-focused protocols face to find the balance between privacy and programmability. Many current blockchain iterations exhibit strong privacy with no programmability (such as earlier iterations like Zcash) and vice versa. Aleo believes it is the first blockchain system to offer both in an equitable manner.
Zero-knowledge, or ZK, is a form of encrypted cryptographic technology that allows one party (the prover) to verify to another party (the verifier) that specific information is true without revealing additional sensitive data.
Let's have a look at a hypothetical real-world example of a person using a privacy-focused shielded identity.
Case and point, imagine a person wishes to order a drink at a bar. For them to legally have an alcoholic beverage at that establishment they must be of legal drinking age. If they had a government-verified identity that made use of blockchain and ZK, the person would be able to verify that they are of legal age without revealing any personal information such as their name, address, or even their actual age.
Moreover, it is crucial to have a basic understanding of the two main primitives of zero-knowledge applications and how they interact with zkCloud itself. In a larger context, these two applications are shielded identities and shielded transactions. Let’s get into it.
Shielded Identities
In many respects, shielded identities act as a firewall to protect the sensitive information of a given person or entity (think a driver’s license that hides all personal information) allowing individuals, smart contracts, DAOs, and enterprises to interact with each other without revealing private data that doesn’t need to be known by the requesting entity.
An example could be an on-chain Know Your Customer (KYC) process typically used on a crypto exchange or within a dark pool. Typically on Ethereum, a user is required to reveal their full account data and complete asset holdings through a pseudonym, while shielded identities allow a user to authenticate this data while also remaining completely anonymous.
Shielded Transactions
First introduced by Zcash in October 2016 as a means to send and receive private blockchain transactions, shielded transactions on Aleo possess a wide range of utilities well beyond asset transfers. These include as a mechanism to describe private interactions with another person or program, with examples including liquidity provisioning, governance voting, decentralized notifications, identity authentication, and more.
This design is significant because it allows only transacting parties to have access to sensitive data, meaning that malicious parties are unable to exploit these interactions because they are unable to learn the corresponding private details.
The Interaction Between Shielded Identities, Shielded Transactions and zkCloud
Shielded identities describe the individual(s), while shielded transactions allow them to interact with a given protocol or the like. On Aleo, this process is conducted in an off-chain environment known as zkCloud.
zkCloud is a peer-to-peer (P2P), decentralized, private computing platform that forms an integral component of the Aleo stack, enabling a more secure, private, and personalized application development paradigm.
zkCloud allows shielded identities to interact in a direct (as an asset transfer) or programmable manner (via a smart contract). Because this interaction is conducted off-chain, privacy is guaranteed and significantly higher transaction throughput is realized.
Shielded transactions are able to link the interactions of one or more parties on zkCloud to the Aleo blockchain. The privacy-focused transactions contain cryptographic proofs to ensure that those interactions are in fact valid. Nonetheless, by default, they do not disclose what program was executed, or who participated in the transfer. This means the Aleo blockchain stores these transaction records which can be referenced to ascertain the global state of an application at any time.
To recap, shielded transactions are submitted to the Aleo blockchain which updates its global state and is anchored to the activity on zkCloud, therefore providing a decentralized and censorship-resistant data availability guarantee to prove that the data processed was in fact legitimate.
zkCloud applications can be run locally, on a user’s machine, or be delegated to a specialized prover that creates cryptographic proofs and submits transactions on behalf of its users. This model creates the potential for a vast range of practical real-world applications on Aleo, opening the door for a new marketplace for delegated private computation.
Finally, it is important to understand that zkCloud is made up of Aleo’s ZK-focused snarkOS operating system and snarkVM, a privacy-focused virtual machine smart contract creation engine.
SnarkOS: The Foundation of the Aleo Network
SnarkOS is Aleo’s state-of-the-art decentralized operating system for zero-knowledge applications. SnarkOS code forms the backbone of the Aleo network and is used to verify and store the system’s encrypted application state in a publicly verifiable manner.
By employing the use of zero-knowledge proofs, snarkOS enables the development of applications that prioritize confidentiality and safeguard sensitive data types and transactions for users, ensuring they possess full authority over their information.
snarkOS is designed to offer extreme scalability capable of harnessing significant transaction volumes to empower the development of high-capacity dApps capable of supporting the vast requirements of enterprise-level applications.
The snarkOs platform enforces data availability guarantees on Aleo for all programs and transactions on the network, while interacting with AleoBFT to ensure verifiers compute zero-knowledge proofs to checkpoint state on-chain.
In addition, Aleo’s snarkOS leverages a robust systemization framework that guarantees the platform will continue to evolve as it matures, allowing developers and community participants to contribute to the platform's ongoing development.
snarkOs also makes use of the Aleo SDK as a means to allow protocols building on the platform to create their own protocols and dApps atop the Aleo network.
SnarkVM: Aleo’s Privacy-Focused Smart Contract Creation Engine
Aleo’s virtual machine comes in the form of snarkVM, an immensely powerful smart contract creation, execution, and deployment engine that leverages the utility of zk-SNARKs (zero knowledge succinct non-interactive arguments of knowledge) to enable privacy preservation on the Aleo blockchain, snarkOS, zkCloud, and the underlying Aleo ecosystem.
In more detail, the snarkVM utilizes three main architectural components:
- snarkVM synthesizer - used to translate code into circuits that are compatible with the underlying zk-SNARK cryptographic proof system
- snarkVM algorithms - the implementation and execution of the proof system and the primitives that support it
- snarkVM ledger - data structures and methods that enable storage and interaction with the Aleo blockchain
SnarkVM possesses several main characteristics that allow it to fulfill an advanced paradigm for the creation of privacy-focused applications and smart contracts. These include:
- Enhanced privacy: snarkVM is a privacy-focused platform realized through the use of zk-SNARKs that cryptographically ensures sensitive transaction details and smart contract logic remain confidential. zk-SNARKs preserve user privacy in a trustless and decentralized environment.
- Increased scalability via zero-knowledge proofs: To enhance network scalability, zk-SNARKs provide succinct verification of complex computation. SnarkVM allows smart contract computational load to be transported from the Aleo blockchain to an off-chain environment, significantly improving the efficiency of the network to enable higher transaction throughput and scalability.
- Realizing cross-chain interoperability: Along with additional features on Aleo, snarkVM helps lay the foundation for a network employing a cross-chain interoperable structure. By harnessing zero-knowledge proofs, snarkVM is able to help create bridges between different blockchains, allowing for the transfer of assets and various data types.
- Flexibility and turing-completeness: The snarkVM smart contract engine is built using a turing-complete design that is proficient at executing a wide range of complex computations. This flexible design allows software engineers to create highly-sophisticated applications, allowing for increased smart contract generation and execution.
- Improved user experience: snarkVM helps improve user-dApp interaction via smart contracts and transaction execution with minimal latency thanks to off-chain computation, resulting in faster transaction confirmation, decreased waiting times, and improved dApp responsiveness.
AleoBFT: A Hybrid Approach to Aleo Consensus
Prior to mainnet launch during the third phase of Aleo’s testnet 3, the Aleo blockchain transitioned to AleoBFT. This allowed the network to become more efficient and scalable, while incorporating a more advanced framework for privacy-focused applications, while facilitating a means to better incorporate validators, provers, and stakers into the network.
The AleoBFT consensus mechanism makes use of a novel consensus algorithm custom-built for Aleo based on Bullshark/Narwhal (both BFT frameworks conceptualized by Sui and Aptos). AleoBFT is a DAG-based consensus framework that combines the increased finality of Proof-of-Stake (PoS) with the robust incentive mechanism of Proof of Work (PoW).
AleoBFT is a hybrid consensus focused on its relationship with provers and validators. Case and point, AleoBFT blends the instant finality of new blocks from validators, with the computational power of provers as a means to introduce Coinbase supply (in the form of Aleo Credits) into the network. This model incentivizes validators to preserve network liveness by continuously producing blocks, while also incentivizing provers to continually scale proving capacity to the Aleo network.
AleoBFT guarantees three critically important characteristics within the network:
- Instant block finality - transactions are confirmed once validators produce and achieve consensus for each block, resolving shallow forking for validators, while improving node stability. This design provides a smooth application development experience, while improving the experience for users by ensuring immediate transaction confirmation in wallets and applications while supporting the potential for wide-scale system interoperability.
- Ensures the network remains decentralized AleoBFT’s design allows for the decoupling of block production from Coinbase generation (Coinbase holds a large stake in the Aleo network), meaning validators are in charge of producing blocks and provers are able to compute proofs at their desired scale. The AleoBFT model also incentivizes provers to become validators by staking a minimum of 1 million Aleo credits on the network, guaranteeing provers can maintain their censorship-resistance as a representative of all provers taking part in consensus.
- Incentivizes prover scaling capacity as the network grows - in this model, provers solve and produce Coinbase SNARK proofs (in the form of PoSW) in exchange for a share of the block reward. This means that provers are providing computational energy within the core subcomponents of zero-knowledge proofs, while earning their percentage share in proofs from each block reward.
In summary, AleoBFT is extremely cost-effective and secure and also boasts a strong economic model:
AleoBFT is built to be cost-effective because it allows users to package data off-chain and upload it as a less computationally heavy cryptographic proof, markedly reducing network gas fees that are required to participate in the Aleo network.
Because of its Proof of Stake design and other features, Aleo represents an extremely secure network that has the capability to dramatically reduce the amount of sensitive data that is susceptible to attack vectors by packaging them inside zero-knowledge proofs.
AleoBFT helps enable the Aleo network’s robust and adaptable economic model by incentivizing user participation through Aleo Credits, allowing users to increase the network’s security through staking, validating transactions, and proof generation.
Aleo Network Participants
The Aleo network leverage the use of three main network participants, including:
- Validators - used to operate nodes, validate transactions, and participate in network consensus in exchange for earning rewards for their services
- Stakers - used to lock Aleo credits within validators, allowing validators to participate in consensus and secure the greater Aleo network
- Provers - leverage specialized hardware to generate proofs and solve various cryptographic puzzles (which are verified by validators and included in blocks) to earn Aleo Credits
Let’s have a look at each of the three in more detail:
Validators
Aleo validators constitute infrastructure service providers that secure the Aleo network via AleoBFT, the network’s proprietary Proof of Stake consensus that utilizes Bullshark and its directed acyclic graph (DAG) Narwhal-style memory pool.
In terms of their multifaceted role within the network, validators verify and confirm blocks of transactions, agree on state with their peers via network consensus, include cryptographic proofs generated by provers when creating blocks, and receive fees in exchange for their computational work securing the network.
One million Aleo Credits is the minimum requirement that all validators operating on the network must hold, while those who wish to operate a validator must leverage specialized snarkOS software.
Stakers
Any individual or organization that wishes to earn incentivized staking rewards by locking up their Aleo Credits for a predetermined period to support the security of the network can do so.
In this process, stakers delegate Aleo Credits to network validators, which in turn contributes to the validator’s stake weight required to participate in consensus. In addition, stakers earn a proportional amount for inflationary rewards that are initially provided to the validator they stake within.
It is possible to stake as little as 1 Aleo Credit; however, stakers are not eligible to earn staking rewards unless they have staked at least 10 Aleo Credits. It is possible to stake credits in a variety of ways, including staking platforms, supported Aleo ecosystem wallets, and directly to Aleo validator dashboards.
In terms of the amount of staking rewards that can potentially be earned by stakers, it seems likely that the annual percentage rate (APR) upon mainnet launch will be somewhere between 15 and 20%. This APR will naturally decrease over time as more users stake on the network and inflationary rewards decrease.
On Aleo, staking rewards are determined by the ever-changing amount (as users deposit and withdraw stake on a continuous basis) of Aleo Credits staked globally and the inflation rate of distributed network rewards. Aleo Credits block rewards will remain constant for the foreseeable future unless adjusted by a governance vote.
Provers
Aleo provers (typically referred to as ZK provers or ZK miners) are an individualized zero-knowledge specific architecture type that supports the Aleo blockchain by solving Proof of Succinct Work (PoSW) Coinbase cryptographic puzzles via SNARK proofs incorporated into blocks that Aleo validators finalize.
In the larger picture, Aleo provers compete with one another to solve cryptographic Coinbase puzzles by generating SNARK proofs that appease a target difficulty threshold as determined by the Aleo protocol. The more effective they are at solving these cryptographic discrepancies, the higher the probability they will receive Aleo Coinbase rewards.
Provers earn Coinbase rewards (in the form of Aleo Credits) in proportion to the number of valid solutions submitted, meaning they provide 50% of rewards to validators to incentivize their inclusion and reward receipt.
Network participants that wish to become provers must utilize proving software such as snarkOS and efficient hardware such as a specialized GPU or typical CPU. The system rewards those that correctly verify the largest number of cryptographic proofs, with specialized hardware completing the process most efficiently.
Coinbase rewards earned by provers are proportional to the total allocated amount (out of the total supply of Coinbase Aleo Credits) from Aleo’s initial inflation once mainnet launch commences. In addition, Coinbase rewards decrease in a linear manner until emission stops around the tenth year. At launch, the estimated APR provers receive is between 40 and 50%, which will slowly decrease over time as the network matures.
Aleo Software Development Kit
Analogous to the Cosmos SDK and other well-known blockchain software development kits, the Aleo SDK is a multifaceted framework for the development of applications and protocols on the Aleo network.
The Aleo SDK encompasses a wide range of tools meant for the creation of zero-knowledge applications, these include several JavaScript and TypeScript libraries that provide the following functionality:
- Communication with the Aleo network
- Management of program state and data
- Aleo account management
- Web-based program execution and deployment
- Aleo credit transfers
The AleoSDK actually offers four different TypeScript- and JavaScript-based SDKs that are varied by their intended use. These include the:
- Aleo SDK - allows for the development of zero-knowledge web apps
- Create-Aleo-App - provisions zero-knowledge web application examples in commonly used frameworks such as React, enabling a simplified web application development environment
- Aleo WASM - a Rust crate (i.e., the compilation unit of Rust code) used to compile and execute zero-knowledge Aleo code into WebAssembly (WASM) and JavaScript
- Aleo Python SDK - a development kit that allows developers to utilize two separate libraries (i.e., the aleo library and the zkml library), allowing developers to build zero-knowledge applications by bringing snarkVM functionalities to Python, while also transpiling scikit-learn (a free machine learning library for Python) machine learning models into Leo programs
Leo Programming Language
Throughout the last several years, Aleo co-founder Collin Chin and the Aleo team created its very own programming language custom-built to increase the utility of the Aleo network stack. Leo leverages a Rust-like design to simplify complex cryptographic primitives via an easy-to-use and secure model needed to develop ZK-powered privacy-preserving applications on Aleo.
Leo is specifically developed for Aleo to simplify the creation of decentralized applications that ensure a high degree of confidentiality and anonymity. This is critically important because of the network’s privacy-centric zero-knowledge design.
Of utmost significance, Leo is built as a language that greatly simplifies application development by removing the need for advanced cryptography and math expertise previously needed to build ZK apps that are converted into ZK circuits within the application.
Leo is user-friendly and reminiscent of JavaScript and TypeScript, making it accessible to developers with little cryptography knowledge, while allowing the vast number of global JS and TS developers to have a straightforward learning curve.
The Leo language consists of several defining characteristics that make it an extremely advanced paradigm for application development. These are:
- High-level abstraction - designed to remove the complexity of cryptographic primitives and complex knowledge requirements, allowing developers to focus on application logic
- Intuitive syntax allows the language to be accessible to a vast range of programmers, including those without blockchain experience
- Built-in security mechanisms - pivotal for protection against common vulnerabilities and errors within smart contracts
- Connection between high-level and low-level code - acts as a bridge between abstract programming and specific Aleo instructions to ensure seamless integration and interaction
- Automation of compilation - allows for automated compilation into Aleo instructions (by converting instructions into ZK circuits) to simplify the application development and deployment process
- Versatility - extremely versatile for a wide range of applications ranging from simple transactions to complex DeFi, machine learning, and neural network integration
- Formalized verification - used to check the correctness of logic and algorithms integrated with Leo and other additional system components
- Rigorous testing and audit - designed to produce extremely reliable and secure code, realized through rigorous testing and auditing procedures
- Open-source - fully open-source, allowing anyone to participate in its analysis and improvement over time
In addition, Aleo prioritizes robust and accessible development support for Leo developers, including documentation, tutorials, a GitHub repository, and numerous integrated development environments (IDEs).
This cultivates a learning-focused and collaborative ecosystem for developers, while its open-source nature further encourages community collaboration by allowing engineers to contribute to its evolution and benefit from the collective intellect of the Aleo community long-term.
Aleo also created a software development playground that allows developers to learn how to use the Leo programming language before they start building their own applications on the Aleo mainnet.
AI and Neural Network Inference Computation with Leo
Artificial intelligence is now able to provide a solution for many tasks that previously required human intelligence, greatly enhancing the capabilities of software frameworks. The majority of AI systems presently available are built upon neural networks that express vast capability for performing complex tasks and have now set the stage for a vast number of recent AI breakthroughs.
In general, AI workflows make use of two distinct phases: training and inference. Throughout this workflow, the data-intensive nature of contemporary AI systems often exhibit a host of privacy concerns. This is addressed on Aleo via zero-knowledge proofs.
A neural network is made up of numerous connected neurons and is a mathematical function that is used to deterministically transform input values into output values. This means computing the output of a neural network in a zkSNARK using provided input features. The Leo language is used to protect the data contained in these inputs and outputs.
This structure allows Leo to provide inference computation for neural networks on the Aleo platform using zkSNARKs. This allows for the utilization of fixed point arithmetic Python scripts (and other complex mechanisms) to automatically generate neural network Leo code.
Essentially, the main takeaway from the complexities discussed above, is that this system allows the Leo language to create highly complicated AI-driven features in the applications and protocols software developers create, greatly increasing the platform’s potential applicability for a massive number of real-world uses.
Resources
The information provided by DAIC, including but not limited to research, analysis, data, or other content, is offered solely for informational purposes and does not constitute investment advice, financial advice, trading advice, or any other type of advice. DAIC does not recommend the purchase, sale, or holding of any cryptocurrency or other investment.