sherlock-audit / 2024-06-makerdao-endgame-judging

1 stars 1 forks source link

Mansa11 - Contract is bricked after calling `stop` #120

Closed sherlock-admin4 closed 1 month ago

sherlock-admin4 commented 1 month ago

Mansa11

High

Contract is bricked after calling stop

Description

Whenever there are discrepancies or irregularities and the protocol decides to stop or halt the kick process, there is currently no implementation to revert back to the initial state in SplitterMom.

The stop calls the splitter.file with a new data of type(uint256).max as hop which will make it difficult to pass the below check :-

https://github.com/sherlock-audit/2024-06-makerdao-endgame/blob/main/dss-flappers/src/SplitterMom.sol#L79-L83

Impact

Contract is stuck and kick can no longer be called.

POC

    function stop() external auth { //@audit there is no way to resume back after halting the operations. it will become impossible to call Splitter::Kick
            splitter.file("hop", type(uint256).max);
            emit Stop();
    }

Recommendation

Implement a functionality that allows resetting the splitter.file back to a more recent timestamp

sunbreak1211 commented 1 month ago

Reverting this state would happen via regular Governance spell having to wait for the delay time.