What You'll Learn in This Chapter
In this chapter, you'll dive into the core concepts behind AO (Actor Oriented) — a new paradigm in decentralized computing.
Unlike traditional smart contracts, AO is designed as a hyper-parallel, infinitely scalable decentralized supercomputer.
Understanding AO at its foundation is essential before moving on to more advanced topics like AOS and building custom VMs.
By the end of this chapter, you'll understand:
- What AO is, and why it was created
- The fundamentals of the Actor Model and message-driven concurrency
- AO's system architecture (Messenger, Scheduler, and Compute Units)
- How Wasm modules work in AO and how they support multiple programming languages
- The big picture of AO's token design and security model
Grasping these fundamentals will give you a clear perspective on why AO could become the next generation of smart contract infrastructure.
AO Fundamentals
What is AO?
AO stands for Actor Oriented, and it refers to a decentralized, hyper-parallel supercomputer built on top of Arweave. Unlike traditional smart contracts running on blockchains, AO is designed to scale horizontally without limits.
Key features of AO include:
- Parallel Execution: Thousands of processes can run concurrently.
- Message Passing: All communication between actors happens via messages.
- Scalability: Designed for theoretically unlimited horizontal scaling.
- Modularity: Supports various languages and virtual machines.
- Arweave Persistence: All data and state are permanently stored on Arweave.
AO itself is a protocol with open and diverse implementations. One of the first implementations is AOS, which is based on the Lua programming language.
The Actor Model & Messaging
AO uses the Actor Model, a computing paradigm introduced by Carl Hewitt in 1973. It models concurrent computation using independent "actors."
Core properties of the actor model:
- Actors: Fundamental units of computation, each with its own state and mailbox.
- Message Passing: All communication between actors is message-based.
- Asynchronous Processing: Message handling is non-blocking and asynchronous.
- Encapsulated State: Actors manage their own state, which cannot be accessed directly by others.
- Spawning: Actors can dynamically create new actors.
Unlike traditional object-oriented programming, the actor model eliminates shared memory and relies solely on message-passing, dramatically simplifying concurrency.
In AO, each process (actor) can send messages to other processes. These messages can contain both data and arbitrary tags for contextual information.
AO Architecture
The AO system is composed of three main components:
- Messenger Unit (MU): Receives, verifies, and routes incoming messages.
- Scheduler Unit (SU): Orders messages and stores them on Arweave.
- Compute Unit (CU): Processes messages and updates the actor's state.
These components are loosely coupled and operate independently, enabling flexible and scalable system design.
The typical data flow is as follows:
- A user sends a message to the MU.
- The MU verifies the message and forwards it to the appropriate SU.
- The SU timestamps and stores the message on Arweave.
- The CU fetches and executes the message, updating state accordingly.
- If necessary, the output is passed back to the MU for further processing.
This architecture is key to AO's scalability and flexibility.
Basics of Wasm Modules
AO processes are executed using WebAssembly (Wasm) modules. Wasm is a compact binary format that allows code to run at near-native speed and can be compiled from multiple languages.
Key features of Wasm:
- High Performance: Nearly native execution speed.
- Compact Size: Small binaries enable efficient network transfer.
- Language Agnostic: Supports C/C++, Rust, Go, and more.
- Sandboxed: Provides a secure execution environment.
- Memory Limits: Wasm32 has a 4GB limit, while Wasm64 supports up to 16GB.
AOS uses Lua compiled to Wasm, but AO supports alternative VMs and languages. In the latter half of this tutorial, we'll implement a custom JavaScript-based VM as an example.
AO's Economic Model
AO tokens play a central role in incentivizing and securing the network. Key features include:
- Fixed Supply: Capped at 21 million tokens, similar to Bitcoin.
- Automatic Distribution: Tokens are distributed every 5 minutes.
- Split Allocation:
- 33.3% to AR token holders
- 66.6% to aoETH holders
- Halving Schedule: Follows a Bitcoin-like halving model.
These tokens ensure network security and reward contributors. Specifically, staking via the AO-Sec Origin process and operator stakes (for SU/MU/CU) help maintain network integrity.
AO's Security Model
AO’s security is maintained through two core mechanisms:
- AO-Sec Origin: Provides the basic staking and slashing mechanism for malicious behavior.
- Sybil-resistant Incentivized Validation (SIV): A multi-validator approach to prevent Sybil attacks.
AO-Sec Origin ensures that actors who host or sequence processes behave honestly — if they don't, their stake can be slashed.
SIV involves multiple independent validators verifying results, making it extremely difficult for a single malicious node to manipulate outcomes.
Together, these systems provide both robust security and high scalability for AO.