Sidechain Deployment

We design and develop full-cycle blockchain solutions: from smart contract architecture to launching DeFi protocols, NFT marketplaces and crypto exchanges. Security audits, tokenomics, integration with existing infrastructure.
Showing 1 of 1 servicesAll 1306 services
Sidechain Deployment
Complex
from 2 weeks to 3 months
FAQ
Blockchain Development Services
Blockchain Development Stages
Latest works
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1051
  • image_logo-advance_0.png
    B2B Advance company logo design
    561
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    827
  • image_logo-aider_0.jpg
    AIDER company logo development
    762
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    850

Sidechain Deployment

Sidechain — separate blockchain network linked to main network via bridge. Unlike L2 rollup, sidechain doesn't inherit parent network security: it has own consensus, own validator set, and finality determined by its own rules. This is compromise: more flexibility and lower transaction cost in exchange for independent trust model.

Practical reasons to build sidechain instead of using existing L2: need custom gas token, need permissioned network (corporate blockchain), need specific consensus rules (e.g., PoA for game project with known validators), need full control over network parameters without governance.

Choosing Stack

OP Stack (Optimism) — most popular choice for EVM-compatible networks. Technically this is L2 architecture (Optimistic Rollup), but can work as sidechain without Ethereum settlement (sovereign mode). Used by Coinbase Base, Worldcoin, Zora, dozens others.

Polygon CDK (Chain Development Kit) — ZK-based, more complex to setup, but provides ZK-proof security if Ethereum integration desired.

Cosmos SDK — for application-specific chains. Not EVM by default (but Ethermint for EVM compatibility). IBC for cross-chain interaction. Justified when full consensus control and custom gas economics needed.

Substrate (Polkadot ecosystem) — for parachain or standalone chain. Complex for custom logic development, but powerful framework.

For most EVM projects recommend OP Stack as most proven and documented path.

OP Stack Sidechain Deployment

Minimal OP Stack infrastructure:

L1 (Ethereum mainnet or testnet)
  ├── SystemConfig contract
  ├── OptimismPortal contract     (bridge deposits/withdrawals)
  ├── L1CrossDomainMessenger
  └── L1StandardBridge

L2 (your network)
  ├── op-geth                    (execution client, Geth fork)
  ├── op-node                    (rollup node / sequencer)
  ├── op-batcher                 (batch transactions to L1)
  └── op-proposer                (publish state roots to L1)

Step 1: Deploy L1 Contracts

git clone https://github.com/ethereum-optimism/optimism && cd optimism
git checkout op-contracts/v1.6.0  # use specific tag

# Generate config
cd packages/contracts-bedrock
cp deploy-config/getting-started.json deploy-config/mychain.json
# Edit: l2ChainID, baseFeeVaultRecipient, sequencerAddress, etc.

# Deploy
forge script scripts/deploy/Deploy.s.sol:Deploy \
  --private-key $DEPLOYER_PRIVATE_KEY \
  --broadcast \
  --rpc-url $L1_RPC_URL \
  --slow

Step 2: Generate Genesis Block

cd op-node
go run ./cmd/main.go genesis l2 \
  --deploy-config ../packages/contracts-bedrock/deploy-config/mychain.json \
  --l1-deployments ../packages/contracts-bedrock/deployments/mychain/.deploy \
  --outfile.l2 genesis.json \
  --outfile.rollup rollup.json \
  --l1-rpc $L1_RPC_URL

Step 3: Run op-geth

geth init --datadir /data/op-geth genesis.json

geth \
  --datadir /data/op-geth \
  --networkid <L2_CHAIN_ID> \
  --http --http.api eth,net,web3,debug \
  --authrpc.jwtsecret /data/jwt.hex \
  --syncmode full \
  --gcmode archive     # needed for op-node

Step 4: Run op-node (sequencer)

op-node \
  --l2=http://localhost:8551 \
  --l2.jwt-secret=/data/jwt.hex \
  --sequencer.enabled \
  --sequencer.l1-confs=4 \
  --verifier.l1-confs=4 \
  --rollup.config=rollup.json \
  --rpc.addr=0.0.0.0 \
  --rpc.port=8547 \
  --p2p.disable \            # enable with second node
  --l1=$L1_RPC_WS \
  --l1.beacon=$L1_BEACON_URL

Bridge: Deposits and Withdrawals

Standard OP Stack bridge works via OptimismPortal on L1 and L2StandardBridge on L2.

Deposit (L1 → L2): user calls depositETH() on L1StandardBridge, transaction reflected on L2 in ~2–3 minutes (after inclusion in L2 batch).

Withdrawal (L2 → L1): three-step process:

  1. Withdrawal transaction on L2
  2. Wait for state root publication to L1 (op-proposer does this every N blocks)
  3. Dispute window period (7 days for mainnet) — after that finalizeWithdrawal on L1

7-day dispute window — consequence of Optimistic Rollup architecture (fraud proof window). For sovereign sidechain without settlement this period can be configured arbitrarily or eliminated entirely.

Custom Gas Token

OP Stack supports Custom Gas Token (from Bedrock onwards) — ERC-20 token instead of ETH as native currency for gas payment. Parameters set at deploy:

{
  "useCustomGasToken": true,
  "customGasTokenAddress": "0xYOUR_TOKEN_ON_L1"
}

Popular for gaming chains (pay gas with game token) and enterprise chains (gas in stablecoin).

Performance and Parameters

Key parameters affecting throughput and UX:

Parameter Default Comment
l2BlockTime 2 sec Can lower to 1 sec for high-frequency apps
maxSequencerDrift 600 sec How long L2 can work without L1 data
channelTimeout 300 L1 blocks Max lag for batcher
GasLimit 30M Gas per block; increase requires more sequencer resources

Security and Centralization

Standard OP Stack deploy — fully centralized sequencer. This means:

  • Sequencer can censor transactions (though force-inclusion via L1 remains)
  • Sequencer downtime = network produces no blocks

For decentralized sequencer: OP Stack Sequencer Decentralization (still in development at Optimism Foundation) or external solutions like Espresso Systems (shared sequencer marketplace).

Minimal set for production:

  • Multisig on all upgrade admin roles (SystemConfig owner, ProxyAdmin owner)
  • Timelock on critical parameter changes
  • Monitor L1 contracts for unauthorized upgrade attempts
  • Backup L1 RPC (if main fails — batcher and proposer stop)

Deployment Phases

Phase Content Timeline
Architecture & config Stack choice, network parameters, gas tokenomics 1 week
Testnet deployment Deploy to Sepolia, internal testing 1–2 weeks
Bridge testing Deposits/withdrawals, stress test 1 week
Security review Audit L1 contracts, multisig configuration 2–4 weeks
Infrastructure Monitoring, alerting, DevOps 1 week
Public testnet Open test, bug bounty 2–4 weeks
Mainnet Deploy, gradual opening 1–2 weeks

Realistic timeline: 2–3 months from start to mainnet with dedicated team.