Layer 2 Blocks - StarkNet

    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    db_img

    Transaction Cost in StarkNet

    Generally, a transaction’s cost depends on several factors:Source

    1. Data - the amount of data sent to L1
    2. Cost of computation
    3. Storage cost
    4. L2 network transmission cost for the transaction

    In this dashboard, we are going analyze Starknet Blocks. The main questions to answer in this dashboard is that how many layer2 StarkNet blocks have been accepted on Ethereum (L1) chain so far? and how much fees have been paid to Ethereum network? Has StarkNet contributed to saving in transaction fees for its users?

    Introduction

    StarkNet is a permissionless decentralized ZK-Rollup. It operates as an L2 network over Ethereum, enabling any dApp to achieve unlimited scale for its computation – without compromising Ethereum's composability and security.

    Each StarkNet block is registered on ethereum blockchain by means of a transaction emanating from the StarkNet operator to StarkNet core contract

    Method

    • Number of created blocks on L2 is extracted from tokenflow_starknet.decoded.blocks table.
    • Number of registered blocks on L1 is extracted from tokenflow_starknet.l1_data.blocks table.
    • The fee of registering L2 blocks on L1 is extracted from ethereum.core.fact_transactions table.

    In the following tables, we can see number of accepted blocks on L1 and block fees paid to L1:

    The Fees Paid for all L2 blocks registration on L1 shows all fees that paid for registering L2 blocks to l1 and Fees Paid for all transactions from StarkNet operator contract to StarkNet core contract shows all fees of transactions StarkNet operator interacts with StarkNet core contract

    In the following chart, we can see number of blocks created on L2 per day:

    Loading...
    • It seems that at the beginning of network launch, many blocks have been created.

    In the following chart, we can see transaction counts per each block on L2 and paid fee on L1 per each transaction in each block of L2:

    • We can see that when count of transactions in each block increases, the transaction cost (L1 Fee) per each transaction decreases.

    In the following tables, we can see highest and lowest fees paid per transaction on L2 based on paid fee on L1:

    Conclusion

    • Paid fee amount on L1 depends on several factor such as network traffic on L1, Volume of L2 block ,...
    • In this report, number of transactions per block examined and it shows that the more transaction we have per block, the less fee we pay per L2 transaction on L1.
    • The more Starknet manages to balance this parameter, the more saving transaction fees for its users.