Skip to main content

Questions tagged [layer-2]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
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' \ --...
0 votes
0 answers
6 views

Optimism block producing process

Recently I've been digging into the optimism rollup node codebase. Here is what I understand so far: user initiates a L2 tx and submits to sequencer the sequencer inside rollup node receive tx, pack ...
0 votes
1 answer
372 views

Layer2: Revert Execution Error when Calling exactInputSingle in Uniswap V3

Hello Stack Overflow Community, I am working on swapping tokens in a base layer2 network using Uniswap V3 and ethers.js. I have successfully approved the transaction using the approve function, but ...
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 ...
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?
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 ...
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 ...
0 votes
1 answer
671 views

How to create you own ethereum sidechain?

How can I create a geth-clique POA network as an Ethereum sidechain to mainnet or testnets. what is the simplest ways to do that? are there any frameworks that can be implemented easily
0 votes
1 answer
28 views

Bulk transaction on Base chain

After adding liquidity, I frequently see wallets making bulk transactions on the base chain. How can I snipe tokens early and cheaply like them? CA: 0x1234567517769aCd8519BA85184EdbBaC6062971 Tx: ...
0 votes
0 answers
10 views

Understanding the Implications of Layer 2 Solutions on Ethereum's Scalability: Time to Finality Considerations

Certain Layer 2 solutions, such as Optimistic Rollups and ZK Rollups, aim to address Ethereum's scalability challenges. While they are expected to significantly increase transactions per second (TPS), ...
0 votes
0 answers
19 views

Evaluating Cost Saving Potential Layer1 to Layer2

I am trying to evaluate cost savings when using a Layer 2 Blockchain network compared to Ethereum/Layer1. Currently i do not necessarily make use of L1/2 inter-communication, so just deploying and ...
0 votes
1 answer
206 views

How to broadcast a transaction directly to a centralised sequencer (Arbitrum/Optimism/others)

Most layer two chains have their centralised sequencer which operates first-come-first-server, or so-called fair sequencing manner. If you use the centralised sequencer, there are no Malicious ...
0 votes
0 answers
57 views

How to create a ZKP rollups on top of any EVM (eg. Hyperledger Besu) blockchain network?

I have a Hyperledger Besu network running, with IBFT 2.0 consensus protocol, up and running. I'm figuring out how could I deploy a layer 2 network, on top of this Besu network, in order to increase ...
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 ...
0 votes
0 answers
10 views

Layer 2 gas fees are paid in which cryptocurrency?

I have a doubt regarding Layer 2 blockchains (zk, optimistic, ...). At some point, nodes running L2 blockchains, send transactions to the L1 blockchain (Ethereum for the sake of this example), which ...
0 votes
1 answer
79 views

Bridge of tokens to L2?

I am developing erc20 tokens and Dapps. If we can issue tokens to ethereum and when they are moved (e.g. when we move tokens according to Dapps rules) we can use polygonZkEVM or optimism with high ...
0 votes
0 answers
20 views

Bridging ethers without private keys

According to Optimism SDK guide we should provide the Ethereum private key to generate an account on Optimism. If we were to apply this method to an crypto exchange that its wallet service is ...
0 votes
0 answers
13 views

Reducing Ethereum gas costs for crypto exchanges using layer 2 platforms

As I researched on reducing Ethereum gas costs for crypto exchanges using layer 2 platforms, the use of these platforms is beneficial for an crypto exchange when the users of that exchange, after ...
0 votes
1 answer
747 views

Polygon (ex-Matic): L1 and L2 communication

I try to send a URI to the layer 2 (Matic sidechain) from the "ERC721 Dummy contract" as Matic/Polygon team calls it and deployed on L1 (Ethereum mainnet). Their current Dummy ERC721 ...
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?
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 ...
0 votes
0 answers
18 views

Optimistic rollups and simple transactions

My understanding is that in an optimistic rollup, all data from users authorizing a transaction is stored on L1. The computation itself corresponding to that transaction is executed on L2. For simple ...
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&...
0 votes
0 answers
8 views

Would this library be interesting to dApp developers for in-browser wallet?

I'm with INTMAX, developing webmax.js, a JS library for quick dApp integration with our in-browser web3 wallet that's secure, uses biometric authentication, & supports EVM-compatible / Layer 2 ...
0 votes
1 answer
121 views

Are there any Ethereum L2 projects that built based on the Parity Substrate framework?

Substrate is a powerful framework that makes it easy to build a blockchain. I am more familiar with the substrate development than the Layer2. and am curious about why there are no Ethereum Layer2 ...
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-...
0 votes
0 answers
29 views

Creating ETH Sidechains

I have been looking online for a resource that helps me how I can build ETH sidechain and Layer 2 How can i use the ETH blockchain and make it a sidechain are there any tutorials or guides ? Do i ...
0 votes
1 answer
194 views

Where do arbitrum gas fees go?

Similar question to here except, based on the arbitrum docs: ⚠️ Note: There is no protocol level incentive to run an Arbitum full node. I know the sequencer gets paid some amount of the fee, but I ...
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 ...
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.
0 votes
0 answers
140 views

How to calculate "amountOutMin" on some DEX-es?

There's a function in a contract on HOT-protocol exchange sendToL2( uint256 chainId, address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address relayer, uint256 relayerFee ) ...
0 votes
1 answer
35 views

Polygon (MATIC) is a Coin or Token?

If polygon is a Layer-2 solution is built upon Ethereum then why it is listed as Coin in coinmarketcap intead of as Token ?
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.
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?
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 ...
0 votes
2 answers
233 views

Differences between on zkEVM and zkSync ERA

Are polygon zkEVM and zkSync ERA somehow different? If yes then how?
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.
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 ...
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 ...
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?
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?
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 ...
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 ...
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 ...
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(), ...
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 ...
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 ...
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. ...
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....
0 votes
3 answers
599 views

How to deploy smart contracts to any arbitrary available address like it was done through a regular transaction on Optimism?

Well, I’m not talking about the mainnet but an ᴇᴠᴍ compatible ʟ2 still using an Ethereum smart‑contract for storing its state : Optimistic Ethereum. A recent contract creation on Optimism seems to ...