Skip to main content
Accounts are the fundamental units of state in the Thru network. They serve as containers for data, code, and value, enabling programs to store persistent information and users to hold tokens. All network state is organized around accounts, from user wallets and program code to application data and system configuration. Thru implements an account model that manages state, ownership, and data for all entities on the network. Each account is uniquely identified by a 32-byte public key and contains metadata and arbitrary data that programs can read and modify.

Key Components

Account Model

Complete specification of Thru’s account structure, metadata, ownership model, and limitations. Covers account metadata fields (version, flags, sequence number, owner, balance, nonce), account types (permanent and ephemeral), ownership model including externally owned accounts (EOAs), account lifecycle (creation, active state, compression, deletion), and account operations (balance transfers, flag management, resizing).

Account Addresses

How account addresses are computed in Thru. Explains two methods for generating 32-byte addresses: keypair-derived addresses using ED25519 cryptography for externally owned accounts (EOAs), and program-derived addresses (PDAs) computed deterministically using SHA256 hashing with program public keys, ephemeral flags, and seeds.

Account Compression and State Proofs

Mechanism for archiving accounts to reduce validator storage requirements. Explains how validators compress cold accounts, the Merkle tree structure used for state proofs, and how transactions supply cryptographic evidence for the account_compress and account_decompress syscalls. Covers the three types of state proofs: creation proofs, existing proofs, and updating proofs.