Table of Contents
Fetching ...

Where Should I Deploy My Contracts? A Practical Experience Report

Cătălina Lazăr, Gabriela Secrieru, Emanuel Onica

TL;DR

This paper empirically evaluates deployment choices for Ethereum smart contracts across L1 and L2 by measuring practical metrics on two use cases: a security-focused voting DApp on L1 and a cost-sensitive supply-chain DApp on L2. It compares two L1 providers (Alchemy, Infura) and two rollups (Arbitrum One, Optimism) using RPC latency, throughput, nonce behavior, gas costs, and soft-confirmation latency. Findings show RPC latency matters when end users are geographically distant, and that L2 total costs are largely driven by L1 data posting charges and rollup-specific receipt data, with L2 execution costs playing a smaller role. Gas reporting differs across rollups, so cross-rollup comparisons require rollup-aware metrics. The work offers a first step toward a practical deployment metric framework to guide DApp developers and suggests directions for expanding provider/rollup coverage and metrics.

Abstract

Blockchain networks provide a reliable trust anchor to decentralized applications (DApps) backed by smart contracts. The Ethereum ecosystem now encompasses most blockchain networks that provide compatible support for smart contracts code. Recently, many Ethereum Layer 2 (L2) rollup solutions emerged, meant to scale the base Layer 1 (L1) network, consequently decreasing transaction fees and diversifying the usage scenarios. Furthermore, the number of blockchain providers that offer access to the network infrastructure for both L1 and L2 continuously increases. A developer is faced with a multitude of deployment options and must weigh between the gains in costs and the losses in trust that are still an issue with L2. A decisive factor in this trade-off can be the use case itself, depending on its security requirements. Still, the evaluation of costs and performance cannot be ignored and should rely on a set of measurable metrics, although choosing the right metrics can be complicated. In this practical experience report, we explore the relevance of several such metrics in choosing between different providers and rollups. For this purpose, we perform evaluations for two use cases of DApps: a voting DApp with high security demands, suited for L1 deployment, and a cost-sensitive supply chain DApp, where L2 can be an option. We analyze a set of basic metrics by comparing these between two highly used access providers, Alchemy and Infura, for the L1 deployment case, and between two of the most popular rollups, Arbitrum One and OP Mainnet (Optimism), for the L2 deployment scenario.

Where Should I Deploy My Contracts? A Practical Experience Report

TL;DR

This paper empirically evaluates deployment choices for Ethereum smart contracts across L1 and L2 by measuring practical metrics on two use cases: a security-focused voting DApp on L1 and a cost-sensitive supply-chain DApp on L2. It compares two L1 providers (Alchemy, Infura) and two rollups (Arbitrum One, Optimism) using RPC latency, throughput, nonce behavior, gas costs, and soft-confirmation latency. Findings show RPC latency matters when end users are geographically distant, and that L2 total costs are largely driven by L1 data posting charges and rollup-specific receipt data, with L2 execution costs playing a smaller role. Gas reporting differs across rollups, so cross-rollup comparisons require rollup-aware metrics. The work offers a first step toward a practical deployment metric framework to guide DApp developers and suggests directions for expanding provider/rollup coverage and metrics.

Abstract

Blockchain networks provide a reliable trust anchor to decentralized applications (DApps) backed by smart contracts. The Ethereum ecosystem now encompasses most blockchain networks that provide compatible support for smart contracts code. Recently, many Ethereum Layer 2 (L2) rollup solutions emerged, meant to scale the base Layer 1 (L1) network, consequently decreasing transaction fees and diversifying the usage scenarios. Furthermore, the number of blockchain providers that offer access to the network infrastructure for both L1 and L2 continuously increases. A developer is faced with a multitude of deployment options and must weigh between the gains in costs and the losses in trust that are still an issue with L2. A decisive factor in this trade-off can be the use case itself, depending on its security requirements. Still, the evaluation of costs and performance cannot be ignored and should rely on a set of measurable metrics, although choosing the right metrics can be complicated. In this practical experience report, we explore the relevance of several such metrics in choosing between different providers and rollups. For this purpose, we perform evaluations for two use cases of DApps: a voting DApp with high security demands, suited for L1 deployment, and a cost-sensitive supply chain DApp, where L2 can be an option. We analyze a set of basic metrics by comparing these between two highly used access providers, Alchemy and Infura, for the L1 deployment case, and between two of the most popular rollups, Arbitrum One and OP Mainnet (Optimism), for the L2 deployment scenario.

Paper Structure

This paper contains 8 sections, 3 figures, 2 tables.

Figures (3)

  • Figure 1: L1 quantified gas used for the buySeeds transactions
  • Figure 2: Total fee of the buySeeds transactions
  • Figure 3: Soft confirmation latency for the buySeeds transactions