ZKLINK ABOUT

7wx6...SnM4
22 Jan 2024
38

We’re on a mission to unify the world’s blockchains by building a next-generation L2 network that is secure, efficient, and easy to use for developers and users.
The blockchain industry is rapidly becoming a diverse multi-chain world, with each chain offering unique advantages with security, privacy, fees, and scalability for a variety of different use cases.However, by isolating tokens in walled gardens on different blockchains, both users and DeFi projects must deal with major hurdles.Users are faced with complex cross-chain transfers with dozens of clicks that often wipe out the enthusiasm to engage with a project, while DeFi projects suffer from low fund utilization rates, and the challenge to onboard and retain active users.
zkLink allows developers to build upon a unified, multi-chain, multi-purpose L2 network secured by zero knowledge.Developers can leverage access to the aggregated liquidity from previously isolated chains, and all the users from those chains.

Secured by zero-knowledge technology

With minimal security compromise, high efficiency at scale, and trust-minimized security design, zero-knowledge technology is considered by many to be the ‘end game’ for blockchain security, scalability, and privacy.zkLink applies zero-knowledge proofs (ZK-SNARKS) in a multi-chain context, and provides easy-to-deploy ZK-powered dApp solutions to developers via high-level APIs.

Keeping Cross-Chain Trades Safe: zkLink’s Asset Security Features

As a trustless chain-to-chain decentralized exchange (DEX), asset security is and has always been the first priority for the developers at zkLink.
In this post, we explain how zkLink’s security architecture is logically strong enough to prevent a cross-chain hack, by minimizing the potential risks of attacks on chain interoperation from two perspectives:

  1. The correctness of the computation
  2. The validity of cross-chain states

Most cross-chain protocols are indifferent to the correctness of computation or cross-chain state validity, since a multisignature (multi-sig) group usually handles these two concerns to ‘sign off’ on a trade.
However, zkLink has a different logical structure split into two parts: zero-knowledge technology ensures the correctness of computation, while the validity of the verification process relies on a network composed of multiple oracles similar to a multi-sig group. For more details, please refer to zkLink docs.
When a user initiates a trade, its change-in-state will be correctly calculated on the circuit. After which, zkLink’s Layer2 engine will process a recursive verification using the zk proofs from both the chains, with the parameters amount0amount1r0, and r1 satisfying the automated market maker (AMM) restrictive condition.
In this way, the current states of the different chains are interrelated mathematically.

enforce((r0 + amount0)*(r1-amount1) == r0 * r1)

Once the recursive_proof function is executed, the two independent systems have a mutual final_root on the zkLink Layer2 network.
Then, just like a classic ZK-Rollup solution, zkLink uploads all the necessary information of the transaction, along with the final_root, to the Layer1 contract on both chains for the purpose of on-chain data availability.
The recursive ZK-SNARK will be further approved by the zk_verify function, before the Layer1 smart contract emits log (final_root).
When the final_root is settled, it is not possible to fake the source data of this final_root, since the data and the final_root exhibit a nonlinear causality (in a self-reinforcing loop).
zkLink has solved a complicated and uncertain problem with an extremely simple solution — comparing whether the two or more final_roots are consistent with each other or not.

The validity of cross-chain states

In most chain-interoperation projects, the consistency of the multi-chain status is checked by a multi-sig group, meaning the state validity depends on the logic of the program — or the competence of the people who actually wrote the code.
zkLink in contrast, is secure by design, and provides a mechanism to check if the final_roots from two interacting chains match.
Instead of running our own program, we utilize an oracle network for data transmission, which passes the final_root of one chain to the other, and the local smart contract can simply compare the final_root with its own. Thanks to the development of DeFi-verse, there are a number of oracles to cooperate with.

Stable triangle of governance

The data security of zkLink is logically similar to the ‘checks and balances’ structure of a functioning government: executive, judicial and legislative, equivalently as 3 branches in zkLink as the sequencer, oracle network, and DAO.
The sequencer transmits the result of running the circuit to Layer1 smart contracts, while the oracle network has the power to approve or halt it, and the change of members in each oracle network or the sequencer can be voted on by the zkLink DAO.
These separation of powers are designed to guard the zkLink protocol against an attack from both external hackers and internal stakeholders, ensuring no single branch has too much power.

Preventing attacks on cross-chain trades

By studying the transaction processes of recent cross-chain security hacks, we find there are 2 scenarios where security vulnerabilities often occur: in the computation process, or in the consensus process. With a different logical design, zkLink mitigates risks in both scenarios.

Vulnerability in the computation process

