it is possible that the wrapper in setupAsset() is not set, this will cause the setup to malfunction for native assets #267
Labels
bug
Something isn't working
duplicate
This issue or pull request already exists
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
resolved
Finding has been patched by sponsor (sponsor pls link to PR containing fix)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Lines of code
https://github.com/code-423n4/2022-06-connext/blob/b4532655071566b33c41eac46e75be29b4a381ed/contracts/contracts/core/connext/facets/AssetFacet.sol#L143
Vulnerability details
Issue: there is a possibility for the wrapper in setupAsset() to not be set. This is medium because there are many interactions that rely on wrapper being set correctly which might cause malfunction in the protocol.
Consequences: this will cause the setup to malfunction for native assets due to the fact that the wrapper will point to address(0).
Affected Code
Recommended Mitigation Steps
Consider adding a check for the wrapper to not be address(0) when _adoptedAssetId is address(0).
The text was updated successfully, but these errors were encountered: