glossary·2026-03-08·1 min read

Record

Record

A record is Aleo's private state primitive. It works like a UTXO in Bitcoin, but with built-in encryption so only the owner can read its contents. Each record has typed data fields, an owner address, and a nonce that prevents double-spending.

When a function consumes a record, that record is destroyed, and new records are produced as outputs. This consume-and-create cycle prevents duplication and replay. On-chain, only encrypted ciphertexts and serial numbers (nullifiers) are posted. External observers cannot see what a record holds or link it to a specific user.

Records are declared in Leo with the record keyword. A record type must include an owner field of type address and can have additional fields of any supported type. Because records are off-chain objects decryptable only by their owner, they are the primary way to represent private balances, tokens, NFTs, and application-specific state on Aleo. Where Ethereum stores all state in publicly readable contract storage, Aleo defaults to encrypted, owner-controlled state via records and only uses public storage through mappings when shared visibility is needed.

Sources