-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: CVM for Solana #4451
Comments
During implementation:
All of above was done to CW CVM. |
First, finalize alignment on: In order to start building CVM on Solana need to: Make basic CW interface compile to Solana by doing CW-core crate as per CosmWasm/cosmwasm#1956 After these are done: After these done: Release to mainnet: None of an on chain code (in solana programs) of above code will verify accounts provided by relayer and will assume these are correct. Adding new facets or upgrading existing ones(like making CVM global lookup table part of ICS27 call or separate contract) will not need to change the IBC core nor relayer. And start designing and building CVM from here. |
need dynamic accounts before LUT |
stale-issue |
up |
This document outlines the background and requirements for the implementation of CVM on Solana. Very high level. To split into many more smaller parts.
It includes only links and terms that are difficult to search on the internet. For clarification and links, ask ChatGPT or search via GitHub/Sourcegraph (primarily in the ComposableFi/cosmos repositories).
CVM is an AST (Abstract Syntax Tree) that describes a recursive route to transfer assets locally or via IBC (Inter-Blockchain Communication) and exchange (swap).
This AST is then interpreted by an executor, which is currently a CW (CosmWasm) contract on Neutron/Osmosis/ComposableCosmosCentauri Cosmos Go IBC chains.
Recently, ComposableFi implemented Cosmos IBC in Rust for Solana.
IBC can transfer assets to/from Solana.
The next step is to implement the ComposableFi/emulated-light-client#229, which will be an SVM hook. This allows for the transfer of assets and the calling of a contract simultaneously. Solana is a very constrained environment, so it will likely need to be implemented as part of a single Solana IBC contract to avoid hitting call depth/compute limits.
After the ComposableFi/emulated-light-client#229 is completed, it will allow for calling a contract with assets transferred by IBC. This works in both directions, from Solana to Cosmos and back. From a user's perspective, it is as easy as adding a string to a transaction memo. However, these memos differ between Cosmos and Solana and change from chain to chain.
What if we want to write once and send that to any chain, and it will format the data as needed, including a shared representation of assets and accounts and multi-hops? That is what CVM aims to achieve.
Currently, the CVM interpreter is implemented for Cosmos CW. It is to be ported to Solana with a high degree of sharing. The CW side is extended with knowledge about the counterparty chain it sends to (that may require making part of Solana program SDK to compile to CW, like account derivations).
Target is easy to reproduce locally the scenario of sending an asset from the ComposableCosmosCentauri chain to Solana, swapping there, and moving funds back to be executed. All reasonable parts of the current CVM CW implementation are to be implemented on Solana too, to support routes found by the MANTIS Solver Blackbox.
The text was updated successfully, but these errors were encountered: