1

To which extend can bakers manipulate the timestamp Michelson uses for NOW?
I am not really sure how this value is provided to the smart contract and how reliable/unreliable it can be...
Is it safe to use it for time-sensitive applications? Is there a way to make it safer?

1
  • 1
    The value returned by NOW is the timestamp of the predecessor block plus 60 seconds. I don't know if this helps... – Eugen Oct 27 '20 at 14:38
4

NOW is the earliest date at which the current block can be baked, it is computed as the timestamp of the previous block + the minimal time that can separate 2 blocks (60 seconds on mainnet).

As a consequence, the baker that includes a block containing a call to a smart contract using NOW cannot affect the value by delaying its block but:

  • it can delay any transaction by a minute by simply not including it in its block,
  • it can delay its block to affect the value of NOW in the next block.

I don't think there is much to do at the protocol level against the first point but for some applications it might be possible to set incentives for the inclusion of operations high enough that not including them is not profitable. For the second point, a new instruction called LEVEL has been proposed here to define deadlines in term of block level instead of actual time; delaying a block has no effect on the level of the next one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.