Blockchain & Cryptocurrency Glossary

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

  • search-icon Clear Definitions
  • search-icon Practical
  • search-icon Technical
  • search-icon Related Terms

Cairo

1 min read
Pronunciation
[kahy-roh]
Analogy
Imagine a special programming language (Cairo) that not only lets you write instructions for a computer to follow, but also automatically generates a compact, verifiable 'certificate of correct execution' (a STARK proof) for whatever program you run. This certificate proves your program ran correctly without anyone needing to re-run the whole program or see all its private inputs. It's like a language designed for verifiable computation.
Definition
A Turing-complete programming language designed for creating provable programs for general computation, particularly known for its use in STARK-based ZK-Rollups and systems developed by StarkWare. Cairo allows developers to write complex logic whose execution can be efficiently proven with STARK proofs.
Key Points Intro
Cairo is a language for writing provable programs, enabling verifiable computation with STARK proofs.
Key Points

A high-level language that compiles to an assembly-like language called Cairo Assembly (CASM).

Turing-complete, allowing for general-purpose computation.

Designed to make it easier to write programs whose execution can be proven using STARK (Scalable Transparent ARgument of Knowledge) proofs.

Used to build L2 scaling solutions (like StarkNet), dApps, and other systems requiring verifiable computation.

Developed by StarkWare.

Example
Developers use Cairo to write smart contracts for StarkNet, a ZK-Rollup L2 for Ethereum. The execution of these Cairo contracts is proven off-chain, and the STARK proofs are submitted to Ethereum for verification, enabling scalable and secure L2 operations.
Technical Deep Dive
Cairo programs define a computation trace, which is then used by a STARK prover to generate a proof of computational integrity. The language is designed to facilitate this process, with features that map well to the arithmetic intermediate representation (AIR) required for STARKs. Unlike some other smart contract languages that compile to EVM bytecode, Cairo is specifically tailored for the STARK proving system. This allows for efficient proof generation for arbitrary computations.
Caveat
Cairo is a relatively new language and ecosystem. While powerful for provable computation, it has its own learning curve and development paradigm, different from more established smart contract languages like Solidity. The tooling and developer ecosystem are continuously evolving.

Cairo - Related Articles

No related articles for this term.