Cairo course

Cairo Level 11: Security

Security is level 11 of 14 of the LoWisa Cairo course. It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

Updated 2026-11-30

Access Control

  • Caller checks. get_caller_address gates privileged functions: assert against stored owners and roles.
  • Role components. Access-control components supply roles and admin transfer: audited machinery, mounted.
  • Zero-address hygiene. The zero address is checked at boundaries: default values never becoming owners.

Contract Threats

  • Familiar classes. Starknet inherits the classics: access flaws, oracle games, reentrancy: plus its own quirks.
  • felt arithmetic care. Field arithmetic wraps differently than integers: bounded types and checks where money moves.
  • L1-L2 messaging risks. Cross-layer messages arrive asynchronously: ordering and replay handled by design.

Secure Starknet Design

  • Checks-effects-interactions again. The ordering discipline transfers: state settled before external calls, always.
  • Upgrade governance. Class-hash upgrades sit behind timelocks and multisigs: the power users must be able to read.
  • Audit process. Security remains a process: threat model, tests, review, audit: never a checkbox.

Before and after this level

In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See Checkpoints and flashcards.

Frequently asked questions

What does Cairo Level 11: Security cover?

Access Control, Contract Threats, Secure Starknet Design: 3 lessons and 9 ideas.

What should I know before this level?

The level before it, Level 10: Testing, which covers Cairo Tests, Starknet Contract Tests, Failure and Edge Cases.

Learn Cairo on your phone

The first level is free. LoWisa is on Google Play and the App Store.