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?
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