Why L2s on Public Chains Offer the Best of Both Worlds
The primary consideration when establishing cross-border CBDCs exchange is the choice of blockchain architecture. While private L1s may initially appear to provide greater operational control, they require significant investments in physical infrastructure. Public blockchains operate in a decentralized manner, supported by well-established consensus mechanisms. A novel approach involves permissioned L2s networks on public blockchains, which combine the advantages of both private and public networks.
Another system decision is about allowance arbitrage, where the revenue from arbitrage could be allocated to AMM-DEX operators, L2-L3 operators or central banks. There is ongoing research about sequencer decentralization at public L2 blockchains and the enablement of MEV and MEV arbitrage. Currently, Ethereum roll-ups operations are supported only by one sequencer which does not allow MEV.
To assess the system, additional metrics such as latency and finality can be considered in conjunction with the domestic CBDC blockchains and the underlying L1 network. In this context, latency refers to the duration between submitting a transaction to a network and receiving the initial confirmation of its commitment. On the other hand, finality refers to the time required for confirming that a transaction is irrevocable.
Furthermore, the profitability of liquidity provisions and corresponding swap fee, should be analyzed. The prototype implementation of such systems could be based on the ready rollup frameworks [3], [2], [7].
The major finding of this research is that a multi-AMM setup on L2 for a CBDCs exchange is more cost-efficient than a single L1 AMM, despite the liquidity fragmentation. This work presented the design of such a multi-AMM system on private L2. The proposed system offers the advantages of private blockchain while minimizing infrastructure costs and enhancing security, as it leverages the consensus mechanism of the underlying L1.
Through a historical simulation based on the FX rates among CHF, EUR, and SGD, we compared the exchange costs between L2-L3 Exchange and Project Mariana. We found that the L2-L3 Exchange outperforms across small, low-medium, and large transactions, even in the presence of liquidity fragmentation between L3s. During gas fee spikes, the performance gap widens, with lower transaction costs for all transactions at L2-L3 Exchange. Our analysis of CBDC swap costs revealed that the gas fees component is significantly lower in the L2-L3 Exchange for medium transactions, enabling their efficient swap.
The first author is a research fellow at Matter Labs. The second author is a researcher at Matter Labs. This research article is a work of scholarship and reflects the authors’ own views and opinions. It does not necessarily reflect the views or opinions of any other person or organization, including the authors’ employer. Readers should not rely on this article for making strategic or commercial decisions, and the authors are not responsible for any losses that may result from such use.
DeFi Llama (12 2022), https://defillama.com/
starknet (2022), https://starkware.co/starknet/
zkSync (2022), https://zksync.io/
Cross-border exchange of wholesale cbdcs using automated market-makers (2023)
Drex – digital brazilian real (2023), https://www.bcb.gov.br/en/financialstability/drex_en
Etherscan (2023), https://etherscan.io/
Polygon (2023), https://polygon.technology/
Adams, H., Zinsmeister, N., Salem moody, M., River Keefer, u., Robinson, D.: Uniswap v3 Core (2021)
Auer, R., Haslhofer, B., Kitzler, S., Saggese, P., Victor, F.: The technology of decentralized finance (defi) (2023)
Buterin, V.: Ethereum: A Next-Generation Smart Contract and Decentralized Application Platform. (2014)
Buterin, V., Illum, J., Nadler, M., Schar, F., Soleimani, A.: Blockchain privacy and regulatory compliance: Towards a practical equilibrium. Available at SSRN (2023)
Chaum, D., Grothoff, C., Moser, T.: How to issue a central bank digital currency (2021)
Chu, Y., Lee, J., Kim, S., Kim, H., Yoon, Y., Chung, H.: Review of offline payment function of cbdc considering security requirements. Applied Sciences 12(9) (2022). https://doi.org/10.3390/app12094488, https://www.mdpi.com/2076-3417/12/9/4488
Egorov, M.: Curve Whitepaper: Automatic market-making with dynamic peg (2021)
Fiege, U., Fiat, A., Shamir, A.: Zero knowledge proofs of identity. In: Proceedings of the nineteenth annual ACM symposium on Theory of computing. pp. 210–217 (1987)
Gangwal, A., Gangavalli, H.R., Thirupathi, A.: A survey of layer-two blockchain protocols (2022)
Gogol, K.: Github repository, cbdcs in amms (2023), https://github.com/kgogol/CBDCinAMMs
Gogol, K., Killer, C., Schlosser, M., Boeck, T., Stiller, B.: SoK: Decentralized Finance (DeFi) – Fundamentals, Taxonomy and Risks. vol. 2022 March. IEEE Computer Society (2023)
Gudgeon, L., Werner, S.M., Perez, D., Knottenbelt, W.J.: Defi protocols for loanable funds: Interest rates, liquidity and market efficiency (2020)
Lipton, A., Sepp, A.: Automated market-making for fiat currencies (2021)
Morales-Resendiz, R., Ponce, J., Picardo, P., Velasco, A., Chen, B., Sanz, L., Guiborg, G., Segendorff, B., Vasquez, J.L., Arroyo, J., Aguirre, I., Haynes, N., Panton, N., Griffiths, M., Pieterz, C., Hodge, A.: Implementing a retail cbdc: Lessons learned and key insights. Latin American Journal of Central Banking 2(1), 100022 (2021). https://doi.org/https://doi.org/10.1016/j.latcb.2021.100022, https://www.sciencedirect.com/science/article/pii/S2666143821000028
Nakamoto, S.: Bitcoin: A Peer-to-Peer Electronic Cash System (2008), www.bitcoin.org
Nanez Alonso, S.L., Jorge-Vazquez, J., Reier Forradellas, R.F.: Central banks digital currency: Detection of optimal countries for the implementation of a cbdc and the implication for payment industry open innovation. Journal of Open Innovation: Technology, Market, and Complexity 7(1) (2021). https://doi.org/10.3390/joitmc7010072, https://www.mdpi.com/2199-8531/7/1/72
Rajput, V.U.: Research on know your customer (kyc). International Journal of Scientific and Research Publications 3(7), 541–546 (2013)
Schar, F.: Decentralized finance: On blockchain- and smart contract-based financial markets (2020), https://ssrn.com/abstract=3571335orhttp://dx.doi.org/10.2139/ssrn.3571335
Sguanci, C., Spatafora, R., Vergani, A.M.: Layer 2 blockchain scaling: A survey. arXiv preprint arXiv:2107.10881 (2021)
Tiruviluamala, N., Port, A., Lewis, E.: A general framework for impermanent loss in automated market makers (2022)
Ward, O., Rochemont, S.: Understanding central bank digital currencies (cbdc). Institute and Faculty of Actuaries pp. 1–52 (2019)
Werner, S.M., Perez, D., Gudgeon, L., Klages-Mundt, A., Harz, D., Knottenbelt, W.J.: Sok: Decentralized finance (defi) (2022)
Xu, J., Paruch, K., Cousaert, S., Feng, Y.: SoK: Decentralized Exchanges (DEX) with Automated Market Maker (AMM) Protocols (3 2021), http://arxiv.org/abs/2103.12732
Xu, J., Paruch, K., Cousaert, S., Feng, Y.: SoK: Decentralized exchanges (DEX) with automated market maker (AMM) protocols. ACM Computing Surveys 55(11), 1–50 (feb 2023). https://doi.org/10.1145/3570639, https://doi.org/10.1145%2F3570639
Yee, B., Song, D., McCorry, P., Buckland, C.: Shades of finality and layer 2 scaling (2022)
Authors:
(1) Krzysztof Gogol, University of Zurich ([email protected]);
(2) Johnnatan Messias, Matter Labs;
(3) Malte Schlosser, University of Zurich;
(4) Benjamin Kraner, University of Zurich;
(5) Claudio Tessone, University of Zurich.