Avalanche
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Avalanche
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Block timestamps are the only on-chain clock an Avalanche C-Chain smart contract has, so vesting schedules, auction windows, staking lockups, and time-weighted price logic all lean on them — and off-chain indexers use the same timestamps to order and chart activity. But that clock is approximate: a validator sets each block's timestamp within bounded limits, not a precise atomic time. This guide explains how C-Chain timestamps are produced via https://avalanche.therpc.io/YOUR_API_KEY, what accuracy you can and cannot count on, and how to write time-based logic that stays safe under manipulation and network drift. It is aimed at smart contract developers and the backend engineers who index C-Chain data.
timestamp field. There is no global atomic clock; the value reflects that one validator's view of time, constrained by protocol rules.block.timestamp as a source of randomness and add margins so a few seconds of nudging cannot flip an outcome.timestamp of each block, and when correlating with another chain account for both chains' independent drift rather than aligning by block count.