BuiltOnEOSIO - EOSIO Challenge Winner

Block.one sponsored the EOSIO Challenge to explore interoperability based scaling solutions for blockchain application developers across the ecosystem.

We understand that building developer solutions is a borderless concept. In that spirit, we asked the community to submit an EOSIO smart contract capable of running solidity based Ethereum smart contracts in an environment that duplicates the functionality of the Ethereum Virtual Machine (EVM). In addition, the smart contract must also continue to leverage the wider benefits of EOSIO, such as increased transaction throughput and faster smart contract processing.

While a number of submissions came close to meeting the challenge criteria, one entrant, Syed Jafri, surpassed our specifications with his smart contract, EOSIO.EVM.

With EOSIO.EVM, Syed says solidity developers can rapidly launch on EOSIO and run their applications up to “100 times faster and 1,000 times cheaper, depending on which EOSIO network they deploy to.”

Going Beyond the Contest Criteria

With years of development experience, Syed is a longtime developer in the EOSIO ecosystem. He is a recent graduate from the University of Calgary, the CEO of EOS Cafe Block, and the engineer behind the popular EOSIO block explorer, Bloks.io.

Tackling the challenge required an enormous mental effort. Initially, Syed spent an entire week contemplating the scope of building an entire world state. He made his first major breakthrough when he was able to read and verify signatures in serialized transactions by deserializing them. 

“That was really the moment I was like, wow I can definitely do this. I just need to push a little harder.”

Living up to his words, Syed soon found himself working up to 18 hours a day on his solution without taking weekends off.

Once he met the basic requirements of the challenge he continued to push on. He found himself focused on functionality, pondering how developers would interact with EOSIO.EVM. “I wanted it to be as usable as possible when I was creating it. I think that’s what led me to going above and beyond the challenge.”

Taking into account developer needs, Syed devised a means to launch solidity based projects with EOSIO.EVM while bypassing the step of setting up a node. His solution? A mock remote procedure call (RPC) with a javascript library similar to the web3 library that solidity developers are familiar with. 

Syed elaborates, “It’s just a simple server that you run. It takes in Ethereum transactions, signs transactions, and then submits them to the EOSIO nodes. You don’t even need to run the nodes yourself because every EOSIO network has these public endpoints.”

Syed says EOSIO.EVM shows what is possible with EOSIO. “Essentially anything that you can do with normal code, such as running a virtual machine, you can do inside EOSIO. You can run another virtual machine inside the EOS Virtual Machine, and do it quite fast.”

Retool in Weeks Instead of Years with EOSIO.EVM

If you want to deploy your solidity code to EOSIO with EOSIO.EVM you will use the mock RPC Syed built as an end point. Syed says tools like Remix allow you to compile and deploy your solidity code to an address that is supplied to the mock RPC.

“It’s essentially no different than deploying to an Ethereum testnet, or deploying to an Ethereum main net.”

Next, based on the EOSIO network you deploy on, you’ll need to create an account and buy resources in order to cover your application’s CPU, NET, and RAM costs with a sufficient stake. This account is supplied to the mock RPC, and covers the resources for all the transactions that go through the application.

Syed explains, “You would just supply the private key of that account in your mock RPC and use that for your own service.”

After that, the deployment and submitting of transactions is similar to that of an Ethereum environment. Users can add the network to MetaMask to interact, sign, and submit transactions. Outside of this, from a user perspective everything would stay the same when interacting with the application.

What you’re left with is a one to one copy of an EVM wrapped in EOS VM.

Syed emphasizes, “It runs all of your solidity code without any modifications. There’s nothing new that you have to run. You can use all the software that you’re used to. Any other Ethereum software that runs off of an RPC node works.”

Lower Your Costs and Increase Performance with Interoperability 

For developers, EOSIO.EVM represents a new realm of possibilities. 

Syed says “Speedwise you’re seeing orders of magnitude faster speed using, let’s say, an EOSIO chain with your solidity contracts than you are with an Ethereum chain.” 

Beyond speed, Syed goes on to say the cost of those transactions is reduced a thousand fold. High transaction costs have long been a concern for developers and this solution offers hope to projects that need low cost solutions to handle a high number of transactions.

EOSIO.EVM also helps developers follow best practices for security. Every smart contract must be audited to ensure it is bug free and functions properly. This can be difficult if the smart contract is engineered in one language, and then rewritten in another, because audits must be performed on both languages. It’s much easier to maintain security when deploying a single codebase to multiple networks.

Discover the True Power of EOSIO Smart Contracts

After dedicating weeks of his time, sacrificing his weekends, and immersing himself in EOSIO.EVM, Syed says the best part for him was the learning experience. 

Along his path to success Syed says the continuous feedback from Block.one engineers, facilitated by DevPost, was helpful. “They were very responsive with all the questions. And I think that was definitely helpful with the way the contest was run itself.”

Syed says the improvements made by Block.one’s team to EOSIO, specifically the release of EOS VM, are a large part of why EOSIO.EVM works so well. 

“I think that it’s a great testament to the great engineering at Block.one, with how optimized they’ve made the EOS VM.”

Now that he’s seen the challenge through, Syed is confident about what he can accomplish with EOSIO smart contracts. 

“I think at this point I don’t see any EOSIO contract as a challenge necessarily. It’s all feasible in a sense.”

Do You Want Your EOSIO Project to be Featured?

Our #BuiltOnEOSIO series showcases some of the amazing projects leveraging EOSIO technology to build a more secure and connected world. If you would like to suggest a project for us to feature please send an email to spotlight@block.one for our Developer Relations team to review.

Important Note: All material is provided subject to this important notice and you must familiarize yourself with its terms. The notice contains important information, limitations and restrictions relating to our software, publications, trademarks, third-party resources and forward-looking statements. By accessing any of our material, you accept and agree to the terms of the notice.

#BuiltOnEOSIO EOSIO Challenge EOSIO Community Interoperability Solution