Polygon
Ready to call this in production?
Free tier covers personal projects. Pay-as-you-go scales without a card.
Polygon
Free tier covers personal projects. Pay-as-you-go scales without a card.
Time on Polygon is whatever the block says it is: a Bor block carries a single timestamp field, and any contract that reads block.timestamp — for vesting, auctions, staking rewards, or time-locked withdrawals — is trusting the validator that produced that block. With a new block every ~2 seconds on chain 137 the timestamp usually tracks wall-clock time closely, but it is set by the proposer, not by an authoritative clock, so it can be nudged within protocol bounds and can drift from your server's time. This guide is for smart contract and backend developers who depend on on-chain time; it covers how Polygon timestamps are produced, their accuracy limits, how far a validator can move them, and how to write time-sensitive logic that stays safe. Examples read blocks from https://polygon.therpc.io/YOUR_API_KEY.
timestamp, expressed as Unix seconds. It is the proposer's declared time, not a reading from a trusted global clock, and it is what your contract sees as block.timestamp.block.timestamp as approximate. Do not gate anything valuable on second-level equality or on the exact moment a block was produced on chain 137.block.timestamp, and keep deadline checks coarse enough that a small shift changes nothing material.