On Arbitrum, a sequencer is used for block.timestamp
, and it can deviate by up to 24 hours earlier or 1 hour in the future compared to real-time (See Arbitrum docs for more information).
A horse is supposed to be happy for 24 hours after a meal. However, if block.timestamp
is 24 hours earlier (due to Arbitrum sequencer) during a call to isHappyHorse
, a horse can be happy for 2 days. Conversely, if block.timestamp
is 24 hours earlier during a call to feedHorse
, a horse can be happy for 0 days if the sequencer corrects the timestamp just after the call.
Invariant breaking :
A horse can be happy for 2 days with just one meal.
A horse can be happy for 0 days after a meal.
Arbitrum is not recommended for this type of contract due to the deviation in block.timestamp
caused by the Arbitrum sequencer. Consider using other Ethereum Layer 2 solutions or the Ethereum mainnet to avoid issues related to time deviation.
Block timestamps can vary between Arbitrum and Ethereum in case sequencer fails to post batches on the parent chain within a [24 hours earlier than the current time or 1 hour in the future] boundary. This can lead to inconsistencies for Horses minted on Arb.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.