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): allow L2 contracts to read L2's parent block timestamp #16425

Merged
merged 2 commits into from
Mar 13, 2024

Conversation

dantaik
Copy link
Contributor

@dantaik dantaik commented Mar 13, 2024

This is a small feature but it may be very useful for us to incentivize block proposers for liveness. For example, we can allow a fair-mint token that only can be minted by block.coinbase for each L2 block but only when the L2's block is x seconds later than the parent's block timestamp. Without being able to read the parent L2 block's timestamp, this is impossible.

This tiny feature imposes a very small amount of additional gas cost.

@dantaik dantaik marked this pull request as ready for review March 13, 2024 08:14
@adaki2004
Copy link
Contributor

adaki2004 commented Mar 13, 2024

This is a small feature but it may be very useful for us to incentivize block proposers for liveness. For example, we can allow a fair-mint token that only can be minted by block.coinbase for each L2 block but only when the L2's block is x seconds later than the parent's block timestamp. Without being able to read the parent L2 block's timestamp, this is impossible.

This tiny feature imposes a very small amount of additional gas cost.

While i understand the mechanics you described, i'd be interested in what would be that "free" or "fair" mint token ?

AFAIK TKO will have constant supply (no deflationary, no inflationary) so it must be something else. If something else, what would it be and who would back that token ? or rather what would it give value - so that it incentivizes the liveness ? Should not liveness be incentivized simply by the collected fees ? If that is not enough, proposers should simply wait until they are profitable, even tho txns would be a bit delayed - but this is a known 'issue'.

Or it could also be used for off-chain mechanisms (airdrop of TKO) by the DAO to active proposers. (?)

@dantaik
Copy link
Contributor Author

dantaik commented Mar 13, 2024

This is a small feature but it may be very useful for us to incentivize block proposers for liveness. For example, we can allow a fair-mint token that only can be minted by block.coinbase for each L2 block but only when the L2's block is x seconds later than the parent's block timestamp. Without being able to read the parent L2 block's timestamp, this is impossible.
This tiny feature imposes a very small amount of additional gas cost.

While i understand the mechanics you described, i'd be interested in what would be that "free" or "fair" mint token ?

AFAIK TKO will have constant supply (no deflationary, no inflationary) so it must be something else. If something else, what would it be and who would back that token ? or rather what would it give value - so that it incentivizes the liveness ? Should not liveness be incentivized simply by the collected fees ? If that is not enough, proposers should simply wait until they are profitable, even tho txns would be a bit delayed - but this is a known 'issue'.

Or it could also be used for off-chain mechanisms (airdrop of TKO) by the DAO to active proposers. (?)

It is not the TKO token for sure, but it can ben NFTs or another reward token that we can promise will receive some airdrop as part of our trailblazer campaign. One example is: #16408

@dantaik dantaik added this pull request to the merge queue Mar 13, 2024
Merged via the queue into main with commit 9b79359 Mar 13, 2024
12 checks passed
@dantaik dantaik deleted the L2-parent-time branch March 13, 2024 14:54
@Brechtpd
Copy link
Contributor

Without being able to read the parent L2 block's timestamp, this is impossible.

It is pretty much already possible to read the parent's block timestamp by reading it from the parent block's blockhash. And because all L2 blockhashes are stored, that way allows even reading it from any L2 block compared to just the current block. Of course, this does depend on putting the blockheader data corresponding to the blockheader onchain to make it available to be used in a smart contract.

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

Successfully merging this pull request may close these issues.

4 participants