Summary
LiquidationPoolManager inherits Ownable. However, LiquidationPoolManager does not call the Ownable constructor in the LiquidationPoolManager constructor. This leads to the Ownable functionality being broken.
Vulnerability Details
LiquidationPoolManager inherits Ownable:
contract LiquidationPoolManager is Ownable
However, LiquidationPoolManager does not have a constructor call to Ownable:
constructor(address _TST, address _EUROs, address _smartVaultManager, address _eurUsd, address payable _protocol, uint32 _poolFeePercentage) {
pool = address(new LiquidationPool(_TST, _EUROs, _eurUsd, ISmartVaultManager(_smartVaultManager).tokenManager()));
TST = _TST;
EUROs = _EUROs;
smartVaultManager = _smartVaultManager;
protocol = _protocol;
poolFeePercentage = _poolFeePercentage;
}
Impact
When LiquidationPoolManager is deployed, the Ownable feature is broken.
Tools Used
Manual Review
Recommendations
Add a constructor function call that calls Ownable(msg.sender) to the constructor call:
constructor(address _TST, address _EUROs, address _smartVaultManager, address _eurUsd, address payable _protocol, uint32 _poolFeePercentage) Ownable(msg.sender) {
pool = address(new LiquidationPool(_TST, _EUROs, _eurUsd, ISmartVaultManager(_smartVaultManager).tokenManager()));
TST = _TST;
EUROs = _EUROs;
smartVaultManager = _smartVaultManager;
protocol = _protocol;
poolFeePercentage = _poolFeePercentage;
}
Sources
OZ Ownable constructor
Ironbank bug report with similar issue