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

feat(protocol): enable ETH deposit from L1 to L2 using withdrawalsRoot [1] #13617

Merged
merged 122 commits into from
Apr 22, 2023

Conversation

dantaik
Copy link
Contributor

@dantaik dantaik commented Apr 17, 2023

This PR enables depositing from Ethereum to Taiko using the new withdrawalsRoot field.
A potential attack is that someone uses this approach to deposit large amount of Ether then use the Bridge to take Ether back to L1, then repeat this process until the Ether balance of an account overflows. Therefore, we cap the amount of Ether that can be deposited per L2 block.

Future optimizations are stated here: #13621

dantaik and others added 3 commits April 20, 2023 18:03
- Resolve PR comments
- Write more tests and simulation data
- Resolve bugs
- Reorganize code
@dantaik
Copy link
Contributor Author

dantaik commented Apr 21, 2023

A potential attack is that someone uses this approach to deposit large amount of Ether then use the Bridge to take Ether back to L1, then repeat this process until the Ether balance of an account overflows. Therefore, we cap the amount of Ether that can be deposited per L2 block.

(2**256)/(100,000,000*(10**18)) ~= 10**50, looks like we'll be safe even without a cap. :)

Agreed, the current cap is there to force people to pay more fees :)

@dantaik dantaik changed the base branch from major_protocol_upgrade_rebase to prove_time_based_rewards_exp April 21, 2023 04:21
@dantaik dantaik marked this pull request as ready for review April 21, 2023 17:02
adaki2004 and others added 2 commits April 21, 2023 20:04
- Rename confusing numBlockBeingProven
- Fix foundry warnings
- Re-enable and fix some issues with simulation (time between prop and proving, calculatin initProofTimeIssued, etc.)
Base automatically changed from prove_time_based_rewards_exp to major_protocol_upgrade_rebase April 22, 2023 10:50
@dantaik dantaik merged commit 32d1df0 into major_protocol_upgrade_rebase Apr 22, 2023
@dantaik dantaik deleted the eth_deposit_clean branch April 22, 2023 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants