code-423n4 / 2022-03-lifinance-findings

6 stars 4 forks source link

Add a timelock to DiamondCutFacet #176

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Lines of code

https://github.com/code-423n4/2022-03-lifinance/blob/main/src/Libraries/LibDiamond.sol

Vulnerability details

Impact

To give more trust to users: functions that set key/critical variables should be put behind a timelock.

Proof of Concept

https://github.com/code-423n4/2022-03-lifinance/blob/699c2305fcfb6fe8862b75b26d1d8a2f46a551e6/src/Facets/DiamondCutFacet.sol#L20

Tools Used

Remix

Recommended Mitigation Steps

Add a timelock to setter functions of key/critical variables.

H3xept commented 2 years ago

Duplicate of #65