Harnessing The Power of EVM And XCM With SubWallet

DJ Hà Trang
SubWallet App
Published in
6 min readJul 20, 2022

Long time no see.

After my first article on XCM, I haven’t quite got time to write the next one due to my occupation with writing SubWallet’s in-depth research report on Dotsama ecosystem in the first half of 2022. Our designer is wrapping up the final draft; hopefully I can share it with everyone soon.

During the research, I did some reading on EVM and so thought that I would share something on this topic. This time last month, SubWallet announced full-stack support for all EVM parachains in Dotsama, enabling all key features from ERC-20 and xc-20 token management, NFT handling, MetaMask compatibility to XCM transfer, and EVM DApp connection. A crucial step I must say, in harnessing the power of both EVM and XCM, and in actualizing our vision of becoming the Web3 Multiverse Gateway for Polkadot and Kusama that allows smooth-as-silk user experience across platforms.

How do we do that? Let's jump in.

The Power of EVM

It is no news that EVM has been and is still the most popular standard in the Web3 world. According to ChainList, 279 networks are powered by EVM as of July 19, among which 12 are running on Dotsama’s Substrate framework. These include Moonbeam, Moonriver, Moonbase Alpha (testnet), Astar, Shiden, Darwinia, Crab, Acala, Karura, Clover, Sakura, and Edgeware.

The DApp interface of Moonbeam, an EVM-compatible chain on Polkadot

If Bitcoin is a distributed ledger that records all BTC transactions and broadcasts them to every node in the decentralized network, then EVM is a distributed state machine recording and broadcasting not only financial transactions but all changes in the state of the network. Examples of these changes can include an NFT transfer (a change in the NFT ownership from not-yet-owned to owned), the creation of a token (a change from not-yet-minted to minted), or an on-chain proposal submission (a change from not-yet-submitted to submitted).

On a deeper layer, EVM is essentially a virtual machine, a program that runs on computers with different operating systems and acts like a computer itself, meaning that it can execute bytecode compiled from smart contract codes written in Solidity. Smart contract enabling opened a whole new world of DApps from DeFi and NFT marketplace to GameFi and SocialFi on the blockchain, thus extending application possibilities for Web3 and bringing it closer to end users.

Image courtesy of Moralis

EVM and its corresponding language Solidity quickly became the standard, so much so that other layer-1 chains such as Binance Smart Chain and Avalanche are powered by EVM and even chains built upon other frameworks such as Substrate are seeking to be EVM compatible. The benefits are two-fold: onboarding users already familiar with Ethereum and attracting builders already well-versed in Solidity.

Of course, being the first generation virtual machine deployed on blockchains, EVM has its own limitations, which is why Ethereum 2.0 is moving away from EVM towards eWASM. (This topic deserves a whole explanation and comparison article on its own, which hopefully I will get round to writing soon.) But the revolutionary impact EVM has made and is still retaining is unquestionable.

The Potential of XCM

As per my deep dive into XCM, it is a cross-consensus messaging format that enables communication between multiple types of consensus systems, all the way from relay chains down to smart contracts. This so-called language that connects them all is general, well-versioned, and efficient enough to be processable and executable by distinctively constructed systems. More importantly, in the Dotsama ecosystem, XCM and its built-in transporting protocols XCMP and VMP allow parachains to connect with each other in a secure and effective manner. Up till this point, 21 chains on Kusama and 6 chains on Polkadot have opened XCM channels.

XCM channels opened between parachains on Kusama

XCM use-cases extend far beyond token transfers. Being able to communicate means that parachains can collaborate and delegate specific tasks to specialized parties. For example, a network focused on identity like KILT Protocol can take charge of verifying actors participating in a crowdfunding activity organized by Imbue Network, thus boosting efficiency and transparency. A Moonbeast NFT on MoonFit, a fitness DApp deployed on Moonbeam Network, can have utility on other contracts written on other chains. Again, the possibilities are endless.

Interlay announcing its XCM channel with Acala

The Empowerment by SubWallet

Right now, SubWallet has extended support for EVM DApp connection to complete our EVM stack. This means that you no longer need to switch to an EVM wallet (say MetaMask) whenever you use EVM DApps on Dotsama.

SubWallet offers full EVM support for five parachains

Take Moonbeam for example. Previously, you had to use either MetaMask or WalletConnect to log into the DApp, then switch to a Substrate wallet like polkadot.{js} or SubWallet when depositing assets into or withdrawing from Moonbeam. Such inconvenience! Now the table has turned: create a Substrate account and an EVM account on SubWallet and you can log in, deposit, withdraw, delegate and sign all transactions on one extension wallet only. Such convenience! (The exclamation marks might be a bit too hyped but I sincerely mean it.)

The in-app XCM transfer feature was enabled even before that on June 9 in v0.4.5, with initial support for Moonbeam, Moonriver, Acala, Karura, and Kintsugi. You can transfer KAR to xcKAR and KINT to xcKINT on Moonriver, as well as ACA to xcACA on Moonbeam right on our extension wallet without having to go through multiple steps on the DApp platform.

XCM transfer tutorial on SubWallet extension

Soon, SubWallet will power XCM transfer on all opened channels on Polkadot and Kusama along with the launching of the mobile version, so that you can enjoy a seamless transferring experience without ever having to leave our app.

The gist of the story is that no advanced innovative top-notch technology will hold any value whatsoever if users can't use it. Both EVM and XCM need to be deployed on DApps, and DApps need an all-in-one wallet to onboard and retain users. In other words, SubWallet practically opens a gateway for end-users to enter a flavorful world of Dotsama DApps powered by EVM and XCM.

The Next Step

This might not be on SubWallet, but is surely on Dotsama builders. The only thing missing from the equation is neither UX nor UI but that “flavorful world.” One can’t help but admit that compared to other large ecosystems with a strong user base, Dotsama is lacking in innovative, engaging, and user-centric DApps. Take a look around and you will mostly find DeFi DApps that more or less share the same model, and there is only a handful of them or so. Revolutionary DApps is the key to reaching the tipping point.

MoonFit, a GameFi project prepared to launch on Moonbeam Network, aims to revolutionize Move-2-Earn with the concept of Burn-2-Earn, meaning that users receive rewards based on the number of calories they burn during physical training activities such as running, cycling, and swimming.

--

--

DJ Hà Trang
SubWallet App

DOT Jockey. Spreading the word about SubWallet one day at a time.