Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QA Report #134

Open
code423n4 opened this issue May 15, 2022 · 1 comment
Open

QA Report #134

code423n4 opened this issue May 15, 2022 · 1 comment
Labels
bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax

Comments

@code423n4
Copy link
Contributor

Here are QA reports per file.


CollateralAdapter.sol

[QA-1] address(0) checks are mising at addCollateralAsset function

addCollateralAsset function does not have any address(0) check.

https://github.com/code-423n4/2022-05-sturdy/blob/main/smart-contracts/CollateralAdapter.sol#L43-L46

function addCollateralAsset(
    address _externalAsset,
    address _internalAsset,
    address _acceptVault
) external onlyAdmin {
    _assetToVaults[_externalAsset] = _acceptVault;
    _collateralAssets[_externalAsset] = _internalAsset;
}

addCollateralAsset function is callable only by admin, but setting proper address(0) checks would be useful.


LidoVault.sol

[QA-2] withdrawOnLiquidation function is missing

https://github.com/code-423n4/2022-05-sturdy/blob/main/smart-contracts/LidoVault.sol#L18

LidoVault.sol does not override the withdrawOnLiquidation function. If not having this functionality on LidoVault is expected, LidoVault.sol can implement the withdrawOnLiquidation function which only has revert() or other appropriate logic to specify that LidoVault does not have this functionality.

@code423n4 code423n4 added bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax labels May 15, 2022
code423n4 added a commit that referenced this issue May 15, 2022
@HickupHH3
Copy link
Collaborator

both NC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Projects
None yet
Development

No branches or pull requests

2 participants