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 #183

Open
code423n4 opened this issue Jun 19, 2022 · 3 comments
Open

QA Report #183

code423n4 opened this issue Jun 19, 2022 · 3 comments
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

  1. unused local variable
    PortalFacet.repayAavePortal() - adopted variable in https://github.com/code-423n4/2022-06-connext/blob/main/contracts/contracts/core/connext/facets/PortalFacet.sol#L98

  2. Unused function parameter
    PortalFacet.repayAavePortalFor() - _router param in https://github.com/code-423n4/2022-06-connext/blob/main/contracts/contracts/core/connext/facets/PortalFacet.sol#L`26

  3. dev notes documents that The router must be approved for portal and with enough liquidity, and must be the caller of this function.However a require check is missing to ensure msg.sender is the router - https://github.com/code-423n4/2022-06-connext/blob/main/contracts/contracts/core/connext/facets/PortalFacet.sol#L80

  4. _local variable used instead of adopted for _backloan() call in https://github.com/code-423n4/2022-06-connext/blob/main/contracts/contracts/core/connext/facets/PortalFacet.sol#L112

  5. SponsorVault.sol contract deployment could revert due to missing zero address check
    The construction function in SponsorVault.sol calls _setConnext() during deployment. If the _connext address is mistakenly inputed as 0, then the deployment of the contract will revert as seen in the require check in _setConnext()

  6. Missing zero value check
    SponsorVault.setRate() - missing zero value check for _rate param - https://github.com/code-423n4/2022-06-connext/blob/main/contracts/contracts/core/connext/facets/PortalFacet.sol#L80

  7. Missing zero address check
    SponsorVault.setGasTokenOracle() - https://github.com/code-423n4/2022-06-connext/blob/main/contracts/contracts/core/connext/helpers/SponsorVault.sol#L168

RelayerFacet.addRelayer() - https://github.com/code-423n4/2022-06-connext/blob/main/contracts/contracts/core/connext/facets/RelayerFacet.sol#L101

  1. Unused parameter
    BridgeFacet.handle() - _nonce param in https://github.com/code-423n4/2022-06-connext/blob/main/contracts/contracts/core/connext/facets/BridgeFacet.sol#L391
@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 Jun 19, 2022
code423n4 added a commit that referenced this issue Jun 19, 2022
@jakekidd
Copy link
Collaborator

jakekidd commented Jul 2, 2022

8 is invalid, it is an interface implementation, unused parameter is required

5+6+7 should be one issue

4 is level 2: Med Risk issue! a good spot (something we also spotted/have resolved since)

@0xleastwood
Copy link
Collaborator

0xleastwood commented Aug 16, 2022

no. 4 is a duplicate of #103, a more severe issue, but I won't upgrade it because the impact is not detailed in any way.

@0xleastwood
Copy link
Collaborator

Although, I'll give you kudos for some of these findings. great work!

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

3 participants