# Starknet

### Overview

Starknet is a ZK rollup that posts transaction data to Ethereum using a verifier contract to validate STARK proofs. The current verifier is a set of multiple smart contracts, which is detailed in the [Starknet documentation](https://docs.starknet.io/architecture-and-concepts/solidity-verifier). The Starknet Dune query can be found [here](https://dune.com/queries/3948217).

### Query Structure

The query filters transactions sent to the StarkNet SHARP Verifier contract [address](https://etherscan.io/address/0x47312450b3ac8b5b8e247a6bb6d523e7605bdb60) that were successful and involved the verifyProofAndRegister function.

### Calculations

* The proof volume is the sum of verifyProofAndRegister function calls
* The cost is calculated using the following formula:&#x20;
  * $$\text{cost} = \sum\_{\text{txns}} \left( \text{gas\_used} \times \text{gas\_price} \times \text{eth\_price} \right)$$
  * Where:
    * $$\text{gas\_used} = 6000000 \times 0.7$$
      * The [gas cost of verification](https://community.starknet.io/t/starknet-costs-and-fees/113853) is fixed around 6M
      * 0.7 represents Starknet's share in the shared proof
    * $$\text{gas\_price}$$ is the price of gas on the day of the transaction
    * $$\text{eth\_price}$$ is the average price of ETH in USD on the day of the transaction
