Lack of input validation
Description
The following functions lack input validation.
The
addSupportedAssetfunction lacks a check that the_assetsis not zero address.The
addSupportedAssetfunction lacks a check that_assethas been already added.The
removeSupportedAssetfunction lacks a check that the_supportedAssetscontains the_assetaddress.
Impact
If important input parameters are not checked, it can result in functionality issues and unnecessary gas usage and can even be the root cause of critical problems. It is crucial to properly validate input parameters to ensure the correct execution of a function and to prevent unintended consequences.
Recommendations
Consider adding require statements and necessary checks to the above functions.
Remediation
Ethena Labs acknowledged this finding and implemented a fix in commit df19a0d3↗.