code-423n4 / 2021-09-defiprotocol-findings

1 stars 0 forks source link

Incorrect timing #246

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

goatbug

Vulnerability details

Impact

uint256 public constant TIMELOCK_DURATION = 4 * 60 * 24; // 1 day

This is not one day.

4 60 24 != 86400 where 86400 is seconds in a day.

Proof of Concept

Incorrect timelocks in both the basket and factory can allow parameters to be modified quicker than expected.

Tools Used

Recommended Mitigation Steps

frank-beard commented 2 years ago

This is referring to the 15 second block time, not the seconds.

GalloDaSballo commented 2 years ago

Invalid