Skip to main content

Questions tagged [layer-2]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
9 votes
4 answers
6k views

Is Polygon (Matic) a layer-2 or a sidechain?

People are calling Polygon both a layer-2 and a sidechain even though these are 2 different concepts. Which one is it?
user610620's user avatar
  • 1,528
8 votes
0 answers
119 views

Is there a zk-rollup proof explorer?

With the rise of various L2 solutions I started wondering whether it's possible to inspect the transaction proofs which are sent to L1. Is there a tool with an interface a'la block explorer, but ...
Andrew's user avatar
  • 106
7 votes
2 answers
9k views

What exactly is Ethereum's Layer 2

I read about Ethereum’s Layer 2 Scaling Solutions. Understood that layer 1 is the base consensus layer of ethereum protocol, changes typically require a hard fork. Is it true that layer 2 here refers ...
Consy's user avatar
  • 592
7 votes
2 answers
180 views

How transaction fee is calculated in case of L2?

In case of L1, the transaction fee is typically calculated as the product of gas price and gas usage, i.e., txFee = gasPrice * gasUsage One such example can be seen in this transaction. In which the ...
SYED ASAD KAZMI's user avatar
6 votes
1 answer
868 views

Gasless transaction and easy token Solidity receiver callbacks for ERC-20 tokens

I am planning a token swap for an old pre-ERC-20 token. The new token will have its ledger smart contract written from a scratch. While doing it, I would like to integrate new EIP features to the ...
Mikko Ohtamaa's user avatar
4 votes
2 answers
767 views

how does optimistic rollup work?

I am mostly interested in why 7-day fraudulent proof checks exist. Let's say on L1, I got 10 ETH and I deposited it on L2 as WETH. Now, 10 ETH is locked on L1's bridge contract and 10 WETH is on L2 on ...
Nika Kurashvili's user avatar
4 votes
1 answer
2k views

Does smart contracts "sync" between Polygon and Ethereum?

I'm deploying my ERC721 application on the Ethereum network and, of course, fees are a concern. I'm considering giving my customers the option to execute the contract calls on Polygon as well for ...
sigmaxf's user avatar
  • 1,080
3 votes
1 answer
1k views

Does arbitrum / optimism / other L2s have MEV?

Due to the fact that the sequencer is the "real" node that sequences transactions, I would imagine that is the true MEVer... But for example, could I run an Arbitrum node and MEV some ...
Patrick Collins's user avatar
3 votes
0 answers
84 views

Get transaction in mainnet from layer2 rollup

With the coming of optimistic & ZKP rollups, I was wondering how we will be able to retrieve transaction data through etherscan.io generated from a layer2 solution. Let's put an example: Platform ...
Sergi Juanati's user avatar
2 votes
1 answer
60 views

In optimistic roll-ups, can a validator post a valid block that builds on an old-but-invalid block which was not challenged?

In optimistic roll-ups, blocks (aggregated transactions) are published on the Ethereum main net. The main net functions as a security layer for the roll-up in the sense that it leverages the security ...
Kianoush Arshi's user avatar
2 votes
2 answers
191 views

Will Layer-2s and zk roll-ups become redundant once Eth 2.0 sharding and scaling arrives?

Millions of VC funding dollars are going into Layer-2 solutions like Optimism, Arbitrum and Polygon to allow users to side-step mainnet Layer-1 and process transactions at a thousandth of the cost and ...
user610620's user avatar
  • 1,528
2 votes
1 answer
285 views

Can Arbitrum's block timestamp be trusted to the same degree as the L1 time?

L1 blocks cannot be fudged by validators. It is a value that can be safely used by apps. Can that be said about the value of block.timestamp on a L2 like Arbitrum?
Paul Razvan Berg's user avatar
2 votes
1 answer
37 views

Why does rollup data in Ethereum have to be on chain?

