Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EVM Rollup on TON Feasibility Study #227

Open
smartprogrammer93 opened this issue Apr 29, 2023 · 21 comments
Open

EVM Rollup on TON Feasibility Study #227

smartprogrammer93 opened this issue Apr 29, 2023 · 21 comments
Assignees
Labels
Approved This proposal is approved by the committee Developer Tool Related to tools or utilities used by developers

Comments

@smartprogrammer93
Copy link

smartprogrammer93 commented Apr 29, 2023

Summary

This proposal aims to conduct a feasibility study exploring the potential of building an Ethereum Virtual Machine (EVM) Rollup on the The Open Network (TON). The study will investigate the TON infrastructure, smart contracts, and the necessary steps for implementing an EVM Rollup.

Context

The integration of an EVM Rollup on TON would bridge the gap between Ethereum and TON, allowing developers to deploy and run Ethereum-compatible smart contracts on the TON blockchain. This would enable TON to leverage the thriving Ethereum ecosystem, attract more developers, and encourage new decentralized applications (dApps) to be built on its platform. A feasibility study is essential to outline a clear roadmap for the EVM Rollup's development and ensure that the project is well-planned, properly prioritized, and resource-efficient.

Goals

  1. Gain an in-depth understanding of the TON infrastructure and smart contracts
  2. Explore existing Rollup solutions and their applicability to TON
  3. Develop a comprehensive plan for the EVM Rollup implementation, including tech stack selection, timeline, and resource estimation

Deliverables

  1. A P2 proposal outlining high-level plans for the EVM Rollup implementation, including a whitepaper, architecture, budget, and timetable
  2. Identification of components to be developed, such as the EVM Rollup client and smart contract execution environment
  3. A list of challenges to overcome, such as the ZKVerifier on TON (if a ZK architecture is chosen), on-chain EVM simulator on TON (if an optimistic architecture is chosen), addressing account address differences between Ethereum and TON, and bridging TON tokens into the rollup.

Definition of Done

The feasibility study is considered complete and successful when the P2 proposal is delivered, addressing all the aforementioned goals and deliverables, and providing a well-researched basis for deciding whether to proceed with the EVM Rollup implementation on TON.
We will provide a progress report every 2 week, in addition to the final deliverable above by the end of the period.

Reward

  • Standard TON Footstep NFT
  • 11,000 USD

Oriental Release Date

6 weeks from the start of the project.

@smartprogrammer93 smartprogrammer93 added the footstep This is a TON Footstep issue label Apr 29, 2023
@Gusarich
Copy link
Contributor

Workchains are made for this purpose.

@smartprogrammer93
Copy link
Author

@Gusarich
Core development usually takes a long time, and until we reach having a workchain that is Fully EVM equivalent on TON. I would rather have the rollup for now where people can start to be on-boarded into the ecosystem. It would actually be a great test to show the core devs if people actually like the idea of an EVM workchain or not.

@Gusarich
Copy link
Contributor

Gusarich commented May 5, 2023

@smartprogrammer93 @Naltox @Hiyorimi I don't quite understand what you expect to learn from this research.
EVM chains have a completely different architecture compared to TVM chains (TON). If your goal is to allow people to deploy EVM smart contracts on TON, you won't come up with any good solution.

There is only one "possible" way to allow people to deploy EVM contracts to TON:
Create a highly complex compiler that will deeply analyze the Solidity code and generate a system of smart contracts in TON that will communicate in the way the developer initially intended. It must translate the high-level communications between EVM smart contracts into low-level message-based communications between TVM smart contracts, while counting fees, handling possible errors, and managing bounced messages.
Isn't that too much complexity just to allow some EVM devs to deploy their toy "hello world" smart contract on TON?

There are also a few problems:

  • These "translated" smart contracts won't be able to communicate with smart contracts that were originally developed to work with TON. Even if we add some way of raw interaction with other contracts (that were not generated with the compiler I mentioned earlier), EVM developers will still need to learn the architecture of TON and how smart contracts work here in order to correctly communicate with them.
  • Such a compiler will require a significant amount of time to be developed, and its complexity will likely lead to many bugs and vulnerabilities.
  • People coming from EVM or anywhere else will still need to learn the basics of TON to develop anything functional on it. Such a "rollup" will only help very beginners deploy some super simple example contracts. Anything more serious than "hello world" will require some knowledge about TON from the developer.

I can partially understand the reason "to simplify the entry into TON for EVM developers", but don't you think that conducting month-long research and then developing an incredibly complex solution is too much?
I believe it would be much more effective to invest this time and effort in improving documentation and tools for beginners, rather than trying to simplify the deployment of a "hello world" EVM smart contract on TON.

@smartprogrammer93
Copy link
Author

smartprogrammer93 commented May 6, 2023

@Gusarich
The goal is not to allow people to deploy solidity smart contract to TON. The goal is to run a rollup chain that will use TON as the Settlement layer for transactions. There is no need for a special compiler. The normal Ethereum compilers will just work. Also, I would not belittle Ethereum smart contract devs to just want to run their 'Hello World'. EVM Chains have the highest level of Total Value Locked.

So, since EVM devs will just easily deploy their contracts to the rollup without any modifications. there will be no need for them to Learn the basics of TON or the Architecture of TON. Additionally we will not need to build a special compiler.

