Rari-Capital / nova

Read and write to L1 with minimal latency and no trust tradeoffs.
GNU Affero General Public License v3.0
216 stars 18 forks source link

🔒 Collision protection #46

Open transmissions11 opened 3 years ago

transmissions11 commented 3 years ago

TLDR: Don't allow two requests with the same execHash to be executed twice.

I used to think this was unsafe because someone could frontrun resubmitted requests and prevent it from being executed later by executing it early, I'm pretty sure the Optimism Cross Domain Messenger allows replaying messages that reverted the first time.

As long as messages can be replayed, DOS shouldn't be an issue.

transmissions11 commented 3 years ago

This does add storage costs though, so worth evaluating if just doing an auction is ultimately more efficient.

transmissions11 commented 3 years ago

Note to self: Important to document the implicit reliance on cross domain messages being retryable.