Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

Questions tagged [layer-2]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
12 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
0 votes
1 answer
17 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: ...
Văn Châu Cao's user avatar
0 votes
0 answers
9 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), ...
Hyunduk Shin's user avatar
0 votes
0 answers
18 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 ...
AirUp's user avatar
  • 363
0 votes
1 answer
85 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 ...
Mikko Ohtamaa's user avatar
0 votes
1 answer
218 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 ...
Ghassane Aboughazaouat's user avatar
5 votes
2 answers
105 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
0 votes
0 answers
8 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 ...
Alberto Molina's user avatar
0 votes
1 answer
66 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 ...
tjtr's user avatar
  • 1
0 votes
0 answers
35 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 ...
Alexander Herranz's user avatar
0 votes
0 answers
19 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 ...
Alireza's user avatar
  • 545
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 ...
Alireza's user avatar
  • 545
2 votes
1 answer
237 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
1 vote
1 answer
54 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
0 votes
0 answers
15 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 ...
user1936752's user avatar
2 votes
1 answer
36 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
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 ...
popomint's user avatar
0 votes
0 answers
27 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 ...
michaelaberra's user avatar
0 votes
1 answer
189 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 ...
Patrick Collins's user avatar
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
0 votes
1 answer
106 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 ...
boundless-forest's user avatar
1 vote
0 answers
39 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
0 votes
0 answers
135 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 ) ...
Kyell's user avatar
  • 91
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 ?
Surajkumarrr's user avatar
1 vote
0 answers
119 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
1 answer
184 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
0 votes
2 answers
225 views

Differences between on zkEVM and zkSync ERA

Are polygon zkEVM and zkSync ERA somehow different? If yes then how?
Hacek 's user avatar
  • 657
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
  • 657
1 vote
2 answers
260 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
  • 657
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
  • 657
1 vote
0 answers
35 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
  • 657
1 vote
0 answers
24 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
1 answer
19 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
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
36 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
1 answer
41 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
2 votes
2 answers
182 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
1 vote
0 answers
57 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
0 votes
3 answers
562 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 ...
user2284570's user avatar
  • 1,018
1 vote
1 answer
108 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
498 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
1 answer
76 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
211 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
0 votes
0 answers
38 views

Can you make one transaction on mainnet that initiates a transaction on a layer 2?

I was going through some grants/RFPs and I noticed an interesting request. They are looking for a solution that allows a user to make a single transaction on mainnet to deposit funds into a protocol ...
soyboy's user avatar
  • 63
1 vote
0 answers
91 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
2 votes
1 answer
34 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
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
2 votes
1 answer
99 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
1 vote
3 answers
784 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
0 votes
1 answer
69 views

Sending message/instruction from a governance system on Arbitrum to mint tokens on mainnet using Gnosis Zodiac Bridge

I am working with a DAO that has their governance/voting system on Arbitrum, and their Gnosis Safe treasury wallet on mainnet. The Gnosis Safe on mainnet contains minting keys to mint their native ...
Yuval's user avatar
  • 1