As far as I know, Metamask does not allow to sign transaction without broadcasting it to the network. So I can not generate a transaction on my server and pass it to the frontend that will sign me the transaction with metamask and then return me it to the server. However, there is a zkSync blockchain that is EVM-compatible. And metamask also supports it. And when you want to send funds to another account it just asks you to sign a request without performing transaction (I mean that metamask does not make transaction by itself, it just signs). I can see it here in the documentation. Can you please explain how is it possible? Who pays for gas then?
1 Answer
zkSync uses layer 2 technology. Basically, you can see several Layer 2 scalable solutions like,
- Optimistic Rollups - Group up several off-chain (from mainnet) transactions together before submitting to the mainnet.
- Zero-Knowledge Rollups (ZK Rollups) - Bundle transactions together to be executed off-chain. (This is the scenario in zkSync)
See more at https://crypto.com/university/ethereum-layer-2s
-
Thank you for the comment and article. I read it but still it's not very clear. L2 collects transactions and then does one large transaction on L1 that saves a lot of gas. But still. Gas value on L1 is not 0. I made a gasless transaction on L2, other 20 people do gasless transactions on L2. But then it's time to create a transaction on L1. Who will pay the gas for L1 transaction?– airledCommented Nov 18, 2023 at 3:14