Whitelist address to deploy Composable VM CW contracts

The purpose of this discussion is because we seek to provide the address osmo1u2sr0p2j75fuezu92nfxg5wm46gu22yw9ezngh the ability to upload CosmWasm contracts to Osmosis without seeking further governance approval for each upload. This address is administered by Composable core contributors.

About Composable VM

Previously well-known as the XCVM, Composable VM (CVM) is a set of smart contracts that allow orchestration between protocols over IBC. Similar to generalized message passing, CVM can be used to abstract away individual actions from the end user to deliver a more streamlined UX. CVM operates on top of Composable’s IBC-based transfer protocol, Centauri.

Details

The end-goal of CVM will be to allow a user to interact with multiple chains and platforms while operating out of a single wallet, from a single chain. In its simplest form, this may be exemplified by a user swapping tokens between DEX’s on different chains. That is, a Polkadot user may swap DOT with a token on Osmosis DEX by having their DOT transferred across Centauri to Osmosis, swapped for a given token, and having that token delivered back to their wallet on Polkadot. This creates an experience that abstracts away the complexities of asking a user to perform multiple bridge transfers, in addition to a swap within a separate ecosystem.

By deploying the CVM contract on Osmosis, users would be able to swap any DotSama token with any Cosmos based token with liquidity on Osmosis.

Forward Looking

In addition to swap operations, actions such as staking are another strong example of operations CVM could perform for a user. Taking the last example, a user on Polkadot could transfer assets to Osmosis, swap to OSMO, perform a staking operation on Stride to receive stOSMO, and have this stOSMO transferred back to their Polkadot wallet all with only having to sign for one transaction.

Once additional features are added to CVM, new contract versions will be uploaded to Osmosis. This proposal authorises uploading any contracts required for Composable VM to function, such as routing, transfers and swaps.

Mechanism

The CVM contract to be deployed on Osmosis is responsible for handling two things:

  1. Receive swap path and minimum output amount and execute it.
  • Path is a sequence of pools that will be used to go from token A to token B, the same way as in the Uniswap V2 router.
  1. In case of a successful swap execute specified ‘after swap action’, which can be either bank send or contract call or ibc transfer.

Since the only responsibility of this contract is to perform swaps, it is stateless and does not require any ownership or pausable functions.

The contract also handles fallback scenarios for IBC transfers in case of packet failure or timeout contract. In this scenario, it will transfer swapped funds to the specified fallback_address.

Contract information:

Contact

Twitter

Discord

Website

1 Like

What I didn’t find yet, is there already a demo or something alike where we can play with?

1 Like

We don’t have a recording but we did hold a short demo of the CVM last year in Cosmoverse https://www.youtube.com/watch?v=DR3J9Lnji6E&t=247s

We do have a demo that you can run (without UI though). It’s described here:

# this runs lightweight chain only with cosmos chains as on latest main branch
nix run composable#devnet-xc-cosmos-fresh

# ppica on Centauri -> ppica on Osmosis -> swap to uosmo -> uosmo on Centauri
nix run .#xc-swap-pica-to-osmo

I’m really more the UI type hahahaha

Will you upload the contracts without having a tested UI? Because that is how it sounds with this proposal. What is the timing we are talking about for bringing it to a user-friendly (non-CLI) level?

1 Like