Before Layer2 transactions are approved and uploaded to respective Layer1 smart contract, an extra recursive proof with data derived from both chains will be generated based on established ZK-Rollup protocols.
The result of this execution is a mutual final_root of the two interacting chains, which guarantees the new state is the result of the circuit being correctly computed.
If hackers try to manipulate data uploaded to Layer1, it would be rejected by the sequencer. The zkLink dev team adopt a more sophisticated traditional web security defense technique than those open-source Layer1 protocols where the permission of validation is open through competition.

Vulnerability in the consensus process

On other protocols, if hackers manage to break the private key of a consensus member, they might potentially gain the privilege to manipulate funds on a smart contract — including the ability to transfer assets to themselves.
However, if the same thing happens on zkLink, at most, the service would be stopped for a short time.
The authority of the zkLink consensus community (a network composed of multiple third-party oracles similar to a multi-sig group in other projects) is limited in it’s authority to a minimum.
Even if hackers manage to spoof or steal the identity of the consensus community, they can never fake a transaction, instead the only damage they can ever cause is rejecting the transaction requests from Layer2 to Layer1, doing no harm at all to assets or account status.

Fast Cross Chain Swap

The “one-click” cross-chain trading tool developed on top of zkLink’s infrastructure, where users can enjoy chain interoperability on Layer1 but still benefit from Layer2 liquidity pools, with a state-of-the-art experience.
Upon your confirmation click, several algorithmic processes start running immediately behind the scenes, illustrated below:
zkLink aggregates the liquidity on third-party Layer1 DEXs so that most cost-effective route and best exchange rate will be automatically located for traders before tokens are “officially” swapped on zkLink Layer2 liquidity pools. In this manner, the scope of available source tokens is expanded considerably. Theoretically, any token listed on a local DEXs can be exchanged globally, without the need to exchange their source tokens to a zkLink supported token list in advance.
zkLink accomplishes the tedious task for users, saving them much more efforts and gas fees without the volatility of potential sudden price changes of the involved token pairs.
Based on zkLink Testnet 1.0, we integrate the three steps endogenous for a Layer2 protocol (deposit to Layer2, Layer2 swap, and withdraw to Layer1) into one procedure in < 3 seconds. Getting rid of manual step-by-step operation, the process becomes faster and more user-friendly, thus zkLink empowers users to enjoy Layer2 multi-chain liquidity pools from Layer1 in one stop.
A recognized dilemma for every Layer2 protocol is the inevitable trade-off between assets security and long waiting time for the process of withdrawal from Layer2 back to Layer1 wallet, which can take as long as hours or even days. For most Optimistic Rollup solutions, normally users need to wait for two weeks (the Dispute Time Delay) before receiving their tokens. Even for ZK-Rollup solutions which can achieve instant finality of transactions, verifying the aggregation proves can take hours depending on the traffic, disrupting user experience considerably.
zkLink, however, tackles this problem differently by introducing the concept of “broker”. Whenever a withdrawal request is issued, the optimal broker will then initiate a transaction from its Layer1 wallet on the target chain to the one of the trader’s, via zkLink smart contract deployed on Layer1 for the purpose of data storage. This process takes only one block interval of the target chain (~15s on Ethereum, ~0.4s on Solana, and ~3s on Binance Smart Chain), meaning that traders will receive their target tokens almost immediately.
Once ZK proof of this Layer2 transaction is verified, i.e., the final roots of both chains are consistent (normally it takes from 30 minutes to 1 hour), zkLink contract will then transit the right amount of tokens to the broker’s Layer1 wallet. In this manner, zkLink has managed to compress the long waiting time reuqired by the traders to a “broker”, with only a minimal additional gas expense.
As for the “multi-chain” AMM, the main challenge to overcome is “partial liquidity”, i.e., the two kinds of token native from separate chains are only interacting with respective smart contract, and a recursive ZK proof on both chains guarantees the mutual final root — this this how the states of different chains are mathematically interrelated. In the early stages, most of zkLink’s Layer2 pools consist of stablecoins or anchored tokens for the purpose of deeper liquidity, and we adopt Curve.fi’s stablecoin-specialized liquidity curve, utilizing StableSwap invariant design to keep the price slippage to its minimum.

Bridge

For most project developers, multi-chain deployment is an important strategy to attract the widest range of potential users. But, for the users, the inter-communication problem could hinder their enthusiasm to hold or trade with project-native tokens; and for projects, obstruct the re-balance of their account on each chains. Under such a background, zkLink bridge provides access to the same asset from a foreign chain.
Just as Fast Cross Chain Swap, the Bridge is built on zkLink’s Layer2 infrastructure: when a user burns the certain amount of tokens on zkLink Layer1 smart contract, with necessary information of this transaction passed to Layer2 engine, going through the same process as Fast Cross Chain Swap (data commitment, zk verify, oracle consensus, and execute; read more). If the two final_roots are consistent, Layer2 engine will approve this transaction before the right amount of token being minted and transferred to the user. zkLink’s process contrasts from most cross-chain bridges where assets security relies on the “bridge” itself, in virtue of zero-knowledge technology, zkLink bridge can achieve the same security level the source and destination chains in the way that zkLink protocol is equipped with on-chain data availability, and can rollback to the correct account status in case of attacks.
The obvious distinction between Fast Cross Chain Swap and Bridge is how users interact with zkLink Layer1 smart contracts. During Fast Cross Chain Swap, users transit tokens to zkLink smart contract on the source chain, and vice versa on the target chain; while for Bridge, zkLink smart contracts take the responsibility of burning tokens one side and minting on the other.

