Skip to content

Commit

Permalink
ci-please-pass
Browse files Browse the repository at this point in the history
  • Loading branch information
JafarAz committed Nov 20, 2023
1 parent 10853a8 commit 1459579
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
36 changes: 18 additions & 18 deletions docs/docs/technology/cvm/virtual-wallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

The Virtual Wallet allows users to manage funds across multiple networks using a single native account on one designated chain, known as the "wallet" chain.

It's important to note that the virtual wallet is not a standalone contract; rather, it leverages the CVM and MANTIS to facilitate the seamless handling of user intentions across different blockchain domains while requiring just one signature from the user.
It's important to note that the virtual wallet is not a standalone contract; rather, it leverages the [CVM](../cvm.md) and [MANTIS](../mantis.md) to facilitate the seamless handling of user intentions across different blockchain domains while requiring just one signature from the user.

## Inventing the Virtual Wallet

### Problem

`Alice` only has an `Ethereum` wallet and able to pay gas fees on ETH mainnet.
`Alice` only has an `Ethereum` wallet and is able to pay gas fees on ETH mainnet.

`Bob` only has a `Cosmos` wallet and is able to pay gas fees on the Cosmos Hub.

Alice wants to swap some `ATOM` for `ETH`.

Bob wants to swap some `ETH` for `ATOM`.

Bob and ALice are both satisfied with the price they are willing to exchange ATOM and ETH however, the amount of `ATOM` Alice needs is more than what Bob has to offer.
Bob and ALice are both satisfied with the price, and they are willing to exchange ATOM and ETH. However, the amount of `ATOM` Alice needs is more than what Bob has to offer.

**How can we make this exchange happen?**

Expand All @@ -28,21 +28,21 @@ To enable a secure and atomic exchange, ensuring that both Alice's and Bob's ass

2. Bridge Information: The next step is to bridge information about the escrow and its ownership from both Ethereum and Cosmos Hub to Composable. This information should include details about the locked assets, ownership, and any conditions required for the exchange.

Atomic Exchange: Once the information is successfully bridged to the Composable domain, an atomic exchange can be initiated. This exchange process should ensure that both Alice's and Bob's assets are released simultaneously on the Composable chain, enabling a secure and coordinated transfer.
**Atomic Exchange**: Once the information is successfully bridged to the Composable domain, an atomic exchange can be initiated. This exchange process should ensure that both Alice's and Bob's assets are released simultaneously on the Composable chain, enabling a secure and coordinated transfer.

**This mechanism resembles an IBC ICS-20 or Polkadot XCM reserve transfer.**

Upon the arrival of information about the escrowed tokens on Composable, users can engage in atomic token exchanges with each other.

After the swap, users have various options:

- Retaining Assets on Composable: Users can choose to keep their assets on Composable, allowing them to settle their next intentions within the Composable ecosystem.
- **Retaining Assets on Composable:** Users can choose to keep their assets on Composable, allowing them to settle their next intentions within the Composable ecosystem.

- Moving to the Originating Chain: Users can move their assets back to the originating chain where they have their primary wallet.
- **Moving to the Originating Chain:** Users can move their assets back to the originating chain where they have their primary wallet.

- Moving to the Source Chain of Assets: Users may decide to transfer their assets back to the source chain where the tokens were initially minted.
- **Moving to the Source Chain of Assets:** Users may decide to transfer their assets back to the source chain where the tokens were initially minted.

- Moving to Any Other Chain: Users also have the flexibility to move their assets to any other network of their choice.
- **Moving to Any Other Chain:** Users also have the flexibility to move their assets to any other network of their choice.

In all these scenarios, users want to maintain control over their assets. To facilitate this, the concept of a CVM Executor is introduced, which acts as a cross-chain account. The CVM Executor plays a crucial role in enabling users to retain control over their assets while seamlessly managing them across different blockchain networks and domains.

Expand All @@ -59,40 +59,40 @@ It's essential to note that CVM enforces strict security measures, ensuring that

*Configuring Proxy (Delegation) Accounts in the CVM Executor*

