code-423n4 / 2023-10-wildcat-findings

14 stars 10 forks source link

Markets cannot be closed #627

Closed c4-submissions closed 1 year ago

c4-submissions commented 1 year ago

Lines of code

https://github.com/code-423n4/2023-10-wildcat/blob/main/src/market/WildcatMarket.sol#L142

Vulnerability details

Impact

The inability to close markets has the following consequences:

Proof of Concept

The WildcatMarket.closeMarket() function has the onlyController modifier. Thus, it can only be called by the controller. The controller, however, has no code to call this function, making it effectively uncallable.

function closeMarket() external onlyController nonReentrant {

Tools Used

Manual review.

Recommended Mitigation Steps

A closeMarket() function should be added to WildcatMarketController that is callable by the borrower and calls the WildcatMarket.closeMarket() function to close a market.

Assessed type

Other

c4-pre-sort commented 1 year ago

minhquanym marked the issue as duplicate of #147

c4-judge commented 1 year ago

MarioPoneder marked the issue as partial-50

c4-judge commented 1 year ago

MarioPoneder changed the severity to 3 (High Risk)