Lack of input validation
Description
The following functions lack input validation.
The
addSupportedAsset
function lacks a check that the_assets
is not zero address.The
addSupportedAsset
function lacks a check that_asset
has been already added.The
removeSupportedAsset
function lacks a check that the_supportedAssets
contains the_asset
address.
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↗.