glossary·2026-03-08·1 min read

Program

Program

A program is Aleo's equivalent of a smart contract. It is the basic deployment unit, identified by a unique name.aleo identifier. A program defines data types (structs and records), functions that operate on those types, and optional mappings for public on-chain state.

Programs are typically written in Leo and compiled to Aleo instructions, though developers can write Aleo instructions directly. Once compiled, a deployment transaction stores the bytecode and verifying keys on-chain. After that, anyone can call the program's functions by submitting execution transactions.

Aleo programs differ from traditional smart contracts in one key way: their functions execute off-chain on the caller's machine (or a delegated prover), and only a zero-knowledge proof of correct execution goes to the network. Program logic runs privately by default. Programs can include final { } blocks for on-chain logic like updating mappings. They can import and call other deployed programs. Each must define a constructor that specifies its upgrade policy. Program IDs are globally unique and permanent.

Sources