Synthetixio / synthetix-v3

MIT License
114 stars 56 forks source link

Fix for underflow error when offchain price timestamp is bigger than current block timestamp #2195

Closed noisekit closed 2 months ago

noisekit commented 2 months ago

On arbitrum sepolia block is minted with a reasonable delay so after getting the fresh price update txn - the timestamp of the update will be "in the future" for the current block and we get underflow error

Example: https://www.tdly.co/shared/simulation/8e997e25-04d6-47a9-b566-56a779efed4c