zkLink 4.0-alpha Is Here

2023is a big year for zkLink. In the past two months zkLink went through two major updates and we are now doing final preparations before mainnet launch.
We have made significant progress in audit report by ABDK.Consulting including both smart contract and circuit codes. Final reports will be released prior to mainnet.
Also, in this new version we scaled zkLink order slot from 16 to 65,536, which empowers users to place nearly unlimited concurrent transactions — one step closer to our version as an “decentralized Binance exchange”. It not only simplifies MM logic, but also unifies the checking rules of order nonce and account nonce.
Other updates include:

  1. Finished fast_withdraw development;
  2. Standardized API naming convention for the convenience of Ethereum developers;
  3. Re-wrote and filed technical documentation;
  4. Unified the access code on different L1s into a single access stratum;
  5. Simplified circuit_sub_system as a preparation for later opening up circuit;
  6. Finished development on Admin system v1.

Looking forward to a multi-chain future with zkLink

The past few months have been exciting for zkLink, with the realization of many milestones on our roadmap to implement zero-knowledge proofs in a number of cross-chain products.
Going forward, our team is very excited to announce our intention to build multi-chain infrastructure as a multi-purpose, unified L2 network, with zero-knowledge technology as the building block to enable a more connected, interoperable, and accessible DeFi ecosystem for everyone.
Our plan to launch a cross-chain DEX has been enhanced by a bigger vision to become a unified multi-chain L2 network, upon which many other projects will be launched.

Use cases

Our first demo on testnet was the multi-chain AMM DEX demo — with over 2.5m cross-chain transactions settled over the past few months.
Our second demo will be a multi-chain decentralized Order Book exchange demo, which brings a CEX-like trading experience by allowing users to place orders at exact price levels and guarantee optimum execution.
We’ll be releasing more use cases demos in the coming year, such as a NFT marketplace, Derivatives trading, LaunchPad, L2 Wallet, to name a few.

Looking forward to the future

The next few months are going to be very busy — the zkLink team will be busy developing and testing the network, while forging partnerships with other chains, protocols, and projects.
We predict 2022 will be a year in which zero-knowledge technology will become more well-known and will be applied to many problems in the blockchain industry and beyond — check out this excellent explainer.
We plan to build a thriving developer outreach program and can’t wait to see new innovative applications built on top of our unified, multi-chain, multi-purpose network protocol.

Announcing ZKEX as Our First Ecosystem dApp

ZKEX.com, a new decentralized multi-chain order book exchange is the first ecosystem project to be built on our L2 network.
Today we are super excited to announce ZKEX will be our first official ecosystem dApp and also the first multi-chain order book DEX secured with zero knowledge proofs.
Using zkLink’s high-performance multi-chain stablecoin merge infrastructure, users will be able to trade native tokens from multiple chains with a CEX-like user experience:

  • no slippage
  • instant finality
  • high capital efficiency
  • with multiple pending order types (limit, stop-loss, and partial fills)

…that also has the advantages of decentralized design:

  • fully non-custodial
  • trust minimized
  • trades are mathematically verified by zero-knowledge proofs

Traders on ZKEX will initially be able to spot trade across multiple chains in one-step on its fully decentralized order book matching engine, with derivatives coming later in the year.
ZKEX will also offer incentives to zkLink’s community members, who have been accruing rewards on zkLink’s testnet. We will update our community on Discord with more information on how to utilize your testnet points when the details have been finalized.
With more teams coming on board to zkLink’s network, we hope to announce more ecosystem dApps in the coming months!

About zkLink

zkLink is a trading-focused multi-chain L2 network with unified liquidity secured by ZK-Rollups.
By connecting different blockchains and Layer2 protocols, zkLink’s unified, multi-purpose L2 network enables developers and traders to leverage aggregated liquidity from isolated chains and offer a seamless multi-chain user experience, contributing to a more accessible and efficient DeFi ecosystem for all.
Website: zk.link | Docs | Blog | Twitter | Discord

Write & Read to Earn with BULB

Learn More

Enjoy this blog? Subscribe to volkan1627

1 Comment

B
No comments yet.
Most relevant comments are displayed, so some may have been filtered out.