UniSync: a port of Uniswap V2 on the zkEVM

The first full application on an EVM-Compatible zkRollup!

Matter Labs
Matter Labs

--

Since our announcement of the first version of zkSync 2.0 on testnet, the Solidity compiler has reached a robust state and we have finished the development of the Web3 API with additional L2 specific functionality. We are tremendously excited today to present a fully functional dApp with Solidity smart contracts and a Web3 frontend!

Try out UniSync, our port of the Uniswap V2 smart contracts and frontend:

>>> Launch dApp <<<

We have also prepared a comprehensive zkEVM FAQ.

A Solidity-first Approach

In the past, it was necessary to switch to ZK languages in order to take advantage of the unmatched scaling, security, and UX benefits of zero knowledge proofs. But this is no longer the case: after many R&D breakthroughs, the innovations that make the zkEVM possible have elevated Solidity to a first class citizen in the ZK Rollup universe.

Developing on zkSync will feel natural and familiar, with Solidity, Web3 API, Ethers SDK, and native Ethereum signatures. And audited codebases battle tested on Ethereum will be as secure on zkSync as they are on mainnet. From code to developer tooling, from user to developer experience, everything will be compatible!

By making Solidity native to ZK Rollups, we have preserved many important properties of Ethereum that extend far beyond that of just one programming language:

1. Security

Solidity is currently securing over 100 billion dollars. But with over 1 billion in hacked funds so far, each lesson learned in security did not come for free. We climbed up the learning curve one fatal mistake at a time. It took over 5 years for a set of auditing firms and a broader security-focused community to form around Solidity, and preserving this expertise is paramount.

2. Composability

Most dApps on Ethereum are tightly coupled: they build on other dApps and/or have dApps built on them. By keeping Solidity, we are leaving the composability stack intact.

While it would be possible for dApps written in different languages to maintain composability, it’s not easy. Say Uniswap or Aave switch to a new language: this would require all protocols that use them to adjust, which can cause enormous wave effects! Yearn would have to adjust, potentially forcing Alchemix to adjust, and so on.

With Solidity all the way up and all the way down, it also keeps the barrier low for new composability patterns to emerge.

3. Low Effort

Generally, it will be possible to port all existing projects without major modifications, and you can re-use existing tooling. It saves you the work of maintaining many implementations of the same protocol, and it will be easier to find developers and auditors.

Some may be concerned about the efficiency of Solidity as compared to native ZK languages, but computational efficiency is no longer the bottleneck. The scarcest resource was, is, and will continue to be programmers. Hiring developers and auditors for Solidity is hard, hiring for ZK languages that are less than one year old will be harder! If each ZK protocol were to have its own language, picking one would mean being confined to that one system, whose success is dependent on an ecosystem-wide shift from Solidity. Supporting Solidity through transpilers may result in more spots for vulnerabilities, odd behaviors in VM after transpilation that auditors need to account for, and inefficient code (while the zkEVM is designed to work as efficiently as possible with 256 bit integers).

As an ecosystem, it is too costly to transition to a new programming language right now. We are in a race against time: a race for freedom. In its early stages, the Internet was almost overtaken by private institutions, but it is a public good today because it outpaced privatization. We are at a similar turning point for blockchains: if we are not fast, we risk losing the promises of Web3 to powerful actors that want to control and regulate it.

Zero-knowledge proof technology relies on math to deliver true trustlessness, and the zkEVM harnesses its power inside Solidity, creating a more simple, secure, and scalable future. Because of the zkEVM, Solidity can be used to program smart contracts in zkSync 2.0, a Volition system where users can choose between a zkRollup with Ethereum degree of security and zkPorter with sidechain-like ultra-low fees (yet more security than any other L1 or sidechain).

UniSync is a port of Uniswap V2’s code and frontend by Matter Labs and is not affiliated with Uniswap Labs. We welcome the Uniswap community to try UniSync and launch an instance of Uniswap on zkSync 2.0’s upcoming mainnet!

P.S. We have some very exciting news coming soon! Stay up-to-date.

Twitter: https://twitter.com/zksync

Discord: https://join.zksync.dev/

Telegram: https://t.me/zksync

Mailing List: https://mailchi.mp/a699ff80d73d/matter-labs

Testnet waitlist: https://forms.gle/jQQnJJeuVSVcmkqj9

Matter Labs is hiring!

Join us and help bring crypto mainstream.

All jobs: https://boards.eu.greenhouse.io/matterlabs

--

--