# Tee Rollups on Asula
TEE Rollup Asula Discussion
Goals:
- Research the feasibility of TEE encrypted transactions over blockchain
- Reduce and mitigate risks of MEV induced attacks
- Anonymise transactions over blockchain using Trusted Execution Environments to achieve consensus and validate transactions in Rollups
- Analyse the feasibility of using Cosmos SDK and the Cosmos blockchain in order to integrate TEE-secured rollups
- Analyse and plan the roadmap for implementing verification and settlement on Bitcoin
Work Items:
1. Feasibility Study of TEE Encrypted Transactions Over Blockchain
- Review existing literature on TEE and blockchain integration:
- **Part of Oyster work, no extra time needed for this.**
- Analyse current implementations of TEE in blockchain (e.g., Intel SGX, AMD SEV):
- **Oyster**
- Identify potential challenges and limitations:
- In aws, size of nitro-enclaves is issue, could lead to state size issue. Eclipse attacks on TeeEVM enclaves. EVM state here either needs to be snapshoted or built from existing transactions. when snapshoted, we need to back the state in some centralized storage like s3, ipfs. When an new instance of TeeEVM enclave starts, it will use this snapshoted state as reference.
- in second case, sequencer can dump the encrypted transaction on DA layer. New TeeEVM enclave when started, will use this to build the state from scratch. This however, needs encryption key to be protected via MPC network or some consensus mechanism within multiple TeeEVM enclaves for one single rollup. Other solution could be bring Lit-Protocol(or some identical service) into picture.
2. Risk Mitigation of MEV-induced Attacks
- Study the mechanics of Maximal Extractable Value (MEV) and common attack vectors:
- **Plan is to design TeeEVMs to use at-most one instance of enclave and sequencer inside the enclave itself, which means MEV is not a problem.**
- Review existing MEV mitigation techniques and their effectiveness:
- **Since the transactions are always encrypted, MEV hunters don’t have any visibility.**
- Propose and validate new strategies for reducing MEV risks:
- **Provers can continously poll for state changes in TeeEVM, and then spin up a parallel TeeEVM to alter those transactions, however this comes up with cost of running a dedicated enclave and snapshoting the whole state and commiting then commiting it on L1**
3. Anonymisation of Transactions Using TEE in Rollups
- Investigate the current state of rollup technology and TEE integration:
- **Currently it is possible to verify existence of any data/key/code snippet on enclave. Extending the same, we plan to generate a self signed cert inside enclave and get that verified on L1 chain. TeeRollup would only start once the SSC is verified on L1 chain. This also means that all existing evm based toolings like remix/metamask are usable without any change with tee-rollups**
- Develop a conceptual framework for anonymising transactions using TEE
- **Generate a SSC inside enclave**
- **Get the SSC verified on L1 chain**
- **Enclave accepts all the rpc calls to it via https://tee-rollup-link**
- Validate the effectiveness and security of the proposed concept
- **todo!**
4. Feasibility Analysis of Using Cosmos SDK and Cosmos Blockchain for TEE-Secured Rollups
- Review the architecture of Cosmos SDK and Cosmos blockchain
- *if we decide to stick with atmost single instance of teeEVM, we won't need cosmosSDK, cosmos based blockchain*
- *if alternate design, where we dump the encrypted transaction on DA and encryption key kept alive via lit or mpc, we need cosmos SDK and blockchain for consensus*
- Identify integration points for TEE-secured rollups within Cosmos
- *Multiple teeEVM enclaves of same Rollups will run parallely with consensus amognst them*
- *This will require cosmos SDK*
- *Creator of rollup will specify the type of rollup.* For example, a `m/n` rollup means, `m` instances of teeEVM of that rollup need to always active for rollup to be active and key to available using mpc.
- Develop a conceptual design for integrating TEE-secured rollups with Cosmos SDK
- *long todo!*
5. Roadmap for Implementing Verification and Settlement on Bitcoin
- Study current verification and settlement mechanisms on Bitcoin
- Analyse the feasibility of integrating TEE for verification and settlement
- Develop a step-by-step implementation plan
- Create a timeline for the integration process and testing phases
Research Roadmap (Week 1-4):
1. Initial Research and Feasibility Studies
- Conduct a comprehensive literature review on TEE, blockchain, and MEV
- Analyse current implementations and case studies of TEE in blockchain
- Perform initial feasibility studies for TEE-encrypted transaction and anonymisation using TEE in rollups
2. Integration Analysis
- Analyse the architecture and capabilities of Cosmos SDK and Cosmos blockchain
- Design the integration of TEE-secured rollups with Cosmos SDK
- Develop a concept for Cosmos integration and test its feasibility
3. Bitcoin Integration Feasibility and Testing
- Analyse the feasibility of TEE-based verification and settlement on Bitcoin
- Develop a step-by-step implementation plan for Bitcoin integration
- Conduct preliminary testing and validation of the integration approach
4. Prototype Concepts and Validation
- Develop initial prototype concepts for TEE-encrypted transactions and TEE-secured rollups
- Simulate and test MEV mitigation concepts
Week 5-8: Validation
- Conduct extensive validation of all concepts and integrations approaches
- Refine and optimise solutions based on validation results
- Finalise the roadmap for full-scale implementation on Bitcoin
- Prepare a comprehensive report and presentation for the client
Legit Question's till this point.
Can we get way with multiple sequencers and simply use single sequencer?
Can shared sequencer come into picture ?