ByAUJay
Cost to Deploy Smart Contract and How Much Does It Cost to Deploy a Smart Contract in 2026?
Deploying a smart contract in 2026 can cost anywhere from a few dollars to thousands depending on chain, bytecode size, constructor work, and data‑availability. This guide gives precise, current numbers and concrete playbooks to forecast and reduce your deployment bill.
TL;DR for decision‑makers
- On Ethereum mainnet (L1), a typical production ERC‑20/721 deployment uses roughly 1.0–1.5M gas. At 5–15 gwei and $2,500/ETH, that’s about $16–$112. The exact bill is dominated by code size and any storage writes in your constructor. (github.com)
- On modern L2s post‑EIP‑4844, fees for complex transactions are often cents. Contract deployment also benefits because L1 data costs moved into cheap “blobs.” Check live fee snapshots before go‑live. (l2fees.info)
- Non‑EVM chains (Solana, NEAR, Sui, Aptos, Starknet) price deployment differently: Solana requires a refundable rent‑exempt balance proportional to your program size; NEAR and Sui charge explicit storage fees; Aptos splits execution gas and storage; Starknet separates “declare” and “deploy” and recently cut declare fees. (solana.com)
What actually makes deployment expensive (or cheap)
When you hit “deploy,” you pay for four things (terminology shown for EVM; analogous concepts exist elsewhere):
- Transaction and creation overhead: 21,000 gas per transaction, plus 32,000 gas if it’s a contract creation (not a simple transfer). (eips.ethereum.org)
- Calldata/Initcode: the bytes you send to create the contract (constructor + code) cost 4 gas/zero byte and 16 gas/non‑zero byte; since Shanghai, initcode is also metered at 2 gas per 32‑byte word and capped at 49,152 bytes. (eips.ethereum.org)
- Code deposit: deployed runtime bytecode costs 200 gas per byte. This is the big line item for code‑heavy contracts. (eips.ethereum.org)
- Constructor execution: any opcodes you run, especially SSTORE writes (20,000 gas when setting a zero slot to non‑zero; 5,000 when updating; refunds limited by EIP‑3529). Warm/cold access rules also apply (2100 gas cold SLOAD; 100 gas warm). (eips.ethereum.org)
Two additional, 2026‑relevant dynamics:
- L2 “blob” fees after EIP‑4844: Data that rollups must publish to Ethereum moved into a separate blob market with its own base fee, dramatically reducing L2 costs (90%+ in many cases). This helps contract deployment on L2s because deployment is byte‑heavy. (blocknative.com)
- Contract size limits today and what may change: The mainnet hard cap remains 24KB (EIP‑170). Draft EIP‑7907 proposes lifting the cap (e.g., to 48–64KB+) while metering size, but as of January 7, 2026 it’s still a draft—plan assuming 24KB. (eips.ethereum.org)
What it costs on major networks in 2026
Always check live gas and token prices the hour you deploy, but the benchmarks below will get your budget close.
Ethereum L1 (Mainnet)
- Typical OpenZeppelin‑based ERC‑20 deploys often land near 1.2–1.4M gas; community datapoints show ~1.31M gas. The code‑deposit component alone depends on runtime bytecode length (200 gas/byte). (github.com)
- At 5–15 gwei, 1.3M gas costs:
- 5 gwei: 0.0065 ETH (~$16 at $2,500/ETH)
- 15 gwei: 0.0195 ETH (~$49)
- 40 gwei (busy periods): 0.052 ETH (~$130)
- After the Dencun upgrade (Mar 2024), average gas was unusually low at times through 2025, but volatility remains. Don’t hardcode “cheap ETH” in your business case—price out multiple scenarios. (cointelegraph.com)
Practical tip: If your constructor writes a bunch of state, you’ll pay SSTORE 20,000 gas per slot for zero→non‑zero. Move constants to immutables to avoid paying storage at deploy. (eips.ethereum.org)
Ethereum L2s (Arbitrum, Optimism/Base, zkSync, Polygon zkEVM, Starknet)
- Current sample fees for standard actions are visible at L2fees.info; they show single‑digit‑cent transfers and sub‑$0.50 swaps most of the time. Deployments are heavier but benefit from the same post‑4844 blob pricing. (l2fees.info)
- Base (OP Stack) explicitly documents two components: an L2 execution fee and an L1 data fee; Base also enforces a minimum basefee of 0.0005 gwei to keep fees predictable and prevent spam. This floor still implies fractions of a cent for typical txs. (docs.base.org)
- Starknet separates DECLARE (registers class) and DEPLOY (instantiates). Fees depend on L1 data posted and L2 gas; v0.13.1.x reduced declaration costs significantly in 2025, improving go‑live budgets for Cairo 1 codebases. Use SDK fee estimators in CI for accurate preflight. (docs.starknet.io)
- Note: zkSync announced Etherscan indexing support would end Jan 7, 2026; factor explorer and API changes into your ops budget. (kucoin.com)
Polygon PoS
- Uses EVM gas with mandatory minimum priority fee (30 gwei) on mainnet. This affects all transactions—including deployments—if your tooling sets too‑low priority fees. (docs.polygon.technology)
BNB Chain (BSC)
- Validators cut the minimum gas price to ~0.05 gwei in Oct 2025 (from 0.1). That put many tx fees near fractions of a cent; deployments scale down accordingly. Always reconcile to current validator‑recommended floor. (kucoin.com)
Avalanche C‑Chain
- The Avalanche9000 (Dec 16, 2024) upgrade reduced the minimum base fee from 25 nAVAX to 1 nAVAX; average usage fees dropped ~75% afterward. Contract deployment on the C‑Chain follows EVM rules, priced in AVAX at the new basefee levels. (build.avax.network)
Solana
- Program deployment requires funding the program account to the rent‑exempt minimum for its size; this is a refundable deposit. The base tx fee is 5,000 lamports per signature (~0.000005 SOL) and optional priority fees are per compute unit; no per‑byte code‑deposit fee like the EVM. Use
to calculate the minimum. (solana.com)solana rent <bytes> - Compute unit policy in 2025–2026: default tx CU limit ~200k (up to 1.4M with a budget instruction); base fee per signature 5,000 lamports; CU price is zero unless you tip for priority. (quicknode.com)
NEAR
- Deployment costs are primarily storage staking: 1e19 yoctoNEAR per byte, i.e., ~100 KB per 1 NEAR staked. You “lock” tokens proportional to your contract’s storage footprint; they’re freed if storage is released. Average tx fees are pennies. (docs.near.org)
Sui
- Every transaction pays execution + a storage fee based on “storage units.” Current storage fee is published on‑chain (e.g., 76 MIST per unit as documented); query GraphQL
before deploys. Storage fees are part of the total gas charge. (docs.sui.io)storage_gas_price
Aptos
- Aptos separates execution/IO gas from storage fees; storage is priced in fixed APT octas and can be refunded when slots are deleted. Plan package publish costs around code size and created resources, and simulate to estimate. (aptos.dev)
Concrete examples you can copy into your budget
Below are “order‑of‑magnitude true” examples to adapt in your spreadsheets. Replace the ETH/SOL/AVAX price and live gas/fee inputs as needed.
-
Ethereum L1 ERC‑20 (OpenZeppelin‑based), 1.3M gas:
- Low congestion (5 gwei, $2,500/ETH): 0.0065 ETH ≈ $16
- Busy period (40 gwei): 0.052 ETH ≈ $130
Check that your runtime bytecode fits under 24KB (EIP‑170) or split logic. (github.com)
-
Arbitrum or Base, same ERC‑20:
- Fees dominated by L1 data via blob; empirical costs for complex txs are often <$0.50. Deployments are larger than transfers/swaps but generally still sub‑dollar to low single digits most of the time—confirm with
and the L2’s fee breakdown API. (l2fees.info)eth_estimateGas
- Fees dominated by L1 data via blob; empirical costs for complex txs are often <$0.50. Deployments are larger than transfers/swaps but generally still sub‑dollar to low single digits most of the time—confirm with
-
Solana program, 250 KB:
- Rent‑exempt minimum per
plus a few signatures. This deposit is returned if you close/undeploy. The per‑tx fee is ~0.000005 SOL per signature unless you add priority fees. (solana.com)solana rent 256000
- Rent‑exempt minimum per
-
Avalanche C‑Chain ERC‑20:
- Same gas units as Ethereum, but priced at basefee often near 1–a few nAVAX post‑upgrade. Multiply your gas estimate by current nAVAX gas price for a ~$ estimate. (build.avax.network)
9 emerging best practices (2026) to shrink your deployment bill
- Treat bytecode as money
- Every deployed byte costs 200 gas on EVM chains; focus on runtime bytecode size. Replace revert strings with custom errors; prefer immutables over constructor‑set storage; delete unused imports. OpenZeppelin 5.0 reports double‑digit deployment cost reductions from such optimizations. (eips.ethereum.org)
- Pick the right optimizer strategy
- Low optimizer “runs” makes deploy cheaper and runtime a bit costlier; high runs do the opposite. For contracts called frequently, pay at deploy to save on every call; for one‑off controllers, bias for low runs. This is straight from Solidity docs. (docs.soliditylang.org)
- Get constructors off SSTORE
- Each zero→non‑zero storage write is 20,000 gas (+cold access if first touch). Move constants to
, initialize mappings lazily, and set defaults in code rather than storage where possible. (eips.ethereum.org)immutable
- Use minimal proxies (EIP‑1167) or UUPS where applicable
- Clones deploy ~45 bytes of runtime code and delegate to a single implementation—10–20x cheaper than redeploying full logic each time. For upgradeability, UUPS proxies minimize proxy bytecode and hence deploy cost vs. Transparent. (eips.ethereum.org)
- Pre‑flight with real estimators (and add a buffer)
- Use
against mainnet/L2 RPCs and add ~10% buffer; OpenZeppelin relayer docs codify this policy. For Starknet, useeth_estimateGas
; for Solana, runestimateDeclareFee/estimateDeployFee
ahead of time. (docs.openzeppelin.com)solana rent
- Be DA‑aware on L2s
- Post‑4844, blob fees are separate from calldata/base fee; schedule big deployments for L1‑off‑peak windows and watch blob basefee. Blocknative’s “blobsplaining” explains the three‑component fee. (blocknative.com)
- Mind network‑specific floors and knobs
- Polygon PoS requires ≥30 gwei tip; Base enforces a 0.0005 gwei minimum basefee; BNB Chain has a validator‑driven 0.05 gwei floor. These can make a “$0.00x” estimate off by 10–20x if ignored. (docs.polygon.technology)
- Plan for size caps and proposals
- Still design within 24KB (EIP‑170). EIP‑7907 would meter larger contracts, but it’s draft as of Jan 7, 2026—don’t count on it for a Q1 launch. If you truly need “unlimited” logic, consider ERC‑2535 diamonds (modular facets). (eips.ethereum.org)
- Keep storage off‑chain unless essential
- On‑chain storage and calldata are intrinsically expensive; media/metadata belongs in IPFS/Filecoin/Arweave. Pinata shows why mainnet storage costs orders of magnitude more than decentralized storage. (pinata.cloud)
2026 deployment checklists, with precise steps
A) Ethereum (L1 or L2 EVM) pre‑deploy
- Gas/fee model
- Snapshot live basefee/priority ranges (and blob basefee if L2), then compute at least three budgets: P50, P90, worst‑case 2019‑style spikes. Use L2fees.info as a sanity check for the day. (l2fees.info)
- Code size and limits
- Verify runtime bytecode < 24KB or use libraries/proxies/diamonds. Consider splitting features into facets if you’re close to the limit. (eips.ethereum.org)
- Gas audits
- Switch to custom errors, mark constants
, remove dead code. Rerun a compiler with low “runs” for deploy‑heavy components, high “runs” for hot paths. (docs.soliditylang.org)immutable
- Switch to custom errors, mark constants
- Estimation
against target RPC + 10% buffer; capture code deposit calculation:eth_estimateGas
. For factories, pre‑compute child deployment costs (clones vs full). (eips.ethereum.org)200 * runtime_bytes
- Tooling & explorers
- If you rely on Etherscan APIs, note the 2025–2026 pricing and rate limits (free tier 3 rps, 100k/day; paid from $49/mo up). V2 APIs are now unified across chains. (etherscan.io)
B) Solana program deploy
- Build size and rent
thenwc -c target/deploy/program.so
to compute rent‑exempt minimum. Provision slightly more for tx fees. (solana.com)solana rent <bytes>
- Fee policy
- Expect 5,000 lamports/signature base; add priority fees only if contended; increase CU limit when needed (up to 1.4M) via ComputeBudget instructions. (solana.com)
C) NEAR/Sui/Aptos/Starknet specifics
- NEAR: multiply code+state bytes by 1e19 yoctoNEAR/byte (≈100KB per NEAR). Storage is staked, not spent. (docs.near.org)
- Sui: fetch
via GraphQL; storage fee is charged inside total gas. (docs.sui.io)storage_gas_price - Aptos: simulate a package publish; the fee statement separates execution/IO gas and storage fee in octas (refundable on deletion). (aptos.dev)
- Starknet: run
thenestimateDeclareFee
; v0.13.1.1 cut declare fees order‑of‑magnitude in 2025. (cointime.ai)estimateDeployFee
Hidden and adjacent costs most teams miss
- Node/API infrastructure: Even if you self‑host, most teams use managed RPCs for reliability. Current list prices: Infura Developer $50/mo, Team $225/mo (credits model). QuickNode offers free to enterprise plans with large credit buckets. Budget for Etherscan API if you need higher rates. (infura.io)
- Security reviews: In 2026, credible audits range widely: ~$8k for basic tokens to $100k–$300k+ for complex protocols; per‑week rates of ~$20k/week are public benchmarks. Many teams pair a traditional audit with a Code4rena‑style contest and a bug bounty. (sherlock.xyz)
- Data storage: Off‑chain decentralized storage is orders of magnitude cheaper than on‑chain; e.g., Storj/Filecoin pricing in dollars/GB‑month vs. mainnet calldata/storage that scales with ETH and gas. (blockeden.xyz)
Two worked mini‑case studies
- Multi‑tenant vaults on Ethereum (hundreds of instances)
- Baseline naive plan: deploy 200 full copies, each ~1.5M gas → 300M gas total.
- Clone/UUPS plan: deploy one implementation (~1.5M gas) + 199 clones (~20–50k gas each), total ~2.5–3.5M gas, i.e., two orders of magnitude cheaper. This is why Uniswap‑like pairs and wallet factories use ERC‑1167. (eips.ethereum.org)
- Consumer app on Base (OP Stack) with weekly feature ships
- Costs are dominated by L1 data fees; pick weekend windows when L1 basefee and blob basefee are low. Base’s minimum basefee keeps UX steady; your large deploys arrive on time, with per‑deploy net cost usually in low dollars. (docs.base.org)
2026 watch‑list that can move your costs
- EIP‑7907 (draft): metered code size and higher limits; if/when activated, it relaxes the 24KB ceiling but charges extra for large code. Don’t count it in Q1’26 budgets. (eips.ethereum.org)
- Calldata repricing proposals (EIP‑7623/7976 drafts): aim to raise costs for data‑heavy txs while steering DA to blobs. Indirect impact on L2 operator costs and on any L1‑calldata‑heavy deploy tooling. (eips-wg.github.io)
- Explorer/API changes: Example—Etherscan API v2 migration, and zkSync deprecating Etherscan indexing Jan 7, 2026. Keep your DevOps integrations current. (info.etherscan.com)
How 7Block Labs helps teams cut deployment spend by 30–90%
- Design for size: we refactor into libraries, immutables, and facets to minimize runtime bytecode.
- Right proxy for the job: ERC‑1167 clones for mass instantiation; UUPS for upgradeable cores; diamonds when modular limits demand it. (eips.ethereum.org)
- Fee‑aware release trains: CI integrates live fee oracles (L1 basefee + blob basefee/L2 pricing), chooses windows, and runs preflight gas sims per chain before cutover. (blocknative.com)
If you want a line‑item deployment budget for your specific stack (EVM + Solana/NEAR/Sui/Aptos/Starknet), we can deliver a one‑page forecast with P50/P90/WC scenarios in 48 hours.
Quick reference: formulas you’ll actually use this week
- EVM deploy rough cost (ETH):
gas_used × gas_price (in ETH/gas)
Where gas_used ≈ 21,000 + 32,000 + (200 × runtime_bytes) + constructor_gas + calldata_gas. Initcode metering adds ~2 gas per 32B of initcode and size is capped at 49,152 bytes. (eips.ethereum.org) - Solana program rent:
→ lamports to remain rent‑exempt (refundable). Base fee per signature = 5,000 lamports; CU priority fee optional. (solana.com)solana rent <program_bytes> - NEAR storage staking:
Bytes ÷ 100,000 = NEAR to stake for storage (≈100KB per NEAR). (docs.near.org)
Bottom line
- The cheapest dollar today is the byte you never deploy. Invest in bytecode diet, constructors that don’t write storage, and the right proxy.
- Post‑4844 L2s make deployment practically a rounding error, but you still need fee‑aware release windows.
- For non‑EVM, budget by storage footprint (Solana/NEAR/Sui) and use chain‑specific fee estimators (Aptos/Starknet) during CI.
Want a fixed‑fee “Deployability Review” for your codebase with a before/after gas report and a per‑chain cost forecast? 7Block Labs can scope it in a brief call.
References and data sources: EIPs and core docs for fee constants and limits; L2fees.info for live L2 costs; Base/Avalanche/BNB/Polygon/Solana/NEAR/Aptos/Starknet official docs for network specifics; OpenZeppelin and Solidity documentation for optimization guidance. (eips.ethereum.org)
Like what you're reading? Let's build together.
Get a free 30‑minute consultation with our engineering team.

