# Loopring vs. zkSync *Loopring 3.6 solves some of the below issues, but it will not be ready by the time Gitcoin Grants round 7 starts, so it's improvements are not considered here.* ## Documentation - [Loopring API](https://docs.loopring.io/en/) - [zkSync JS SDK](https://zksync.io/dev/) ## Block Explorer - Loopring uses Dune Analytics, so the flow here would be to show users the results of the [get user transfers](https://docs.loopring.io/en/dex_apis/getUserTransfers.html) endpoint while pending, and link them to the block that includes their tx on Etherscan after - zkSync has a mainnet block explorer [here](https://zkscan.io/), which is more user-friendly ## TPS - Loopring claims 2000 TPS - zkSync claims 300 TPS Either of these is currently plenty for Gitcoin ## Account Management and Transfers - Loopring deterministically generates your private key from a signature and stores it in memory. - zkSync is simialar Both currently require additional signatures from your mainnet account to authorize transfers, which is done for added security in case key is leaked. ([Related Twitter thread on zkSync](https://twitter.com/gluk64/status/1258426454322417664)) This results in poor UX for Gitcoin grants since you have to sign each transfer. zkSync verifies this on their relayers, and am waiting to hear if Loopring does the same. Either way, we can work around this by adding a signature-generated wallet (or even a randomly generated ephemeral one) in between the user's web3 wallet and zkSync/Loopring. Have users send their donations + gas fees to that account, and use that private key for zkSync/Loopring so we don't need to prompt the user for a signature each time. Regarding contract wallets: - Currently unclear if/how contract wallets are supported for Loopring. Waiting to hear back from them on this - zkSync has a method used to "[authorize public key change using ethereum transaction for wallets that don't support message signing](https://zksync.io/dev/accounts.html#authorize-new-public-key-using-ethereum-transaction)" though I haven't looked into how this works or if this means all contract wallets can be supported ## Registration Only Loopring requires you to register an account, which means Loopring costs about 100k more gas than zkSync ## Deposit Process - Loopring takes 30 confirmations (~6.5 minutes) before you can transfer - zkSync takes 10 confirmations (~2.17 minutues) before you can transfer ## Gas Costs - Loopring is about 270k gas to register an account and deposit - zkSync is about 180k gas to deposit This makes the break even point with L1 costs are roughly 5 donations for zkSync and 9 donations for Loopring ## Checkout Flow - Loopring requires a user to register before you can send them funds. This means if a grant does not register, the checkout process becomes fragmented (i.e. a user must choose between L1 only OR contributing with both L1 and L2 if that is cheaper). I suspect many grants will not register, and this will drain a lot of the L2 benefits. - With zkSync, the grant owner does not have to worry about L2 until they are ready to withdraw the received funds ## Withdraw by Grant Owners These are pretty similar, with Loopring having the edge of an exchange so owners can convert tokens before withdrawings, assuming sufficient liquidity ## Future Outlook - Seems Loopring is exchange-focused - zkSync plans on releasing Zinc to enable smart contract functionality ## Other Considerations - Investigate and consider integration with [any.sender](https://www.anydot.dev/) to minimize L1 gas costs - The data below shows number of grants contributed to in one checkout (Bin) vs its frequency. 38 users contributed to exactly 5 grants in one transaction. This means 1150-38 = 1112 checkouts out of 1405 (~79%) would have received no benefit from L2 solutions because of the initial deposit cost (if we assume users have no funds on L2) ![](https://i.imgur.com/rY88DOH.png)