The Standard

The Standard
DeFiHardhat
20,000 USDC
View results
Submission Details
Severity: low
Invalid

Event emissions missing in important functions in `LiquidationPool`, `SmartVaultV3`, `SmartVaultManagerV5`, `LiquidationPoolManager`

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:

  1. 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();
}
}
// @audit-issue no event emission on delete
}
  1. LiquidationPool::deletePendingStake

function deletePendingStake(uint256 _i) private {
for (uint256 i = _i; i < pendingStakes.length - 1; i++) {
pendingStakes[i] = pendingStakes[i + 1];
}
pendingStakes.pop();
// @audit-issue no event emission on delete
}
  1. SmartVaultV3::setOwner

function setOwner(address _newOwner) external onlyVaultManager {
owner = _newOwner;
// @audit-issue no event emission
}
  1. 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;
}
  1. LiquidationPoolManager::setPoolFeePercentage

function setPoolFeePercentage(uint32 _poolFeePercentage) external onlyOwner {
poolFeePercentage = _poolFeePercentage;
}
// @audit no event emission

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.

Updates

Lead Judging Commences

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

events

informational/invalid

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.