In this blog, it is said Rollups move computation (and state storage) off-chain, but keep some data per transaction on-chain. The fact that data is on-chain is key (note: putting data "on IPFS&...
user1936752's user avatar
2 votes
1 answer
37 views

Where are layer 2 transactions (e.g. on Loopring Exchange) actually processed?

If you transact directly on Ethereum network - I get that your transaction is (eventually) processed by the 'world computer' of a load of miners running the Ethereum node software. If you do a ...
a_former_scientist's user avatar
2 votes
0 answers
15 views

Optimism L1 fee calculation

I've submitted a transaction on BASE, which is one of the OP stack chains. This is the transaction I sent: curl --location 'https://sepolia.base.org' \ --header 'Content-Type: application/json' \ --...
johnhckuo's user avatar
  • 371
2 votes
1 answer
103 views

What is the current state of zkEVM development?

What is the current state of zkEVM? That is - a general-purpose (not specialized like Loopring or Immutable), EVM-compatible, Solidity-compatible zk-rollup layer 2. To my knowledge they are still ...
sentiinex's user avatar
2 votes
1 answer
128 views

Does a Rollup transaction need the parameter 'nonce'?

Recently I am learning Rollups, and one thing makes me confused is that, Does the compressed transaction in a batch need the parameter nonce? Here in on-chain-scaling-to-potentially-500-tx-sec-through-...
shiiu akiyama's user avatar
2 votes
1 answer
29 views

Is ETH 2.0 going to have many L2 layers running with it?

Is it true that ETH 2.0 will just have many L2 layers running with it, such as Polygon, so ETH 2.0 needs these L2 layers These L2 layers are not going to go away just because of ETH 2.0 rolling out ?...
nonopolarity's user avatar
2 votes
0 answers
484 views

Polygon Network Fraud Proofs - State change reversal

After doing some surface reading about the Polygon L2 side-chain. I was interested in what actually happens if a successful fraud proof is submitted?. To enhance the security of the transactions, ...
Malone's user avatar
  • 1,590
2 votes
0 answers
33 views

What is the expected behavior of L2 systems under a chainsplit?

Assuming that there is both a optimistic rollup L2 and a zkrollup L2 system functioning nominally (i.e. they are both publishing their rollups to L1). Assume that a chain split happens at block 10000 ...
placeybordeaux's user avatar
1 vote
3 answers
801 views

Transferring weth from my contract to an other wallet address on polygon without using bridges

I have a requirement where we are building a platform that receives funds on Ethereum L1 and sends that fund back to the same address on polygon L2. I know bridges are there to transfer funds from l1 ...
Naveed Ali's user avatar
1 vote
1 answer
400 views

Any Solidity-based sparse merkle tree implemenations in production?

It looks like sparse Merkle trees are useful for proofs in L2 systems. When looking around, a number of projects can be found that implement sparse Merkle trees to authenticate state or account trees. ...
user10030's user avatar
1 vote
1 answer
30 views

How to develop with layer 2

I'm am very new on Ethereum, I'm learning solidity, I have a question, how to develop layer 2 like arbitrum, optimism or zksync on solidity or another programming language?
RichardPhan's user avatar
1 vote
1 answer
203 views

How does one create and send TXs on L2 - Arbitrum and others?

In ethers.js or web3.js How does one create and send TXs on L2 - Arbitrum and others? Is the algorithm absolutely identical to the one on L1, or not? How does one transfer ETH between L1 and L2?
Kyell's user avatar
  • 91
1 vote
2 answers
286 views

Queries on Base Chain layer 2

I am a web3 developer and want to use Base Chain layer 2 solution for my contract, but i am little confused. Does just deploying on base testnet enables all benefit of layer2? How to use Base ...
Hacek 's user avatar
  • 677
1 vote
1 answer
20 views

are there any other off-chain scaling solution then layer-2?

I was reading this: https://ethereum.org/en/developers/docs/scaling/#off-chain-scaling my doubt is: are there any other off-chain scaling solutions then layer-2. Can a centralised, non-blockchain ...
aakash4dev's user avatar
1 vote
1 answer
47 views

How can privacy roll-ups like Aztec make my transfer cheaper?

Aztec or zk.money, a Layer-2 roll-up, claims to make transactions not only private but also cheaper. If I send 1 eth on L1 mainnet, all I pay is one gas txn to send it. If I instead use Aztec's ...
user610620's user avatar
  • 1,528
1 vote
1 answer
78 views

is layer0 and layer-1 blockchain both mainnet?

I want to ask here a fundamental question about the difference between layer 0 and layer 1 for my understanding. i have read you can create main blockchains on layer 1 which lacks scaling. while the ...
maztt's user avatar
  • 113
1 vote
2 answers
224 views

web3js returns empty array on getPastEvents on polygon, optimism and arbitrum

I have a problem getting past events of a contract on polygon, Optimism and Arbitrum. the same code works perfectly on ethereum but for some reason i cant get it to work on polygon, OP and ARB. I have ...
Mostafa's user avatar
  • 51
1 vote
1 answer
327 views

Can you use Ethereum wallet to receive/send tokens of layer 2 blockchains?

If I create a wallet for Ethereum blockchain, can I use the same wallet (and accounts) for layer 2 Ethereum based blockchains (like Polygon and MATIC coin) as well? Side note: I've created a wallet ...
MehmedB's user avatar
  • 241
1 vote
0 answers
25 views

Prove on L1 that an ERC20 transfer event happened on L2

Let's say Alice transferred 100 USDC to Bob on an L2 (e.g. Arbitrum One or Optimism) in a Transaction T of Block B. I would like to prove in a Solidity Smart-Contract on the underlying L1 (Ethereum ...
Greg Jeanmart's user avatar
1 vote
0 answers
18 views

How is the address of an Base contract computed?

I'm curious when i see some fantastic projects, so I'm doing some experiments to find out the method which used by Base to generate the contract address. Tried with two different methods, and I've ...
Spencer's user avatar
  • 11
1 vote
0 answers
40 views

why does optimism need to derivation from L1 but zk-rollup scheme like polygon zkevm not?

recently I am reading the optimism docs and the spec named derivation confuse me. I haven't found it in any docs of zk-rollup projects like zksync, Polygon, or zkevm.
meta's user avatar
  • 11
1 vote
0 answers
121 views

How to transfer coins between L1 and L2 via web3.js or ethers.js?

How to do it? Programmatically. Does it always require a bridge? Or can it be done in other way too? I haven't found any difinitive answer to this anywhere.
Nondi's user avatar
  • 49
1 vote
0 answers
21 views

Am i right on this? [closed]

Do I just need to deploy my contract on Base chain testnet to use its layer2 solution? Or there is other steps? It is too confusing for me, Please guide me on this.
Hacek 's user avatar
  • 677
1 vote
1 answer
16 views

Need advice on using layer 2 in dex

I have created a Dex, I want to use its swap and providing liquidity functionality through layer 2, how to do that? If u answer with code example then it will be very helpful for me, I can understand ...
Hacek 's user avatar
  • 677
1 vote
0 answers
38 views

I need help on using Base chain by coinbase

I wanna use Base chain in my dapp, but i could not get the documentation handy, I did not understand how i use the bridge contract address. Does configuring my hardhat.config.js as advised in ...
Hacek 's user avatar
  • 677
1 vote
0 answers
25 views

Both L2 and gasless

I need a network that is both L2 (Validium or ZK-rollups) and provides a gasless platform (for the L2 smart contracts). Which L2 networks provide such the capability?
porton's user avatar
  • 1,804
1 vote
0 answers
40 views

Arbitrum: Mapping L2 blocks to L1 batches using RPCs

I'm looking for a way to programmatically map L2 blocks to their corresponding rollup batches in L1 using RPCs. Is there a way to do this, and if so, what would be the best approach? Any help or ...
Lucas Pecina's user avatar
1 vote
0 answers
42 views

Sign and send signed transaction in L2 zk-Rollup

I own an ERC20 token on the Ethereum mainnet but as everyone knows the fees are very high would it be possible use L2 zk-Rollup with this methods below? Example transfer(), estimateGas(), ...
Gabriel's user avatar
  • 111
1 vote
0 answers
59 views

How does one get the balance of an ETH address on Arbitrum or other L2's using eth-cli commands?

Using eth-cli how do I access the balance of an address on L2's such as Arbitrum, Polygon, etc....
Patoshi パトシ's user avatar
1 vote
1 answer
116 views

What is difference between ZK Rollups and Polygon?

ZK Rollups and Polygon mainnet are both layer 2 solution built for ethereum scaling solution. So what's the difference between these two solutions and which one to prefer?
Rishabh Raghwendra's user avatar
1 vote
0 answers
513 views

How do I calculate the transaction fee on the Optimism network

I have this transaction hash https://optimistic.etherscan.io/tx/0x9b8f0d63adb5c633baff74b642331d0015ea207134bd3f7f526a9b89d5dfae27 How did optimism calculate the 0.05c USD transaction fee Can someone ...
Khandkar Islam's user avatar
1 vote
0 answers
106 views

How can i retrieve the list of ERC20 tokens bridged to other evm chains?

Is there is a way (preferably not relying on an external API) to retrieve a list of tokens bridged to L2 or other EVM chains corresponding to a token on the Ethereum mainnet. I thought of parsing ...
David Van Isacker's user avatar
1 vote
0 answers
33 views

Understanding data availability for zk rollups

My understanding is that if a zkrollup operator suddenly ceases operation, you have to sync the rollup’s history from genesis to get the current state. In other words, if the transaction data has been ...
Zingo's user avatar
  • 11
1 vote
0 answers
85 views

zk-rollups library

Is there already a zk-rollups library that can execute contract code? I read about zkSync, Aztec, STARKWARE, polygon etc. But they are only for token transfert and none execute contract code.
anonym_rider's user avatar
1 vote
0 answers
131 views

Contract migration from Ethereum to L2

I am trying to figure out is it posible and how to migrate contracts from Ethereum main net to other L2. So here what I found: Migrating from contract in Solidity from Ethereum to Optimism is ...
Hristo Todorov's user avatar
1 vote
0 answers
105 views

Arbitrum and Ethereum Interoperability

I have a contract deployed on Ethereum that have a public view that returns one data i need that data on a contract on Arbitrum I have seen the documentation of arbitrum and I have seen that it is ...
Jacopo Mosconi's user avatar
1 vote
0 answers
55 views

Would transactions be committed back to the mainnet by sidechains?

When an L2 solution such as a sidechain like Polygon or xDai commits back to the Ethereum mainnet at every of its intervals, do the transactions, storage in the smart contracts, and everything that ...
xenon's user avatar
  • 455
1 vote
0 answers
72 views

Who and how writes L2 transaction to L1?

I read the document of Optimistic, I understood the L2 nodes send the transaction together to L1. However, I couldn't understand how L2 nodes pay the transaction fee. https://community.optimism.io/...
gnxvw's user avatar
  • 267