# Sept 24, 2023
#### Cairo Overview
- creates provable program
- runs on top of cairo vm
- inspired by rust
- similar ownership model
- statically typed
- can be used outside of Starknet (general purpose language for writing provable programs)
- no need to learn ZK
#### Why Cairo
- creates provable programs
- proof of computational integrity (result of computing your output with certain inputs)
- verification without re-execution
- powerful & flexible language
- prevents cheating and malfunction
- keeps a super computer honest
Validity Proof `VP` is a compressed outcome of computation performed by the PROVER
`VP = COMPRESSED COMPUTATION`
#### Validity Proof (VP)
- a use case of ZK proof (computation & compression)
- used for compression not privacy
- if output is result of `program + inputs`, output can be verified w/o inputs (this is why compression is important, program input is not needed)
- Validity Proof === Validity Rollup
- Based on STARKS not SNARKS
- efficient proving and verification
2 Levels of finality:
- L2 finality -
- L1 finality - the finality that takes place on L1 when Starknet's verifier contract validates a given txn (happens every 2-4hrs)
How quickly are generated proofs submitted to L1
NB - several blocks are bundled to generate a single proof
##### Difference Between STARKs & SNARKs
STARK | SNARK
Verification - log^2^n | constant
Proof size - ~400KB | 288bytes
Proving time - 1x | 10x
Trusted setup no | yes
Quantum secure yes | no
#### Cairo Syntax
# Deep Dive into Starknet OS
https://hackmd.io/@pragma/ByP-iux1T