Starknet logoStarknet

Badges

About

Starknet is a general purpose ZK Rollup based on STARKs and the Cairo VM.


Value Locked

$623.60 M

2.97%

Canonically Bridged
$623.60 M
Externally Bridged
$0.00
Natively Minted
$0.00

  • Tokens
  • Daily TPS
    0.7829.16%
  • 30D tx count
    2.89 M

  • Stage
    Stage 0
  • Type
    ZK Rollup
  • Purpose
    Universal
  • Sequencer failureState validationData availabilityExit windowProposer failure

    Badges

    About

    Starknet is a general purpose ZK Rollup based on STARKs and the Cairo VM.


    Value Locked
    Activity
    Onchain costs
    Milestones & Incidents

    Starknet starts using blobs

    2024 Mar 13th

    Starknet starts publishing data to blobs.

    Learn more

    Starknet Provisions

    2024 Feb 14th

    Starknet begins allocating $STRK to early contributors and users.

    Learn more
    Risk summary
    Risk analysis
    Sequencer failureState validationData availabilityExit windowProposer failure

    Sequencer failure

    No mechanism

    There is no mechanism to have transactions be included if the sequencer is down or censoring.

    State validation

    ZK proofs (ST)

    zkSTARKS are zero knowledge proofs that ensure state correctness.

    Data availability

    Onchain (SD)

    All of the data (SD = state diffs) needed for proof construction is published onchain.

    Exit window

    None

    There is no window for users to exit in case of an unwanted regular upgrade since contracts are instantly upgradable.

    Proposer failure

    Cannot withdraw

    Only the whitelisted proposers can publish state roots on L1, so in the event of failure the withdrawals are frozen.

    Rollup stage
    StarknetStarknet is a
    Stage 0
    ZK Rollup.

    Learn more about Rollup stages
    Please keep in mind that these stages do not reflect rollup security, this is an opinionated assessment of rollup maturity based on subjective criteria, created with a goal of incentivizing projects to push toward better decentralization. Each team may have taken different paths to achieve this goal.
    Technology

    Validity proofs ensure state correctness

    Each update to the system state must be accompanied by a ZK proof that ensures that the new state was derived by correctly applying a series of valid user transactions to the previous state. These proofs are then verified on Ethereum by a smart contract.

    1. What is Starknet

    Zero knowledge STARK cryptography is used

    Despite their production use zkSTARKs proof systems are still relatively new, complex and they rely on the proper implementation of the polynomial constraints used to check validity of the Execution Trace.

    • Funds can be lost if the proof system is implemented incorrectly.

    1. STARK Core Engine Deep Dive

    All data required to reconstruct rollup state is published on chain

    State diffs are publish on-chain as blob or calldata on every state update. The state diffs contain information on every contact whose storage was updated, and additional information on contract deployments. From diffs full system state can be recovered. Contracts’ code is not published on L1, but can be trustlessly verified if available elsewhere.

    1. On-Chain Data - Starknet documentation
    State derivation
    Node software

    The Juno node software can be used to reconstruct the L2 state entirely from L1. The feature has not been released yet, but can be found in this PR.

    Compression scheme

    Starknet doesn’t use any compression scheme.

    Genesis state

    There is no non-empty genesis state.

    Data format

    The data format has been updated with different versions, and the full specification can be found here.

    State validation

    Each update to the system state must be accompanied by a ZK proof that ensures that the new state was derived by correctly applying a series of valid user transactions to the previous state. These proofs are then verified on Ethereum by a smart contract.


    Proven Program

    The source code of the Starknet OS can be found here. The source code of the bootloader can be found here.

    • Funds can be lost if the proof system is implemented incorrectly.

    Operator

    The system has a centralized operator

    The operator is the only entity that can propose blocks. A live and trustworthy operator is vital to the health of the system. Typically, the Operator is the hot wallet of the Starknet service submitting state updates for which proofs have been already submitted and verified.

    • MEV can be extracted if the operator exploits their centralized position and frontruns user transactions.

    Users can't force any transaction

    There is no general mechanism to force the sequencer to include the transaction.

    • Users can be censored if the operator refuses to include their transactions.

    1. Censorship resistance of Starknet - Forum Discussion
    Withdrawals

    Regular exit

    The user initiates the withdrawal by submitting a regular transaction on this chain. When the block containing that transaction is proven the funds become available for withdrawal on L1. Finally the user submits an L1 transaction to claim the funds. This transaction does not require a merkle proof. Note that the withdrawal request can be censored by the Sequencer.

    • Funds can be frozen if the operator censors withdrawal transaction.

    1. Withdrawing is based on l2 to l1 messages - Starknet documentation

    Emergency exit

    There is no generic escape hatch mechanism as Starknet cannot be forced by users into a frozen state. Note that a freezing mechanism on L2, to be secure, requires anti-censorship protection.

    Upgrades & Governance
    A diagram of the upgrades and governance
    A diagram of the upgrades and governance

    The Upgrading mechanism of Starknet follows a similar scheme for all of their smart contracts. A contract initializes with the creator of the contract as a Governor, who can then nominate or remove other Governors allowing them to call restricted governor functions.

    The Starknet core contract is upgradable by 2 appointed Starknet Proxy Governors: A Proxy multisig with a 2 / 5 threshold and an EOA. Implementations can be upgraded without delay, thus users are not provided with an exit window in case of unwanted upgrades.

    Starknet Implementation Governors have the authority to execute governed functions that modify contract parameters without delay. These actions encompass registering/removing Operators, specifying the program and config hash, or setting the Message Cancellation Delay between L1 and L2. Currently it is governed by a Multisig with a 2 / 5 threshold and an EOA. The verifier address is set upon initialization of the Starknet Implementation contract.

    Via the proxy contracts, the SHARP Verifier Governors can upgrade the GPSStatement Verifier implementation. It is important to note that the state is also maintained in the implementation contract, rather than in the proxy itself. An upgrade to the Verifier could potentially introduce code that approves fraudulent states. Currently, there is no delay before any upgrade takes effect.

    The StarkGate bridge escrows are mostly governed and upgraded by a Bridge Multisig, others by different owners. (see Permissions section)

    At present, the StarkNet Foundation hosts voting for STRK token holders (or their delegates) regarding protocol updates to reflect community intent, however, there is no direct authority to implement the execution of these upgrades.

    Permissions

    The system uses the following set of permissioned addresses:

    Starknet Proxy Governors (2) 0xD5fB…B2630x83C0…e988

    Can upgrade implementation of the system, potentially gaining access to all funds stored in the bridge. Can also upgrade implementation of the StarknetCore contract, potentially allowing fraudulent state to be posted. Currently there is 0s delay before the upgrade.

    ProxyMultisig 0x83C0…e988

    This is a Gnosis Safe with 2 / 5 threshold. One of Proxy Governors.

    Those are the participants of the ProxyMultisig.

    Starknet Implementation Governors (2) 0x16C8…eA3E0x86fD…b1Bd

    The governors are responsible for: appointing operators, changing program hash, changing config hash, changing message cancellation delay. There is no delay on governor actions.

    SHARP Verifier Governors (2) 0x3DE5…F5C60x21F9…AEc4

    Can upgrade implementation of SHARP Verifier, potentially with code approving fraudulent state. Currently there is 0s delay before the upgrade.

    SHARPVerifierGovernorMultisig 0x21F9…AEc4

    This is a Gnosis Safe with 2 / 4 threshold. SHARP Verifier Governor.

    Used in:

    SHARPVerifierGovernorMultisig participants (4) 0x0405…84880x5923…85580xebc8…fD7F0x955B…2Fec

    Those are the participants of the SHARPVerifierGovernorMultisig.

    Allowed to post state updates. When the operator is down the state cannot be updated.

    MakerDAO Governance 0x0a3f…dDC0

    In DAI bridge it can set max deposit per bridge and per user. In DAI escrow it can approve token transfers.

    StarkGate ETH owner (2) 0xC91E…B2Ae0x0152…C6Ec

    Can upgrade implementation of the ETH escrow, potentially gaining access to all funds stored in the bridge. Currently there is 3d delay before the upgrade.

    StarkgateETHSecurityAgentMultisig 0x77Dd…88c5

    This is a Gnosis Safe with 2 / 3 threshold. Can enable the token withdrawal limit of the Starkgate escrow for ETH.

    StarkgateETHSecurityAgentMultisig participants (3) 0x030c…57550x5923…85580x35FD…4a7b

    Those are the participants of the StarkgateETHSecurityAgentMultisig.

    StarkGate WBTC owner 0x0152…C6Ec

    Can upgrade implementation of the WBTC escrow, potentially gaining access to all funds stored in the bridge. Currently there is 3d delay before the upgrade.

    StarkGate USDC owner 0x0152…C6Ec

    Can upgrade implementation of the USDC escrow, potentially gaining access to all funds stored in the bridge. Currently there is 3d delay before the upgrade.

    StarkGate USDT owner 0x0152…C6Ec

    Can upgrade implementation of the USDT escrow, potentially gaining access to all funds stored in the bridge. Currently there is 3d delay before the upgrade.

    StarkGate wstETH owner 0x0152…C6Ec

    Can upgrade implementation of the wstETH escrow, potentially gaining access to all funds stored in the bridge. Currently there is 3d delay before the upgrade.

    StarkGate rETH owner 0x0152…C6Ec

    Can upgrade implementation of the rETH escrow, potentially gaining access to all funds stored in the bridge. Currently there is 3d delay before the upgrade.

    StarkGate UNI owner 0xF689…e86b

    Can upgrade implementation of the UNI escrow, potentially gaining access to all funds stored in the bridge. Currently there is 0s delay before the upgrade.

    StarkGate FRAX owner 0x0152…C6Ec

    Can upgrade implementation of the FRAX escrow, potentially gaining access to all funds stored in the bridge. Currently there is 0s delay before the upgrade.

    StarkGate FXS owner 0x0152…C6Ec

    Can upgrade implementation of the FXS escrow, potentially gaining access to all funds stored in the bridge. Currently there is 0s delay before the upgrade.

    StarkGate sfrxETH owner 0x0152…C6Ec

    Can upgrade implementation of the sfrxETH escrow, potentially gaining access to all funds stored in the bridge. Currently there is 0s delay before the upgrade.

    StarkGate LUSD owner 0x5751…f21A

    Can upgrade implementation of the LUSD escrow, potentially gaining access to all funds stored in the bridge. Currently there is 0s delay before the upgrade.

    StarkGate MultiBridge Admin 0x5751…f21A

    Can upgrade implementation of the StarkGate MultiBridge escrow, potentially gaining access to all funds stored in the bridge. Is also the TokenAdmin of the StarkgateManager contract, permissioned to blacklist tokens from enrollment, pause deposits on the MultiBridge, and add existing bridges to the Registry contract. Additionally, the StarkgateManager and StarkgateRegistry contracts can be upgraded by this address.

    BridgeMultisig 0x0152…C6Ec

    This is a Gnosis Safe with 2 / 4 threshold. Can upgrade the following bridges: FRAX, FXS, sfrxETH, USDT, WBTC, ETH, USDT, and additional permissions on other bridges, like setting the max total balance or activate withdrawal limits.

    Those are the participants of the BridgeMultisig.

    StarkGate STRK owner 0x0152…C6Ec

    Can upgrade implementation of the STRK escrow, potentially gaining access to all funds stored in the bridge. Currently there is 3d delay before the upgrade.

    Smart contracts
    A diagram of the smart contract architecture
    A diagram of the smart contract architecture

    The system consists of the following smart contracts on the host chain (Ethereum):

    Starknet contract receives (verified) state roots from the Sequencer, allows users to read L2 -> L1 messages and send L1 -> L2 message.

    Can be upgraded by:

    Upgrade delay: No delay

    Implementation used in:

    CallProxy for GpsStatementVerifier.

    Proxy used in:

    SHARPVerifier 0x9fb7…1942

    Starkware SHARP verifier used collectively by Starknet, Sorare, ImmutableX, Apex, Myria, rhino.fi and Canvas Connect. It receives STARK proofs from the Prover attesting to the integrity of the Execution Trace of these Programs including correctly computed state root which is part of the Program Output.

    Implementation used in:

    FriStatementContract 0x30Ef…d400

    Part of STARK Verifier.

    Implementation used in:

    MerkleStatementContract 0x32a9…FdAd

    Part of STARK Verifier.

    Implementation used in:

    CairoBootloaderProgram 0x5860…c515

    Part of STARK Verifier.

    Implementation used in:

    MemoryPageFactRegistry 0xe583…C460

    MemoryPageFactRegistry is one of the many contracts used by SHARP verifier. This one is important as it registers all necessary on-chain data.

    Implementation used in:

    OldMemoryPageFactRegistry 0xFD14…D1b4

    Same as MemoryPageFactRegistry but stores facts proved by the old SHARP Verifier, used as a fallback.

    Implementation used in:

    L1DaiGateway 0x9F96…388d

    Custom DAI Gateway, main entry point for users depositing DAI to L2 where “canonical” L2 DAI token managed by MakerDAO will be minted. Managed by MakerDAO.

    This contract allows the permissionless creation and configuration of StarkGate token escrows. Tokens can also be blacklisted for creation, and already actively bridged tokens can be deactivated from depositing by a designated TokenAdmin.

    Can be upgraded by:

    Upgrade delay: 0s

    A central registry contract to map token addresses to their StarkGate bridge contract.

    Can be upgraded by:

    Upgrade delay: 0s

    Value Locked is calculated based on these smart contracts and tokens:

    StarkGate bridge for EKUBO, ZEND, NSTR (and potentially other tokens listed via StarkgateManager). There is no bridge cap.

    Can be upgraded by:

    Upgrade delay: 0s

    StarkGate bridge for ETH. There is no bridge cap.

    Upgrade delay: 3d

    Escrow for DAI 0x0437…585C

    DAI Vault for custom DAI Gateway managed by MakerDAO. The current bridge cap is 5.00 M DAI.

    StarkGate bridge for WBTC. There is no bridge cap.

    Can be upgraded by:

    Upgrade delay: 3d

    StarkGate bridge for USDC. There is no bridge cap.

    Can be upgraded by:

    StarkGate bridge for USDT. There is no bridge cap.

    Can be upgraded by:

    Upgrade delay: 3d

    StarkGate bridge for wstETH. There is no bridge cap.

    Can be upgraded by:

    Upgrade delay: 3d

    StarkGate bridge for rETH. There is no bridge cap.

    Can be upgraded by:

    Upgrade delay: 3d

    StarkGate bridge for UNI. There is no bridge cap.

    Can be upgraded by:

    Upgrade delay: 0s

    StarkGate bridge for FRAX. There is no bridge cap.

    Can be upgraded by:

    Upgrade delay: 0s

    StarkGate bridge for FXS. There is no bridge cap.

    Can be upgraded by:

    Upgrade delay: 0s

    StarkGate bridge for sfrxETH. There is no bridge cap.

    Can be upgraded by:

    Upgrade delay: 0s

    StarkGate bridge for LUSD. There is no bridge cap.

    Can be upgraded by:

    Upgrade delay: 0s

    Escrow for LORDS 0x023A…E5C9

    StarkGate bridge for LORDS.

    StarkGate bridge for STRK. There is no bridge cap.

    Can be upgraded by:

    Upgrade delay: 3d

    The current deployment carries some associated risks:

    • Funds can be stolen if a contract receives a malicious code upgrade. There is no delay on code upgrades (CRITICAL).

    Knowledge nuggets