Key Takeaways
Starknet is a Layer 2 scaling solution for Ethereum that uses validity proofs to enable fast, low-cost transactions while inheriting Ethereum’s security.
The network processes transactions off-chain and sends cryptographic proofs to Ethereum for final verification.
Developers use Cairo, a custom programming language, to build scalable decentralized applications (DApps) on Starknet.
starknet cta banner
Introduction
Starknet is a layer 2 solution that uses Scalable Transparent Arguments of Knowledge (STARK) proofs to deliver faster, cheaper, and more scalable transactions. This allows developers to build high-performance decentralized applications (DApps) with lower costs and strong cryptographic guarantees without sacrificing on security or decentralization.
What Are STARKs?
STARKs, short for Scalable Transparent Arguments of Knowledge, are a type of cryptographic proof used to verify that computations were carried out correctly, without having to repeat the computation itself.
In the context of Starknet, STARKs are used to prove that off-chain transactions were processed properly before submitting a compact proof back to Ethereum. This helps Ethereum finalize large batches of transactions more efficiently and with lower costs.
STARKs do not inherently provide privacy and are unlike traditional zero-knowledge proofs (ZKP) as they focus on proving computational integrity. What makes STARKs especially powerful is that they don’t rely on a trusted setup, they scale well even as computations get more complex, and they’re built to resist future threats like potential quantum attacks.
What Is Starknet?
Starknet is a Layer 2 scaling solution designed to make Ethereum transactions faster and cheaper. Rather than processing every transaction directly on Ethereum’s main chain, Starknet handles them off-chain.
The network then generates a STARK proof to mathematically prove the transactions were executed correctly. This proof, along with a summary of the changes, is sent back to Ethereum, where it’s verified and finalized on-chain.
How Does Starknet Work?
1. Sequencer: managing transactions
The sequencer is responsible for receiving and organizing transactions. It batches these transactions together, checks which transactions are valid and discards the ones that fail (like insufficient funds or errors).
Only valid transactions are included in blocks, which are then passed along for further validation. As this process happens off-chain, the sequencer can achieve a higher throughput.
2. Prover: generating the proof
The prover takes the processed block and records each step of the transaction execution (known as the Execution Trace) and the resulting changes to the system’s state (called the State Diff). The prover then transforms this data and selects random portions to generate the final STARK proof, which serves as a mathematical guarantee that all transactions were executed correctly.
3. Settlement on Ethereum
The proof and final state changes are sent to Ethereum where two smart contracts handle the verification:
The Verifier contract checks the proof for accuracy. If the data is consistent and valid, it is approved.
The Starknet Core contract then updates Starknet’s state on Ethereum based on the verified proof.
Once accepted, this updated state is added to an Ethereum block, where it becomes part of the permanent record. As the proof confirms the validity of the off-chain computations, there’s no need to re-execute the transactions on Ethereum, which helps reduce congestion and cost.
Key Features of Starknet
Cairo: Starknet’s programming language
Starknet uses a custom smart contract language called Cairo, designed specifically for writing programs that can be verified with STARK proofs. It allows developers to build scalable applications on Starknet without needing to be cryptography experts.
The Cairo ecosystem includes developer tools like Dojo, an open-source game engine for building fully on-chain games, and Starknet React, a library that simplifies building web interfaces for Starknet DApps.
Native account abstraction
Starknet supports native account abstraction, which allows developers to offer Web2-like user experiences in Web3 applications. This includes features like passkeys, where users can log in without seed phrases and session keys, which lets users approve multiple transactions at once. The paymasters feature enables gasless transactions, where users can pay with ERC-20 tokens or have someone else cover the gas.
Cartridge Controller is an example of a Starknet smart contract wallet that brings these features to games. It supports one-click onboarding, player identities, achievements, and works with game engines and frontend tools.
Validity vs. Optimistic Rollups
Unlike optimistic rollups, which assume transactions are valid unless challenged, Starknet uses validity proofs to confirm correctness. This provides fast finality (since there’s no need to wait for a challenge period) and strong cryptographic guarantees.
However, optimistic rollups can be simpler to implement and may have broader compatibility with existing Ethereum tooling. Both approaches have their trade-offs, and the choice of rollup will depend on specific goals, such as latency, compatibility, and trust assumptions.
Challenges
Starknet does not offer native compatibility with the Ethereum Virtual Machine (EVM), which sets it apart from Layer 2s like zkSync Era and Scroll that let developers easily reuse existing Solidity code and Ethereum tooling.
Instead, Starknet requires developers to build using Cairo, the custom language designed for scalability through STARK proofs. While Cairo offers technical advantages, it introduces a new learning curve, which can slow down onboarding and make it harder to migrate existing apps.
STRK Token
The STRK token is the native utility token of the Starknet protocol. The token is used for a variety of purposes, including governance, transaction fees, and staking.
Governance: STRK holders can participate in protocol governance by voting on proposals, such as system upgrades or changes to the Starknet Operating System. Some proposals may require a minimum amount of STRK to support or initiate.
Transaction fees: STRK can be used to pay transaction fees on Starknet. When STRK is used, a portion is converted to ETH by the sequencer to cover Ethereum gas costs.
Staking: STRK can be staked in two ways:
As a validator: Stake a minimum amount of STRK and perform network responsibilities to earn rewards.
As a delegator: Delegate tokens to a validator and earn a share of the rewards without needing to run a validating node.
Closing Thoughts
Starknet offers a different approach to scaling Ethereum through the use of validity proofs, specifically STARKs. The rollup aims to increase throughput and reduce costs while maintaining Ethereum’s security guarantees. With features like the Cairo programming language and native account abstraction, Starknet is creating new opportunities for developers, particularly in areas like on-chain gaming and infrastructure