Upload Transmuter Contract V1

Resubmission Text:
This proposal would whitelist the Transmuter contract ID 148 as a valid Code ID for CosmWasm pools in the pool manager, as well as enable the governance proposal type upload-code-id-and-whitelist by adding the cosmwasm pool module address to those allowed to upload code to chain: osmo1rxjakgd8yhks2j7hc7pt6a22z3zd64grexpyf7


Transmuter is a CosmWasm contract that allows 1:1 conversion of one asset to another.

Transmuter would be the first CosmWasm Pool to be uploaded to Osmosis, a pool type fully integrated with Osmosis’ existing pools but created via the instantiation of a CosmWasm contract, allowing deployment of new pool types without software upgrades.

Details

Once instantiated with two assets, the contract functions as a pool with a fixed 1:1 ratio of token value, no matter the ratio of the assets in the pool.

Classic curve (Red), Stableswap (Blue) and Transmuter (Green)

For traders, this enables the Transmute function which allows the exchange of 1 unit of value of a token they possess that is in the pool with 1 unit of value of any other token that is present in the pool without any slippage.

For liquidity providers, one token can be added to the pool in exchange for a representative token of that value held within the pool. Owners of the representative tokens can choose which asset to withdraw from the pool.

As there is zero slippage or fee, liquidity providers must either be altruistic or obtain an alternative benefit for adding tokens to the pool.

Potential Uses

V1 of the Transmuter may be used to convert freely between identical tokens of different origins, such as axlUSDC and native USDC, to aid migration. As there is no benefit for liquidity providers to maintain a usable ratio of tokens, this would likely only be in use over a token’s transition period rather than a stableswap pool with a small swap fee.

Contract information

Release: V1.0.0

Compiler Version: cosmwasm/workspace-optimizer:0.14.0

Checksum: 6a1407229263b3321aedc359758018f26e18faff6a2feecc11a9acb118ccdd3d

Code repository: GitHub - osmosis-labs/transmuter: A CosmWasm contract to enable 1-direction 1:1 conversion of one asset to another.

Commit ID: 1d7e32d3f3e83db5ecb3b3f7b8b8961a6787d515

On Chain date: 28th August 2023

3 Likes

Thanks for also adding the potential use-cases!

I was indeed wondering for other use-cases except stable-stable swaps. But is that not also already covered with our concentrated liquidity and former stableswap pools? Is this more like an alternative to these?

I love the idea of having the ability to transmate from stAsset to qAsset and all other forms of LSTs for example. That sounds like a much needed option to make arbitrage more efficient to keep the prices of the various assets correct.

1 Like

That would rely on them being 1:1 and the peg of these LSTs will likely shift around more due to commission rates and the time they started accumulating.

It was originally planned to facilitate free swaps for migrations with zero slippage for axlUSDC → USDC for example. I doubt anyone would want to maintain this for something like USDC <> USDT as they would get no profit for doing so.

1 Like

Yeah, you are right on the LST assets peg switching due to different fees, different starting points when they started providing a chain and more variables.

I saw the Transmuter contracts being mentioned in the thread regarding a 2nd canonical bridge provider (Add Wormhole as a Canonical Bridge Service Provider - #2 by LeonoorsCryptoman). It might seriously have benefits there, since it might concern indeed the same asset but from different providers. We might kill a lot of discussions if the back-end can cope with the various origins while having one asset denom on the front-end.

2 Likes

This has been updated with the Contract info and is starting the 7 day forum requirement!

This is V1 of Transmuter which does 1:1 swaps, allowing for easy migration when new canonical assets are determined.

V2 is still to follow which is the one that will contain rate limiting and be used for the Alloyed Assets proposals.

3 Likes

What does the user flow look like when bridging to osmosis and using the Transmuter module to convert an asset into another representative of the same token?

At launch this will just be another pool type that is interacted with.
I.e. You Deposit axlUSDT and want to swap for OSMO.
Your axlUSDT is on chain as axlUSDT and your trade routes through the axlUSDT/USDT transmuter pool for then onwards to the USDT/OSMO pool.

It will get integrated into more complex migration routes down the line. E.G. you have an axlUSDT/OSMO position and can convert to a USDT/OSMO position with one transaction.

1 Like

Stupid question, but user experience matters, right?
Especially if we want to compete with CEX.

Why are we then making it so hard for the end users with prefixxes? If I read it correctly, that is completely irrelevant with the Transmuter contract. Just let a user deposit whatever version of USDT she/he wants and let is show as USDT on the front-end (auto-swapped during the deposit or something alike).
Then during the withdrawal give the option to choose to which chain/bridge to withdraw and you are close to a CEX-experience without bothering the user with prefixes. We need to think big and really remove all difficult to explain aspects from crypto if we want to achieve mass-adoption.

That is what the experience would eventually look like, they would just withdraw the relevant asset from the Transmuter pool.
But at launch, it will likely still require manual swapping. The CW contract code is different to the frontend/forwarding code to make that happen.
In the interface before the transmuter they can’t easily use the other assets even if they wanted since they have to pass through small liquidity pools with high slippage.

1 Like

Do you roughly know when the UX will be completely done?

Because the first version will then more be like a normal swap, so not the best trading experience and might not be used much. Where the full experience will also open up the option to start the “Battle of the Bridges” if also things like expected bridging costs, duration and such are included when people have to choose their withdrawal route.

This needs to be resubmitted as the code ID needs whitelisting for pool creation, as well as the cosmwasmpool module address adding to the addresses with upload permissions so that this can be done by a single proposal in future.

3 Likes

Probably already enough to whitelist the address and the rest can be done “automatically” on the backend?

Just heard about Transmuter, quite excited to see how it will be implemented on Osmosis. Can’t wait.