← Protocols
Aleo
01Description

Aleo is a privacy-preserving Layer-1 where every transition is a zero-knowledge proof executed off-chain by the user. Programs are written in Leo (high-level) or Aleo instructions, compiled with snarkVM, and run on snarkOS validators.

02Best for
  • 01privacy-first L1 dapps
  • 02shielded payments and records
  • 03ZK identity and credentials
  • 04off-chain execution with on-chain settlement
  • 05private DeFi primitives
03Install
  • curl -L https://raw.githubusercontent.com/ProvableHQ/leo/mainnet/install.sh | bash
  • leo new hello
  • leo run main
  • leo deploy --network testnet
  • pnpm add @provablehq/sdk
04Environment variables
VariableScopeDescription
ALEO_PRIVATE_KEYServerAleo account private key (APrivateKey1...) used to sign and execute transitions.
ALEO_NETWORKClientNetwork to target — `testnet` or `mainnet`.
ALEO_NODE_URLClientsnarkOS / explorer API endpoint (e.g. https://api.explorer.provable.com/v1).
05Prompt snippet
Use Aleo for a privacy-by-default L1. Scaffold with `leo new my_app`, write transitions in `src/main.leo` using `record` types for private state and `mapping` for public state, then `leo run <transition>` locally to execute and `leo deploy` to publish the program to testnet/mainnet. From a web app, use `@provablehq/sdk` (Aleo SDK): instantiate `ProgramManager`, load the deployed program, and call `programManager.execute(programId, functionName, fee, inputs)` with the user's `PrivateKey`. The SDK runs the prover in a Web Worker and broadcasts the resulting transaction to a snarkOS RPC node.
06Gotchas
  • Records are consumed in full when spent — like UTXOs — so you must track and re-mint change records yourself; ignoring this leads to lost balances.
  • Browser proving via the Aleo SDK requires Web Workers + WASM threads with COOP/COEP headers, and is memory-heavy for non-trivial circuits.
  • Leo and snarkVM versions must match the network's edition (testnet vs mainnet have different opcode sets); deployment fails silently on mismatch.
  • Deploy fees are paid in ALEO and scale with program size; large circuits can cost meaningfully more than expected.
  • Aleo uses its own address format (aleo1…) and is not EVM-compatible; bridges are required to interop with Ethereum tokens.
07Alternatives