block.timestamp not faithfully representing in the emitted VaultStarted event in the deposit function.
Summary
events should faithfully represent the parameter it holds in order to maintain consistency and for the code to be more readable. This faithful change will facilitate a more accurate tracking and notify off-chain clients following the contract's activity should there be discrepancies with instances such as withdrawing early and incurring more/less than expected.
A delay in the actual block.timestamp of the deposit and the logging of the VaultStarted event
Impact
Not facilitating this change may hinder accurate tracking and notify off-chain clients following when the deposit actually happen should there be discrepancies with instances such as withdrawing early and there's a difference in incurring more/less fee penalties as expected.
Real Tangelo Lion
Low/Info
block.timestamp
not faithfully representing in the emittedVaultStarted
event in thedeposit
function.Summary
events should faithfully represent the parameter it holds in order to maintain consistency and for the code to be more readable. This faithful change will facilitate a more accurate tracking and notify off-chain clients following the contract's activity should there be discrepancies with instances such as withdrawing early and incurring more/less than expected.
Root Cause
The root cause to this issue is that the following line uses
block.timestamp
instead ofstartTime
to indicate that the vault has started. this may cause issues down the line, especially if there's delays in the logging of the event. https://github.com/sherlock-audit/2024-08-saffron-finance/blob/main/lido-fiv/contracts/LidoVault.sol#L389Internal pre-conditions
block.timestamp
of the deposit and the logging of theVaultStarted
eventImpact
Not facilitating this change may hinder accurate tracking and notify off-chain clients following when the deposit actually happen should there be discrepancies with instances such as withdrawing early and there's a difference in incurring more/less fee penalties as expected.
Mitigation
Replace
block.timestamp
withstartTime