Key takeaways
- Cairo supports programs whose execution can be verified through STARK proofs.
- It is Starknet’s contract language, with tooling distinct from Solidity.
- An execution proof does not replace a review of the contract’s rules.
What is Cairo?
Cairo expresses a computation whose execution can be supported by cryptographic evidence. On Starknet, developers use it to define contracts, store state and process operations included in the network’s proving system. The application program and the infrastructure that produces the proof perform different jobs.
For a business, that separation makes it possible to assess which participants must perform a calculation and which only need to verify its result. Verifiable computation can be useful beyond financial contracts. Feasibility also depends on proving costs, data handling and integration with the system that consumes the result.
Cairo does not automatically make an application private. A proof of correct execution does not hide transaction data that the application publishes. Confidentiality requirements need their own design and verification, alongside the execution model.
How it works
For Starknet contracts, Cairo source is compiled through Sierra, an intermediate representation, and then CASM. Execution supplies information used by the proving system. Scarb manages dependencies and compilation, while Starknet Foundry helps test contract behaviour and interactions.
Deployment distinguishes declaring a contract class from creating an instance. That distinction matters when recording versions, reproducing builds and verifying the code associated with an address. The application also needs a client that handles accounts, signatures, resource bounds and transaction states.
Starknet has a gas and fee model. Execution resources and costs associated with Ethereum contribute to it; counting trace steps alone or assuming a constant price is insufficient. Budgeting requires simulation of the actual workflow and a check of the parameters supported by the relevant protocol version.
What Cairo offers
Cairo provides verifiable execution and a contract environment designed for Starknet. It can fit a product that needs the network, its applications or its programmable accounts, provided the team can support a stack distinct from EVM development. Requirements should justify that choice.
Consider an application that groups several user actions under an account with limited permissions. Its design must specify which contracts the account may call, for how long and with what spending authority. Revocation, expiry and failure of an individual operation then become concrete test cases.
A technical evaluation should implement a complete journey with the account and wallet intended for production. This exposes signing and confirmation behaviour as well as isolated contract execution. It also provides evidence about integration work that a successful compiler run cannot supply.
Limitations and selection criteria
Cairo introduces its own data structures, serialization rules and programming conventions. Porting Solidity logic typically requires an implementation redesign and a fresh test suite. Libraries, analysis tools and integrations also differ from those available to an EVM team.
A validity proof establishes that execution follows a program, but the program can still encode incorrect business rules. Permission checks, economic invariants and unexpected inputs therefore remain essential test areas. Rollup security also requires assessment of upgrades, availability and exit mechanisms rather than an assumption that it matches Ethereum in every respect.
Before choosing Cairo, a project should confirm that it can maintain the compiler, dependencies and Starknet integrations. Solidity may reduce adaptation work when the same product needs multiple EVM networks. Where confidentiality is the objective, first define which information must remain hidden and from whom.
Also known as
- Cairo lang
- Starknet language
- ZK Cairo





