Closed sherlock-admin closed 1 year ago
I am not understanding the remediation here - bidder's should not be able to specify timestamp, as they could get a more favorable price by inputting a time later in the auction.
If there is a delay in block.timestamp
updating on an L2, then the dutch auction should read a higher price then expected, which may delay execution but should not be a security risk.
Agree with sponsor. Was marked as valid first just to notice about L2 timestamp change.
0xSmartContract
medium
block.timestamp means different things on different L2s
Summary
It is stated in the documents of the project that it will be published on the Arbitrum network.
How do block.timestamp and block.number work on Arbitrum?
Solidity calls to block.number and block.timestamp on Arbitrum will return the block number/ timestamp of the underlying L1 on a slight delay; i.e., updated every few minutes.
https://developer.arbitrum.io/for-devs/troubleshooting-building#how-do-blocktimestamp-and-blocknumber-work-on-arbitrum
Vulnerability Detail
https://github.com/sherlock-audit/2023-06-Index/blob/main/index-protocol/contracts/protocol/modules/v1/AuctionRebalanceModuleV1.sol#L275
https://github.com/sherlock-audit/2023-06-Index/blob/main/index-protocol/contracts/protocol/modules/v1/AuctionRebalanceModuleV1.sol#L806
https://github.com/sherlock-audit/2023-06-Index/blob/main/index-protocol/contracts/protocol/modules/v1/AuctionRebalanceModuleV1.sol#L1190
Impact
block.timestamp means different things on different L2s
Code Snippet
Tool used
Manual Review
Recommendation
Have the user pass a block.timestamp as the function argument