Users have the ability to initiate a CVM program to integrate a proxy or delegation account with their CVM Executor account. This enables a native account in Composable to oversee and manage the user's funds, subject to predefined constraints, and execute operations on behalf of the user's CVM Executor.
Users have the ability to initiate a CVM program to integrate a proxy or delegation account with their CVM Executor account. This enables a native account in Composable to (1) oversee and manage the user's funds, subject to predefined constraints, and (2) execute operations on behalf of the user's CVM Executor.

*Universal Compatibility*

This functionality is universally applicable across al networks where the CVM is operational, provided that standardised protocols for proxy or delegation exist. Users can leverage this feature to manage their assets consistently across compatible chains.
This functionality is universally applicable across all networks where the CVM is operational, provided that standardized protocols for proxy or delegation exist. Users can leverage this feature to manage their assets consistently across compatible chains.

*Delegation to Multiple Origins*

Users retain the flexibility to delegate these responsibilities to multiple origins of CVM Executors.

**Why is the user's funds not showing up on their native wallet?**

Until native wallets on individual chains provide support for the CVM, users will need to make use of a CVM-specific wallet and accompanying dashboard. These specialised tools are designed to consolidate and display the user's assets across all chains where the CVM is operational.
Until native wallets on individual chains provide support for the CVM, users will need to make use of a CVM-specific wallet and accompanying dashboard. These specialized tools are designed to consolidate and display the user's assets across all chains where the CVM is operational.

**Does this mean the Virtual wallet is custodial?**

No, the Virtual Wallet is non-custodial. The instance of the CVM executor is created per user signature therfore, the funds are always in the CVM executor which is owned by the user or in flight over IBC.
No, the Virtual Wallet is non-custodial. The instance of the CVM executor is created per user signature. Therfore, the funds are always in the CVM executor which is owned by the user or in flight over IBC.

CVM contracts are managed by cross chain DAO.

## Benefits of the Virtual Wallet

The Virtual Wallet streamlines operations, reduces risks, enhances gas efficiency, and promotes increased liquidity usage.
The Virtual Wallet streamlines operations, reduces risks, enhances gas efficiency, and promotes increased liquidity usage. Additional benefits include:

1. Opt for Local Atomic Exchange: Instead of relying on multi-block swaps that may fail, it executes local atomic exchanges followed by cross-chain transfers, which have a lower likelihood of failure.
1. **Opt for Local Atomic Exchange:** Instead of relying on multi-block swaps that may fail, it executes local atomic exchanges followed by cross-chain transfers, which have a lower likelihood of failure.

2. Simplify Multi-hop Operations: Replaces multi-hop transfers and multi-hop swaps with location-based operations on assets already accessible in wallets with delegated liquidity, such as through CoW orders.
2. **Simplify Multi-hop Operations:** Replaces multi-hop transfers and multi-hop swaps with location-based operations on assets already accessible in wallets with delegated liquidity, such as through CoW orders.

3. Flexible Fund Management: Allows cross-chain asset management to adjust path prefixes, either expanding or reducing them when beneficial.
3. **Flexible Fund Management:** Allows cross-chain asset management to adjust path prefixes, either expanding or reducing them when beneficial.

4. Consolidate Cross-Chain Operations: Bundles multiple small cross-chain operations into a single transaction for improved efficiency.
4. **Consolidate Cross-Chain Operations:** Bundles multiple small cross-chain operations into a single transaction for improved efficiency.


**The role of Solvers in an example**
**The role of Solvers in MANTIS in an example use case for the virtual wallet**

Alice seeks to exchange her ETH for ATOM on Neutron.

Expand Down
4 changes: 2 additions & 2 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,11 @@ const config = {
},
{
label: 'Risk Factors'
href: 'https://docs.composable.finance/faqs/risk-factors'
href: 'https://docs.composable.finance/faqs/risk-factors',
},
{
label: 'Terms of Use'
href: 'https://docs.composable.finance/faqs/terms-of-use'
href: 'https://docs.composable.finance/faqs/terms-of-use',
},
],
},
Expand Down

0 comments on commit 1459579

Please sign in to comment.