code-423n4 / 2022-09-quickswap-findings

0 stars 0 forks source link

QA Report #320

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

L-001 Lack of Zero Address check

function setOwner(address _owner) external override onlyOwner {
    require(owner != _owner);
    emit Owner(_owner);
    owner = _owner;
  }

https://github.com/code-423n4/2022-09-quickswap/blob/15ea643c85ed936a92d2676a7aabf739b210af39/src/core/contracts/AlgebraFactory.sol#L77

constructor(address _poolDeployer, address _vaultAddress) {
    owner = msg.sender;
    emit Owner(msg.sender);

    poolDeployer = _poolDeployer;
    vaultAddress = _vaultAddress;
  }

https://github.com/code-423n4/2022-09-quickswap/blob/15ea643c85ed936a92d2676a7aabf739b210af39/src/core/contracts/AlgebraFactory.sol#L50

Recommended Mitigation Steps

add zero address check for _owner, _poolDeployer, _vaultAddress