Chain Abstraction
Last updated
Last updated
VDEX is fully chain abstracted and operates a single, unified orderbook. This means a user can deposit and withdraw from any chain with liquidity. This results in two notable breakthroughs: eliminating the hassle of bridging and the unification of liquidity.
This makes VDEX the first decentralized exchange deployable on every chain.
In most exchanges, users can only deposit from one chain. This means that they must trust a bridge to move their funds from their preferred chain to the blockchain that hosts the desired application. The Virtual Labs team thinks that this is really dumb.
Users should not need to care about the underling architecture. Infrastructure and applications alike must attempt to remove frictions and hide low-level technical systems. Now, they do not. Web3-native users will be able to deposit directly from their wallet. Normie users will automatically create an AA wallet at entry without ever realizing they were trading onchain.
This is not only an experience revolution, but an innovation in liquidity. Before, memecoins were siloed to Solana and Base, serious trading occurred with high gas on Ethereum, and perpetual traders had to move funds to dydx and Hyperliquid's centralized L1s.
This reduced competition on each ecosystem and exchange. This problem was most acute on exchanges which operated crosschain, such as Uniswap, which have to managed AMM pools across multiple different blockchains, increasing price impacts and decreasing competition. The latter of these leads to frustrating frontrunning and sandwich attacks.
Now, all deposits fund accounts that can trade on an orderbook shared by depositors from all other chains.
VDEX runs Virtual Rollup 1.2. VR1.2 is made up of two parts: onchain escrow contracts and self-verified peer-to-peer state channels. All transactions occur within the state channels while the smart contracts only handle deposits and withdrawals. So, it is the smart contracts job to accept the deposit and create the state channel.
After the state channel is created onchain, the user and VDEX sign each subsequent trade, not dissimilar to a 2/2 multisig. The user and VDEX store each other's signatures on their own devices. Therefore, at any one time the user stores the deposit signature and N trade signatures. To withdraw and unilaterally claim their capital, the user runs a function to combine the previous signatures into one 520-bit withdrawal signature.
Here's the trick: the smart contracts deployed across multiple chains are identical. Therefore, this 520-bit withdrawal signature can be submitted across any chain that has deployed Virtual Rollup and holds enough liquidity. However, if the chains are identical, then why can a user not submit the same signatures across all chains and double-spend?
The deployed smart contracts are identical except for one variable: chainID—the blockchain know which chain they are in relation to other chains. Say Ethereum is chainID:0 and Bitlayer is chainID:1. When the withdrawal signature is generated, its chainID is set to a specific value: 0,1,2... If this signature is submitted onto a chain that does not match the chainID, it will reject the signature.
VR1.2 enables chain abstraction, but also creates something of a Virtual Bridge, which shall be explored in the next section.