[MRC-87] Support CosmWasmPool (transmuter) in Swapper on Osmosis

Summary

The objective of this proposal is to enhance the Swapper contract on Osmosis to support CosmWasmPool (transmuter). This upgrade will enable the Swapper contract to correctly deserialize the CosmWasmPool type of pool, extract pool ID, and assets inside the pool. This enhancement will improve the functionality of the Swapper contract by allowing it to interact seamlessly with CosmWasmPool, thereby optimizing asset swapping and utilization of liquidity.

Motivation

The Swapper contract plays a crucial role in configuring routes for swapping assets and executing asset swaps on Osmosis. Currently, the contract relies on predefined routes provided by governance, which may not always reflect the most efficient swapping routes due to dynamic changes in liquidity pools.

With the introduction of CosmWasmPool (transmuter), there is a need to upgrade the Swapper contract to support this new type of pool. By enabling the Swapper contract to correctly handle CosmWasmPool, we ensure compatibility with evolving protocols and improve the overall efficiency of asset swapping on Osmosis.

Risks

Implementing this upgrade involves modifying the smart contract code, which inherently carries the risk of introducing new bugs or unforeseen issues. However, the proposed changes are minor and have been carefully reviewed to minimize potential risks.

Implementation

This upgrade will entail updating the logic within the Swapper contract to support CosmWasmPool. Specifically, it will involve modifying the contract’s deserialization process to correctly handle the CosmWasmPool type, extract relevant information such as pool ID and assets, and integrate it into the asset swapping functionality.

The changes required for this upgrade can be found in the PR.

Copyright

Copyright and related rights waived via CC0.

Disclaimers/Disclosures

This proposal is being made by Mars Protocol Foundation, a Cayman Islands foundation company. Mars Protocol Foundation engages in research and development of the Mars Protocol. Mars Protocol Foundation and certain of its service providers and managers own MARS tokens and have financial interests related to this proposal. The aforementioned persons or their affiliates may also have financial interests in complementary or competing projects or ecosystems, entities or tokens, including Neutron/NTRN. These statements are intended to disclose relevant facts and to help identify potential conflicts of interest, and should not be misconstrued as a complete description of all relevant interests or conflicts of interests; nor should they be construed as a recommendation to purchase or acquire any token or security.

This proposal is also subject to and qualified by the Mars Disclaimers/Disclosures. Mars Protocol Foundation may lack access to all relevant facts or may have failed to give appropriate weighting to available facts. Mars Protocol Foundation is not making any representation, warranty or guarantee regarding the accuracy or completeness of the statements herein, and Mars Protocol Foundation shall have no liability in the event of losses or damages ensuing from approval or rejection or other handling of the proposal. Each user and voter should undertake their own research and make their own independent interpretation and analysis of all relevant facts and issues to arrive at their own personal determinations of how to vote on the proposal.

2 Likes