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

Assumption that different network clocks are synced. #1

Open
TomAFrench opened this issue Jan 12, 2023 · 0 comments
Open

Assumption that different network clocks are synced. #1

TomAFrench opened this issue Jan 12, 2023 · 0 comments

Comments

@TomAFrench
Copy link

We're making an assumption that block.timestamp >= pt.ts here, i.e. the remote chain's clock will be synced to (or at least ahead of) Ethereum's here.

int128 bias = p.bias - (p.slope * int128(uint128(block.timestamp - p.ts)));

This has potential to revert if a user creates a new epoch on L1 and then syncs this to a remote chain if the remote chain's clock is slow. We could handle this by returning pt.bias in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant