In the LendingPool.sol (function setStabilityPool) Owner can mistakenly set an incorrect stability pool address, leading to system failure or vulnerabilities.
The setStabilityPool() function allows the contract owner to update the Stability Pool address. However, it lacks validation to ensure that the new address is actually a valid Stability Pool contract. This introduces a misconfiguration risk, where the owner could mistakenly set an incorrect but technically valid Ethereum address, leading to potential loss of funds or disruption of protocol operations.
The function ensures that the new Stability Pool address is not zero and not the same as the current address, but it does not verify whether the new address is actually a valid Stability Pool contract.
If the owner mistakenly inputs a valid Ethereum address that does not belong to a proper Stability Pool contract (e.g., a random user wallet or an unrelated smart contract), the system may fail to function correctly.
If stability-related funds are meant to be sent to the Stability Pool, they might be lost or locked in an incorrect contract.
Loss of Funds: If the Stability Pool is incorrectly set to an arbitrary address, protocol interactions may send assets to an unintended recipient, resulting in permanent loss.
Protocol Disruption: If the system relies on the Stability Pool for key operations (e.g., liquidation handling or collateral stabilization), setting an invalid address could cause critical failures.
Increased Governance Risk
Manuel Review
Before updating stabilityPool, verify that the new address is a smart contract.
Use OpenZeppelin’s Address.isContract() function:
✅ Prevents assigning an invalid wallet address as a Stability Pool, which would cause system failures.
✅ Ensures the new Stability Pool contains executable logic rather than being an empty address.
Even if the new address is a contract, it might not be a valid Stability Pool contract. It could be an unrelated contract, leading to unexpected behavior.
2.Before updating the Stability Pool address, check if it supports the required functions.
Define an interface for the Stability Pool and verify its existence before setting the address.
✅ Ensures that the new contract implements the required functions before assigning it.
✅ Prevents assigning a random contract that doesn’t function as a Stability Pool.
3.Add Address Validation:
Implement a check to ensure the new address is a valid contract (e.g., by checking the bytecode size or calling a known function on the contract).
4.Use a Multi-Signature Wallet:
Require multiple parties to approve the address change to reduce the risk of mistakes.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.