The Manager.setProtocolPremium requires that _token[i].length == _premium[i].length for each i.
This is checked in the last setProtocolPremiumAndTokenPrice but not in setProtocolPremium(bytes32[] memory _protocol, IERC20[][] memory _token, uint256[][] memory _premium) at line ~94.
Recommendation
Check require(_token[i].length == _premium[i].length, 'LENGTH_4'); in this function as well.
Handle
cmichel
Vulnerability details
The
Manager.setProtocolPremium
requires that_token[i].length == _premium[i].length
for eachi
. This is checked in the lastsetProtocolPremiumAndTokenPrice
but not insetProtocolPremium(bytes32[] memory _protocol, IERC20[][] memory _token, uint256[][] memory _premium)
at line ~94.Recommendation
Check
require(_token[i].length == _premium[i].length, 'LENGTH_4');
in this function as well.