Using block.timestamp for deadline offers no protection
Summary
Block.timestamp is being used as a deadline, which offers no real protection since it will have the value of the block the miners mine it to..
This means the miner can insert these transactions to the block anytime he chooses which can make it unfavorable.
4b
Medium
Using
block.timestamp
for deadline offers no protectionSummary
Block.timestamp
is being used as a deadline, which offers no real protection since it will have the value of the block the miners mine it to.. This means the miner can insert these transactions to the block anytime he chooses which can make it unfavorable.Vulnerability Detail
In
_redeemFromNotional
,_executeInstantRedemption
,_stakeTokens
,_sellStakedUSDe
,_stakeTokens
&_executeInstantRedemption
functions we can find a deadline within a Trade block setting thedeadline
toblock.timestamp
which is not effective considering how the blockchain worksImpact
Block.timestamp
offers no real protection,Code Snippet
This block of code is found in all the functions mentioned above
Tool used
Manual Review
Recommendation
Implement a proper deadline logic either it will be an input param or better
Duplicate of #79