Taking this further, this is only the start. If we can introduce Zero Knowledge tech to TON, there is a lot of other possibilities that could be developed on TON using the same Tech.

@Gusarich
Copy link
Contributor

Gusarich commented May 6, 2023

@smartprogrammer93

The goal is to run a rollup chain that will use TON as the Settlement layer for transactions.

I can't understand what do you want to achieve. You probably didn't describe the idea in enough detail in the footstep. How are you going to execute EVM contracts on TVM?

Also, I would not belittle Ethereum smart contract devs to just want to run their 'Hello World'.

I'm not belittling EVM devs. I mentioned hello-world contracts because they can REALLY be adapted to any blockchain essentially unchanged.

So, since EVM devs will just easily deploy their contracts to the rollup without any modifications.

What's the point in deploying Ethereum smart contracts on TON?

Probably I could have misunderstood the idea of this research. I ask you to explain it 😄

@smartprogrammer93
Copy link
Author

smartprogrammer93 commented May 6, 2023

@Gusarich no worries. I am glad someone is curious about this. you can checkout more information about Rollups on this Article here: https://www.quicknode.com/guides/web3-fundamentals-security/cryptography/introduction-to-ethereum-rollups/

I believe there is a lot of value to bring the ability for Solidity devs who already deployed their apps on Ethereum to deploy them on TON rollup where this dapps have already been battle tested and used across multiple EVM chains. This allows these devs to tap into the TON economy without having to rebuild their dapps with FunC. Also, it would hopefully introduce them to TON.

An Additional benefit to TON EVM rollup would be that possibly we can Bridge Tokens from both TON and Ethereum and have AMM with pools for all of these tokens which could bring more liquidity into them. Also, users can now hold TON tokens with their metamask or even Ledger wallet easily.

@Gusarich
Copy link
Contributor

Gusarich commented May 6, 2023

@smartprogrammer93 well, thank you for the link. But the thing is that I've already read several similar articles and as I understood, rollups were made for scaling Ethereum.

How are you going to use it to allow EVM contracts to be executed on TON?

@smartprogrammer93
Copy link
Author

@Gusarich, a rollup does not execute the transaction on the main chain. It only saves it and verifies it there.

@delovoyhomie delovoyhomie added the Approved This proposal is approved by the committee label May 8, 2023
@alfredonodo
Copy link

Hello,
there is a similar TON Footsteps which aims to make a workchain with the support of zk-snark rollups for private transactions (like Zcash).
TON does not need such technology for scalability through layer 2 like Ethereum as it reaches 10+ million TPS thanks to dynamic sharding up to 2^60 shards. Ethereum has abandoned 64-chain sharding in favour of proto-danksharding which allows it to scale via layer 2 via zk-snark rollups up to 100k+ TPS.
Furthermore, EVM is inherently synchronous and does not allow smart contracts to run in parallel like TVM.
I do not understand what advantages this TON Footsteps has over the other.

@Gusarich
Copy link
Contributor

@alfredonodo I also cannot understand how are they going to integrate EVM into TON. Either it's going to be some super-complex solution, or just nothing.

@Gusarich
Copy link
Contributor

Gusarich commented Jun 4, 2023

How's it going? @smartprogrammer93

@smartprogrammer93
Copy link
Author

@Gusarich, it is going well. Our team has made great progress about the technical difficulties. We are ironing out some other details before starting to work on the timeline and the actual proposal.

@Gusarich
Copy link
Contributor

What's up with this footstep? @smartprogrammer93

@smartprogrammer93
Copy link
Author

@Gusarich it is going well. we just had some delays because of vacations during summer

@Gusarich
Copy link
Contributor

Gusarich commented Aug 7, 2023

It’s been a long time already. How is your progress? Any news? @smartprogrammer93

@smartprogrammer93
Copy link
Author

@Gusarich, we are at the end of the project. We have all deliverables ready just reviewing everything before publishing 🎉

@Gusarich
Copy link
Contributor

@smartprogrammer93 what’s up?

@markokhman markokhman added Infrastructure Task related to system or technology integration Developer Tool Related to tools or utilities used by developers and removed footstep This is a TON Footstep issue Infrastructure Task related to system or technology integration labels Oct 13, 2023
@smartprogrammer93
Copy link
Author

@Gusarich the wait is over. I will start posting the deliverables here in the coming days

@smartprogrammer93
Copy link
Author

@smartprogrammer93
Copy link
Author

smartprogrammer93 commented Oct 21, 2023

White Paper Document here:
https://docs.google.com/document/d/1Iop_mAVO7Wxvd_CnvdMRlGilZ32xjmFx_aLk-2EerSk/
First Medium Article in the series:
https://medium.com/@smartprogrammer.eth/ton-zkevm-rollup-series-ep1-tech-stack-choice-8d9bc12abd71

Would like to clarify that the choice was made to go with a Zero-Knowledge rollup since an Optimistic rollup would require the implementation of the EVM in FunC, which is way harder and time consuming (if possible at all) than building a ZK verifier. It was very obvious to us that we did not include it in the article of the tech stack choice.

@smartprogrammer93
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved This proposal is approved by the committee Developer Tool Related to tools or utilities used by developers
Projects
None yet
Development

No branches or pull requests

5 participants