Telegram (AI) YouTube Facebook X
Ру
Move to the fast lane: how to port an application from an EVM chain to Velas

Move to the fast lane: how to port an application from an EVM chain to Velas

Ethereum and EVM de facto became the standard for building decentralized applications. Developers dapps use the Ethereum Virtual Machine so as not to reinvent the wheel. But EVM chains often inherit Ethereum’s consensus algorithm, as well as its low throughput and high transaction costs.

The creators of Velas have addressed the problem of speed and transaction costs: this blockchain runs on Solana technology and is compatible with the EVM. By changing only a single line of code, developers can port their project to Velas. We explain how to do it.

Why migrate a project to Velas

One of the problems with Ethereum and most EVM chains is low throughput and high transaction fees, which constrain users with small deposits. According to BitinfoCharts, the average transaction fee in the network of the second cryptocurrency stands at $11.

Developers migrate to cheaper blockchains. For example, the company Tether issued the stablecoin USDT on Tron and other blockchains, to broaden its audience and make it more accessible to users.

How Velas runs two virtual machines simultaneously

The Velas blockchain uses hybrid consensus algorithm — Proof-of-History/Proof-of-Stake. It runs on Solana technology, which gives the network a throughput of over 50,000 transactions per second (Transactions Per Second, TPS). At this level of TPS, transaction fees are around $0.0001.

Nodes in the network wrap EVM transactions in native eBPF format and append an instruction to invoke the transpiler program. They then compile transactions into virtual blocks, which in turn form a separate EVM blockchain.

Velas nodes also support standard methods Ethereum JSON-RPC API such as eth_getBalance or eth_getBlockByNumber. These methods query the EVM blockchain.

For executing transactions, users pay fees in native VLX tokens. Such transactions achieve finality after three confirmations in the native blockchain — on average in 1.2 seconds.

\"Move
Token transfers into Velas EVM. The transaction was confirmed in 1.286 seconds, with a fee of $0.000151.

In the end, Velas-hosted applications run much faster and cheaper than on other EVM blockchains.

Moreover, migration to Velas can allow developers to skip re-auditing smart contracts, since their code does not change.

How to port a dapp or a smart contract to Velas

To deploy a Solidity smart contract on Velas, you only need to replace the RPC provider URL with evmexplorer.velas.com/rpc.

For example, when using the Web3 library:

const web3 = new Web3(\nnew Web3.providers.HttpProvider(‘https://blockchain-rpc’));

to:

const web3 = new Web3(\nnew Web3.providers.HttpProvider(’https://evmexplorer.velas.com/rpc’));

If you use Hardhat or Truffle for deployment, replace in config.js:

url: \"https://blockchain-rpc\",
chainId: \"*\",

with:

url: \"https://evmexplorer.velas.com/rpc\",
chainId: 106,

To test contract functionality on Velas, insert RPC testnet.

For deploying contracts, you will need to pay transaction fees in VLX tokens. They are traded on Uniswap and centralized exchanges: Bittrex, KuCoin, Gate.io and others. The full list of VLX spot pairs is shown on CoinMarketCap.

The Velas network can be added to the MetaMask wallet. To do this, go to network settings, click Add a network and fill in the fields:

  • Network name — Velas;
  • RPC URL — https://evmexplorer.velas.com/rpc;
  • Chain ID — 106;
  • Symbol — VLX;
  • Block explorer — https://evmexplorer.velas.com.
\"Move

Conclusions

Developers at Velas have found a way to accelerate EVM applications — wrapping and executing them in Solana’s format. This approach enables finality within 1.2 seconds with fees of one-hundredth of a cent.

Velas’ EVM compatibility makes it easier to port applications. A developer only needs to replace the RPC provider URL in the deployment script. There is no longer a costly need to adapt code to the instructions of another virtual machine, re-testing, and auditing.

Follow ForkLog’s bitcoin news in our Telegram — crypto news, rates and analytics.

Подписывайтесь на ForkLog в социальных сетях

Telegram (основной канал) Facebook X
Нашли ошибку в тексте? Выделите ее и нажмите CTRL+ENTER

Рассылки ForkLog: держите руку на пульсе биткоин-индустрии!

We use cookies to improve the quality of our service.

By using this website, you agree to the Privacy policy.

OK