Summary
State changing functions lacks Event emissions.
Vulnerability Details
Certain functions in the LiquidationPool
, SmartVaultV3
, SmartVaultManagerV5
, LiquidationPoolManager
don't emit events for parameters change of the protocol.
Contexts:
LiquidationPool::deleteHolder
function deleteHolder(address _holder) private {
for (uint256 i = 0; i < holders.length; i++) {
if (holders[i] == _holder) {
holders[i] = holders[holders.length - 1];
holders.pop();
}
}
}
LiquidationPool::deletePendingStake
function deletePendingStake(uint256 _i) private {
for (uint256 i = _i; i < pendingStakes.length - 1; i++) {
pendingStakes[i] = pendingStakes[i + 1];
}
pendingStakes.pop();
}
SmartVaultV3::setOwner
function setOwner(address _newOwner) external onlyVaultManager {
owner = _newOwner;
}
SmartVaultManagerV5
function setMintFeeRate(uint256 _rate) external onlyOwner {
mintFeeRate = _rate;
}
function setBurnFeeRate(uint256 _rate) external onlyOwner {
burnFeeRate = _rate;
}
function setSwapFeeRate(uint256 _rate) external onlyOwner {
swapFeeRate = _rate;
}
function setWethAddress(address _weth) external onlyOwner() {
weth = _weth;
}
function setSwapRouter2(address _swapRouter) external onlyOwner() {
swapRouter2 = _swapRouter;
}
function setNFTMetadataGenerator(address _nftMetadataGenerator) external onlyOwner() {
nftMetadataGenerator = _nftMetadataGenerator;
}
function setSmartVaultDeployer(address _smartVaultDeployer) external onlyOwner() {
smartVaultDeployer = _smartVaultDeployer;
}
function setProtocolAddress(address _protocol) external onlyOwner() {
protocol = _protocol;
}
function setLiquidatorAddress(address _liquidator) external onlyOwner() {
liquidator = _liquidator;
}
LiquidationPoolManager::setPoolFeePercentage
function setPoolFeePercentage(uint32 _poolFeePercentage) external onlyOwner {
poolFeePercentage = _poolFeePercentage;
}
Impact
Not adding an event will not facilitate off-chain monitoring when changing system parameters.
Tools Used
Manual Review
Recommendations
Make sure these endpoints emit events as some off-chain agents might be monitoring the protocol for these events.