sherlock-audit / 2023-01-illuminate-judging

1 stars 0 forks source link

ahmedovv - Lack of zero admin check for admin #1

Closed github-actions[bot] closed 1 year ago

github-actions[bot] commented 1 year ago

ahmedovv

medium

Lack of zero admin check for admin

Summary

lack of zero address check can lead to DOS to whole contract.

Vulnerability Detail

Impact

If admin is set to address(0) all functions that require auth will break including the setAdmin() function, means you can't recover it.

https://github.com/sherlock-audit/2023-01-illuminate/blob/main/src/Lender.sol#L269 https://github.com/sherlock-audit/2023-01-illuminate/blob/main/src/MarketPlace.sol#L277 https://github.com/sherlock-audit/2023-01-illuminate/blob/main/src/Redeemer.sol#L133

Code Snippet

Tool used

Manual Review

Recommendation

Consider adding checks for address(0)