code-423n4 / 2022-01-trader-joe-findings

2 stars 0 forks source link

Reasonable upper limits for phase durations #303

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

pauliax

Vulnerability details

Impact

Consider introducing upper limits for PHASE_ONE_DURATION and PHASE_TWO_DURATION so that a flat finger error would not cause serious harm when initializing new events.

Also, there should probably be a reasonable upper limit for _phaseOneStartTime, as now the user can pass any value, but I think a start time in 50 years should not make sense.