moneyversed
high
The setMarketRate function can be called by any address, which could allow unauthorized users to modify the interest rate of a market.
The setMarketRate function is missing access control checks, allowing any user to call the function and modify the interest rate of a market. This could lead to potential financial loss for borrowers and lenders if the market rate is manipulated by unauthorized parties.
This vulnerability could result in financial loss for borrowers and lenders if the market rate is manipulated by unauthorized parties.
Manual Review
Implement access control checks to ensure that only authorized users can call the setMarketRate function:
function setMarketRate(uint256 marketId, uint256 newRate) external onlyOwner {
...
}