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:
- 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.
- 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:
- The release for the initial contracts is available at -
nix build github:ComposableFi/composable/d4d01f19d8fbe4eafa81f9f2dfd0fd4899998ce6#xc-cw-contracts
- The git commit Id - d4d01f19d8fbe4eafa81f9f2dfd0fd4899998ce6
- The code can be found at - https://github.com/ComposableFi/composable/tree/d4d01f19d8fbe4eafa81f9f2dfd0fd4899998ce6/code/xcvm/cosmwasm/contracts/
- Compiler Version - https://github.com/ComposableFi/composable/blob/d4d01f19d8fbe4eafa81f9f2dfd0fd4899998ce6/flake.lock
- Checksum -