-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1108: [CU-29qn1qa] docs(mdbook XCVM): update text and summary r=KaiserKarel a=Martin-Kiss ## Issue https://app.clickup.com/t/29qn1qa ## Description Replaced old texts with new versions Co-authored-by: Martin-Kiss <[email protected]> Co-authored-by: 0xbrainjar <[email protected]>
- Loading branch information
Showing
16 changed files
with
76 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,40 @@ | ||
# Cross-Chain Virtual Machine | ||
*The Composable XCVM allows for cross-ecosystem communication.* | ||
# Composable’s Cross-Chain Virtual Machine | ||
|
||
--- | ||
The Composable XCVM allows for cross-ecosystem communication enabled through cross-chain smart contracts. | ||
|
||
The Composable Cross Chain Virtual Machine (XCVM) is a single, developer friendly interface to interact orchestrate smart contract functions across the multitude of L1 and L2 networks available. In short, the XCVM serves to abstract complexity from the process of having to send instructions to the routing layer directly, initiate call-backs into smart contracts, and more. | ||
|
||
Utilizing the [Innovation Availability Layer](./cross-chain-virtual-machine/innovation-availability-layer.html) (IAL) infrastructure, we are creating a set of tools for the Composable Cross-Chain Virtual Machine that developers can use to tap into various functions of communication and liquidity availability. The result is multifaceted; users can perform cross-chain actions, and the overarching blockchain ecosystem is repositioned as a network of agnostic liquidity and available yield. | ||
--- | ||
|
||
![XCVM unites ecosystems](./xcvm-unites-ecosystems.jpg) | ||
*The XCVM unites a number of ecosystems across DeFi.* | ||
The current siloed nature of DeFi hampers interoperability between layers and chains. The **Composable Cross-Chain Virtual Machine (XCVM)** will facilitate easy and accessible cross-chain-and-layer communication and is our answer to this issue. The XCVM is a single, developer-friendly interface designed to interact and orchestrate smart contract functions across the L1 and L2 blockchains connected to our ecosystem. | ||
|
||
In order to facilitate this communication, we need two specific components that we are currently building: the Communication and Finality layers of our XCVM. | ||
In short, the XCVM **abstracts complexity** from the process of having to send instructions to the Routing Layer, **initiates call-backs** into smart contracts, **handles circuit failure** such as network outages, **provides finality**, and perhaps most notably, **allows for the deployment of natively cross-chain protocols and smart contracts**. Throughout this experience, we enable users to tailor their experience by maximizing for a desired parameter while minimizing ecosystem-specific decision making. | ||
|
||
- **Innovation Availability Layer (IAL)**: This includes the following features: | ||
- Polkadot-IBC cross-chain communication and asset transfers | ||
- L2-L2 communication and transfer through our parachain | ||
- **Finality Layer**: This will be our parachain offering — called [Picasso](./the-picasso-parachain.html) on Kusama, and [Composable](./the-composable-parachain.html) on Polkadot. | ||
We do not aim to create a new standard for cross-chain communication, which is already the object of numerous projects. Instead, the XCVM will serve as the orchestration layer for existing bridging protocols, as depicted below: | ||
|
||
![composable_technical_stack](./composable-technical-stack.jpg) | ||
*Features and order execution within a XCVM environment* | ||
|
||
![Our XCVM includes the IAL and our parachains, allowing communication across various chains and layers.](./xcvm-ial-parachains.png) | ||
*Our XCVM includes the IAL and our parachains, allowing communication across various chains and layers.* | ||
--- | ||
|
||
The idea of our solution, however, is not to create a new standard for cross-chain communication, which is already the object of a number of projects. Instead, the intention is to serve as a data availability layer for existing cross-chain communication protocols like IBC and Polkadot’s cross-chain message passing (XCMP). | ||
## The Problem in Current Interoperability Solutions | ||
|
||
Throughout this experience, Composable allows users to tailor their experience to maximize for a desired parameter while minimizing ecosystem-specific decision making. | ||
**The XCVM creates an environment where smart contracts on different chains can interoperate in a** [**trustless way with finality proofs in the Centauri bridging infrastructure**](https://medium.com/composable-finance/trustless-bridging-438a6e5c917a) | ||
|
||
![XCVM example use case](./xcvm-example-use-case.png) | ||
*An example use for the Composable XCVM, allowing a user to borrow with USDC on Angular Finance and invest into a liquidity pool on SushiSwap, a process that can occur cross-chain and cross-layer thanks to Composable's technology.* | ||
Unlike existing iterations of blockchain virtual machines, the XCVM does not force applications and smart contracts to be deployed onto one particular chain. Instead, the XCVM provides a novel opportunity for applications to be **natively cross-chain**. The goal is to facilitate a top-down approach to interoperability and composability instead of connecting different pre-existing pieces together. | ||
|
||
We will also provide **developer interfacing** for the XCVM: tooling with which users can interface with the Composable XCVM, such as testing suites, deployment scripts, etc. | ||
During the pre XCVM era, developers who wished to create an interoperable application needed to consider the various chains they wanted their applications to operate between and narrow down their choice to just one as their native chain. Then, they must deploy their project to work with that specific chain’s virtual machine (for instance, the EVM for a project built on Ethereum). An additional burden to developers is finding an interoperability solution that works with Ethereum and the other chains they wish their applications to communicate with, integrate that solution, and use it any time there’s a need to bridge to other applications that are not on Ethereum. Further, suppose they want to deploy that project on additional chains. In that case, DeFi developers must completely recreate their projects and then link them with their existing ones - possibly many times over, depending on the number of instances they desire to create. | ||
|
||
|
||
## The XCVM and its Vision for Composability | ||
|
||
Our vision is to create **a cross-ecosystem communication solution, top-down**. Our XCVM serves as an **orchestration layer** for existing bridging protocols. As a result, these applications can be **not just interoperable but also composable**; developers can use the XCVM to compose protocols across various existing chains to allow for maximal customization and effectiveness. | ||
|
||
The XCVM is built using the CosmWasm framework. CosmWasm is the default smart contract framework for the Cosmos ecosystem, made to ensure security and interoperability and built. Composable will be the first to deploy it within DotSama. The XCVM will be a novel union of the DotSama and IBC ecosystems and their relative advantages and drive forward Composable’s vision for absolute ecosystem agnosticism. | ||
|
||
Any blockchain that is XCVM-compatible can upgrade the overall product by tapping into cross-chain functionality at its core, opening up the user base to a variety of ecosystems and their communities. The result is multifaceted; users can perform cross-chain actions, and the blockchain ecosystem is repositioned as a network of agnostic liquidity and available yield. | ||
|
||
More specifically, the XCVM enables developers to write smart contracts that span multiple ecosystems, all in a single easy to use interface. The XCVM itself orchestrates interaction with different bridges, manages routing, and handles smart contract requirements like callbacks, reliability, and finality. It is the virtual machine engine that drives all cross-chain and cross-layer interoperable transactions within the Composable ecosystem. | ||
|
||
Composable recognizes the different approach to safe messaging passing in Polkadot and Cosmos networks, which leverage the [Inter-Blockchain Communication (IBC) Protocol](https://ibcprotocol.org/) and[ Cross-Chain Message Passing (XCMP)](https://wiki.polkadot.network/docs/learn-crosschain) respectively. The XCVM augments these existing projects and synergizes to act as orchestration layer for both messaging protocols. | ||
|
||
Developers do not have to focus on the complex technicalities required for interoperable transactions. Instead, it serves as an orchestration framework for cross-chain communication and function calling across multiple ecosystems. It pushes DeFi further along the spectrum of interoperability, and takes the first steps towards making blockchain agnosticism a reality. |
Binary file added
BIN
+69.4 KB
...cts/cross-chain-virtual-machine/cross-chain-lending-example-composable-xcvm.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions
12
book/src/products/cross-chain-virtual-machine/how-the-xcvm-works.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# How the XCVM works | ||
|
||
Virtual machines are abstracted away from activities required for cross-chain operations such as security, finality in different networks, fee calculation, and provide a simple interface for developers to build on. The security and finality are dependent on the bridging technology used and fees will vary according to network traffic. | ||
|
||
![how_the_xcvm_works](how-xcvm-works.jpg "How the XCVM works") | ||
|
||
The XCVM combines different bridging protocols, such as IBC, XCM, and Mosaic Phase 3, and is capable of integrating new bridging technologies. For example, for a cross-chain transfer, we model it as a set of reversible state transitions with different approximate costs for each transition. The XCVM offers Picasso-based decentralized applications (dApps), different hooks, and updates on the status of any cross-chain transfers, as well as RBAC-based flow control for actively managing the execution of different stages. dApps incur transaction fees for calling into the XCVM. | ||
|
||
For example, let’s say a user wants to borrow with USDC (collateral) on Angular Finance, a secondary pallet on Picasso, and invest into a liquidity pool on SushiSwap. Thanks to our technology, this process can occur cross-chain-and-layer. Upon instruction and orchestration by the Composable XCVM, the Routing Layer selects the optimal route for the user’s desired outcome, which propagates communication cross-ecosystem, and to our transfer availability layer, Mosaic, which then facilitates the transfer of the borrowed asset to a liquidity pool on SushiSwap, with settlement being recognized on our parachain. This process, as facilitated by Composable and the XCVM, is depicted below: | ||
|
||
![cross_chain_lending_example_composable_xcvm](cross-chain-lending-example-composable-xcvm.jpg "An cross-chain lending example using the Composable XCVM") | ||
*An cross-chain lending example using the Composable XCVM* |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file removed
BIN
-33.7 KB
book/src/products/cross-chain-virtual-machine/ibc-substrate-bridge.png
Binary file not shown.
31 changes: 0 additions & 31 deletions
31
book/src/products/cross-chain-virtual-machine/innovation-availability-layer.md
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
book/src/products/cross-chain-virtual-machine/routing-layer-libraries.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Routing Layer Libraries | ||
|
||
Routing Layer libraries on the XCVM allow for easier development and programming on the Composable infrastructure. | ||
|
||
The XCVM will offer routing layer libraries for every generalized function of the Composable Routing Layer, such as a library of application binary interfaces (ABIs) for general functions such as swaps, lending and more on different chains. The library will seamlessly integrate with the infrastructure of the Indexer and the Solver and include different features and processes. | ||
|
||
Composable will also create a code repository for these libraries which will be open to user contribution. As a result of these repositories, the XCVM will be able to reference any of the protocols in a relevant enclosed library. Developers would be able to select the ABI they need from the library of their choice, with the routing layer acting as the best option between these libraries. | ||
|
||
As DeFi becomes more interoperable, ABIs and addresses are spread further across different chains. Developers are forced to search for protocols and corresponding ABIs across different ecosystems, interlink disparate protocols, and manually update smart contract integrations, all of which becomes more difficult with scale. Libraries that store and record protocol and ABI information solve this, but are few in number and exist primarily for the Ethereum network. Through the XCVM and the Composable routing layer’s interoperable functionality, it will enable the creation of routing layer libraries across several DeFi ecosystems. |
23 changes: 23 additions & 0 deletions
23
...c/products/cross-chain-virtual-machine/writing-smart-contracts-with-cosmwasm.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Writing Smart Contracts with CosmWasm | ||
|
||
|
||
## CosmWasm’s Advantages | ||
|
||
Composable selected CosmWasm as the developer framework for smart contract deployment on the XCVM as it offers cross-chain support, is tightly compatible with Cosmos chains, and has superior security design. | ||
|
||
[CosmWasm](https://cosmwasm.com/) is an abbreviation derived from the combination of the name [Cosmos](https://cosmos.network/) and the abbreviation for [WebAssembly](https://webassembly.org/), Wasm. It implements the WASM smart contract engine for the Cosmos SDK and runs on the IBC. This allows projects using CosmWasm to communicate cross-chain between all of the chains linked on the IBC protocol. It enables dApps to function as smart contracts on Cosmos chains, without the need to develop a new chain. | ||
|
||
A key feature of CosmWasm is that it allows for multi-chain contracts; one dApp, one contract, but multiple chains. Any chain using the Cosmos SDK can easily integrate the CosmWasm module, which is built to maintain low overhead on systems demand. CosmWasm allows for composition across multiple chains and migration to other chains, with built-in, permissioned, pre-contract migration functionality. As such, CosmWasm is designed to connect different blockchains, and allows users to benefit from the utility across chains instead of being forced to choose between them. | ||
|
||
In terms of security, CosmWasm is designed to avoid the attack vectors found in [Ethereum and Solidity](https://docs.cosmwasm.com/docs/0.16/architecture/smart-contracts), such as Reentrancy, Arithmetic Underflows/Overflows, and Default Visibilities. Its security is further reinforced by its [well-developed tooling and testing mechanisms](https://medium.com/cosmwasm/cosmwasm-for-ctos-i-the-architecture-59a3e52d9b9c) [prioritized early in its conception](https://medium.com/cosmwasm/cosmwasm-for-ctos-f1ffa19cccb8). | ||
|
||
Due to these benefits, many DeFi projects have adopted CosmWasm as their smart contract framework, including notable examples like Terra, OKX, Crypto.org, and Osmosis. | ||
|
||
|
||
## CosmWasm as the Developer Framework for the XCVM | ||
|
||
CosmWasm’s inter-chain contract support works hand in hand with XCVM’s interoperable smart contract functionality. Through the adoption of CosmWasm, the XCVM will be the first to bring its functionality to the DotSama ecosystem. This will enable the XCVM to combine the benefits of both ecosystems and connect CosmWasm to a broader range of DeFi ecosystems. As such, developers will be able to write smart contract for DotSama, that exist as multi-chain contracts on IBC-Cosmos. Accessible, interoperable smart contract creation is crucial for developing ecosystems, especially nascent ecosystems, that will form a considerable role in DeFi’s future. These ecosystems and protocols that exist cross-chain suffer from the fragmented liquidity of the DeFi space. As such, they need virtual machines like the XCVM that enable multi-chain contracts and cross-chain communication. | ||
|
||
CosmWasm’s customizability and use of the Rust programming language makes it optimal for adoption as a developer framework for the XCVM. Compared to Solidity, Rust makes it easier for developers to write secure code and comes with stronger tooling support. This makes it well-suited to the development of infrastructure projects and the language of choice in the DotSama ecosystem. | ||
|
||
CosmWasm is defined by its interoperability. Polkadot is defined by its shared security. By merging the two, the XCVM is able to leverage their advantages to create a novel smart contract platform within the DeFi space that is deeply interoperable and highly secure. Thus, the XCVM can act as an easy portal for existing or new protocols to participate in the ever-expanding cross-chain movement, augmenting the unification of the DeFi industry and helping deliver the ultimate goal of chain agnosticism in DeFi. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.