Solidity developers, now you can build in Cosmos.

Numia Data
4 min readAug 10, 2023

--

Evmos, the Cosmos EVM, recently announced an innovative development in the realm of EVM Solidity smart contracts. The most significant aspect of these extensions is their ability to interact efficiently with Cosmos SDK modules. Evmos dApps can now interact seamlessly across different Inter-Blockchain Communication (IBC) chains within the Cosmos ecosystem, directly from a Solidity EVM contract.

New opportunities for EVM developers

In the past, smart contracts in the EVM (Ethereum Virtual Machine) environment could interact with each other, but they couldn’t natively reach beyond the EVM. EVM Extensions allow smart contracts to tap into core Cosmos functionalities like staking, voting, and crucial Inter-Blockchain Communication (IBC) in Cosmos. This is the first time an ecosystem opens up the IBC door to solidity developers in such a straightforward way.

In short, from a Solidity contract, you can now:

  • Allow a user to stake directly to a Cosmos validator from a smart contract
  • Include voting and governance capabilities
  • Interact with other Cosmos chains and take full advantage of their unique app-chain use cases directly from a smart contract — YES! No need to go to another chain, bridge, chain wallets, or figure out IBC channels.
  • Create custom packets and decide what kind of data to send and what interactions to trigger on other chains.

How does it work

Simply put, Evmos has developed a way to allow smart contracts on their EVM to interact with the Cosmos Stack of any other Cosmos chain. This means that Ethereum and EVM developers can now take advantage of the interoperability and composability of the Cosmos ecosystem, without having to compromise on changing their development stack.

As a start, Evmos has introduced the idea of an “Outpost”. Outposts act like smart contracts on Evmos, serving as intermediaries for other chains. They allow users and smart contracts to interact with services on different chains, with the help of IBC middleware.

For example, an Osmosis outpost (Osmosis is the main decentralized DEX in Cosmos ) in Evmos can be an EVM smart contract that allows a user to trigger a swap using solely liquidity in Osmosis without having to do any IBC transactions themselves or figuring out how to interact with other chains using different wallets.

Examples

1. Buy/Sell Evmos with minimal slippage in Osmosis with one transaction

  1. User signs transaction with MM to interact with the outpost smart contract
  2. Smart Contract communicates with EVM extension
  3. EVM extension initiates IBC transaction and sends tokens to Osmosis
  4. Osmosis routes the trade to the concentrated liquidity pool of EVMOS-OSMO to have minimal slippage.
  5. Osmosis sends the OSMO tokens back to Evmos.
  6. The newly swapped tokens directly to the address a user specifies in the `memo` field. It could be their own address or another smart contract.
  7. Now the user has $OSMO tokens in the EVM which he can use for DeFi in Evmos or subsequently stake, or use for Osmosis governance via another EVM extension.

2. Buy ATOM and liquid stake to stride in one transaction

  1. The user signs the transaction with MM to interact with the smart contract.
  2. Smart Contract forwards with EVM extension all necessary information to complete the transaction flow.
  3. EVM extension initiates IBC transaction and sends both, tokens and subsequent instructions to Osmosis. Osmosis swap $EVMOS for $ATOM.
  4. The instructions coming from $EVMOS are then forwarded to Stride after the swap in an IBC transaction to liquid-stake the $ATOM that was just bought.
  5. $ATOM is liquid staked and available at the specified address by the user.

3. Buy a Bad Kid NFT in Stargaze

  1. User signs transaction with MM specifying they want to buy $STARS for $EVMOS using the Osmosis outpost including instructions to send those $STARS to Stargaze.
  2. Smart contract interacts with EVM extension
  3. EVM extension sends $EVMOS to Osmosis to be swapped for $STARS
  4. $STARS are forwarded automatically to Stargaze after the swap
  5. In this case, the user (for now) will need to initiate another transaction with a smart contract that is able to forward instructions via ICA to Stargaze on what BadKid to buy
  6. The smart contract again interacts with the EVM extension
  7. EVM extension sends the instruction to Stargaze via ICA to purchase a specific BadKid using the same address that received the $STARS from the swap

The Cosmos ecosystem pioneered interoperability and proof-of-stake stacks that were previously out of reach for the Ethereum developers. Now EVM extensions bridge both ecosystems a step closer and allow Solidity developers to start building applications in their familiar EVM stack which leverage the strength of the Cosmos ecosystem.

Numia

Numia is an on-chain Data Indexer and RPC provider that gives you the infrastructure to build apps fast and easily. We’ve partnered with Evmos to provide reliable infrastructure and APIs to developers looking to build apps in Evmos. Get started for free now 👉 https://app.numia.xyz

--

--