Add CosmWasm to dYdXv4


This proposal advocates for the integration of permissioned CosmWasm support by incorporating the x/wasmd module into dYdX v4. We firmly believe that this addition will catalyze greater adoption and liquidity for dYdX.

What is CosmWasm:

CosmWasm is a modular and extensible smart contract platform; developed as a module atop the Cosmos SDK. Its versatility extends to other ecosystems, including Polkadot, enabling developers to construct decentralized applications (dApps) with paramount security, scalability, and interoperability features.

CosmWasm’s official website:
CosmWasm’s github: GitHub - CosmWasm/cosmwasm: Framework for building smart contracts in Wasm for the Cosmos SDK

Numerous blockchain projects have harnessed CosmWasm to power their innovations, including:

  1. Lido on Neutron - interchain liquid staking services
  2. Levana on Sei & Osmosis - perpetual swaps
  3. Mars on Osmosis & Neutron - lend and borrowing outpost on Osmosis

CosmWasm can be permissionless, where anyone can upload contracts, or permissioned, where smart contract code uploaded to the chain has to be approved by governance. We advocate for dYdX to support permissioned CosmWasm.

Why should dYdX support CosmWasm:

Enabling CosmWasm support stands to provide dYdX with several significant advantages that will attract more users and liquidity providers via diversification of use cases.

  1. Cross-chain collateralization: CosmWasm contracts can facilitate cross-chain collateralization, enabling users to use assets from other CosmWasm-enabled chains across Cosmos and Polkadot. This adds flexibility to collateral options while preserving protocol stability via USDC.
  2. Customizable on chain market-making strategies: With CosmWasm, market makers and liquidity providers can develop and deploy their custom cross-chain strategies and bots, enhancing liquidity across various markets and trading pairs.
  3. Expanded trading pairs: CosmWasm contracts can expand trading pairs by incorporating CW-20 and CW-721 tokens, offering market makers the opportunity to provide liquidity for a wider spectrum of assets. This diversity attracts a more varied user base eager to trade diverse assets against USDC.
  4. Incentive Mechanisms: CosmWasm can be used to implement reward mechanisms that incentivize market makers and liquidity providers to contribute.

Security and Reliability:

CosmWasm’s robustness and reliability are underpinned by extensive testing and auditing. It has demonstrated its capability to support high-volume traffic, as witnessed during the TerraSwap and Mirror Protocol periods. This track record aligns with dYdX’s commitment to safeguarding user assets.


Incorporating permissioned CosmWasm into the dYdX chain is poised to accelerate feature development and empower third-party developers to enrich the platform’s functionality. This strategic move aligns seamlessly with dYdX’s mission to provide a secure, innovative, and efficient ecosystem for perpetual trading and collateralization, delivering benefits to the entire dYdX community and ecosystem.

Next Steps

If this receives support, we will move forward with a governance proposal.


Personally I would like to support this proposal for widely expanding dydx ecosystem in the future. The only concern is technical stuff that I dont have answer, need team input on it: as I understand currently dydx validator implementation is quite specific in term of logic that bind to dydx orderbook (please correct if I’m wrong here), so is it feasible to support validating arbitrary tx from dapps? If yes that would be great, dydx gonna become true L1 with its own ecosystem.

1 Like

Supporting this, and would be awesome to have on DyDx! This would open the possibility for many protocols to launch their products on DyDx and providing value to the ecosystem.

Ideally with the integration of CosmWasm, the TokenFactory is also added, so that projects mostly build around that!

1 Like

We are genuinely interested in having this moved forward.
So far, we’ve already deployed out flagship interoperability product ([Specification | Composable Finance](https://CVM Docs)) on Osmosis, would love to expand the offering by having DyDx’s perps.

Nevertheless, this proposal opens up a much larger opportunity for all sort of integrations that are both unrelated or complementary to our own protocol.

Any feedback would be appreciated.

1 Like