beamer-bridge / beamer

Beamer - Bridging rollups with L1 inherited security
https://beamerbridge.com
MIT License
44 stars 21 forks source link

Research on impact of OP Bedrock to our system #1891

Closed GabrielBuragev closed 1 year ago

GabrielBuragev commented 1 year ago

Rationale

OP progresses and migrates their network to the new Bedrock version.

We need to make sure our system provides the same service as before. Things to look into:

fredo commented 1 year ago

Summary

Optimism changes in a way that messages have to be proved first (on L1) before the 7 day window starts. After the 7 days relayMessage can be called. This also implies that without calling prove, the 7 day window never starts. This means that it takes an L1 transaction to start the 7 day window. @GabrielBuragev can you please provide the links to the documentation.

This is very unfortunate as it complicates our timing assumptions. This leads to the fact that for proper solutions we are required to change our contracts. This should be it's stand alone issue, to research and decide on a longterm solution.

Short term solution

It would be not feasible if the agent would always call prove for every transfer even in the happy case. However, when an agent is part of the challenge (either gets challenged or is initiating a challenge), the agent (as he is the honest actor) can optimistically call prove, initiating the 7 day finality window. This is only a tradeoff as the L1 transaction imposes cost to the agent which he might not get back (the malicious actor could stop engaging in the challenge, thus the agent wins anyways and does not need to call L1 resolution). This optimistically proving in case of a challenge is actually very similar to why agents send invalidFill transactions on L2. They never might need it, but it's necessary to have the message ready in 7 days from now.

However, the claimStake does probably not cover the cost of the prove transaction (300k gas), so the agent enters into a financial risk. This fact needs to be removed in the future but it is a viable short term solution, without needing the contract to change.

What needs to be done

fredo commented 1 year ago

@GabrielBuragev @bilbeyt please add, extend, correct and provide links if necessary

GabrielBuragev commented 1 year ago

References to OP Bedrock documentaiton:

andfletcher commented 1 year ago

done