Users who collateralized using wLP won't ever be liquidated unless the wLP is whitelisted back, but this could be dangerous depending on the reason it was removed from the whitelist. They can't also decollateralize. The severity of this issue depends entirely on the reason of the removal.
The test will fail due to the fact that the wLP is no longer whitelisted, due to the check here.
Tools Used
Vscode, Foundry
Recommended Mitigation Steps
2 different allowlists should be set, one for collateralizing and another for decollateralizing/liquidating. This way, a WLP can be removed from collateralizing only, being it still possible to decollateralize/liquidate. In case the wLP is compromised or similar, it can be removed from both whitelists.
Lines of code
https://github.com/code-423n4/2023-12-initcapital/blob/main/contracts/core/InitCore.sol#L327
Vulnerability details
Impact
Users who collateralized using
wLP
won't ever be liquidated unless thewLP
is whitelisted back, but this could be dangerous depending on the reason it was removed from the whitelist. They can't also decollateralize. The severity of this issue depends entirely on the reason of the removal.Proof of Concept
Add the following code before this line:
The test will fail due to the fact that the
wLP
is no longer whitelisted, due to the check here.Tools Used
Vscode, Foundry
Recommended Mitigation Steps
2 different allowlists should be set, one for collateralizing and another for decollateralizing/liquidating. This way, a WLP can be removed from collateralizing only, being it still possible to decollateralize/liquidate. In case the wLP is compromised or similar, it can be removed from both whitelists.
Assessed type
Access Control