Summary
The MarketMakingEngineConfigurationBranch.configureDepositAndRedeemFees function verifies the array lengths and throws an error in case of mismatch. The problem is that the massage will contain accepted lengths instead of incorrect.
Vulnerability Details
function configureDepositAndRedeemFees(
uint128[] calldata vaultsIds,
uint128[] calldata depositFees,
uint128[] calldata redeemFees
)
external
onlyOwner
{
>> if (vaultsIds.length != depositFees.length) {
revert Errors.ArrayLengthMismatch(vaultsIds.length, depositFees.length);
}
if (depositFees.length != redeemFees.length) {
>> revert Errors.ArrayLengthMismatch(vaultsIds.length, depositFees.length);
}
Impact
Unintended behavior
Tools used
Manual Review
Recommendations
Consider including relevant lengths in the error message:
// verify the array length
if (depositFees.length != redeemFees.length) {
- revert Errors.ArrayLengthMismatch(vaultsIds.length, depositFees.length);
+ revert Errors.ArrayLengthMismatch(redeemFees.length, depositFees.length);
}