Title : Missing input validation for upper bound of values in TokenManager.sol functions
Impact
The below two state variables are defined as uint256, but they should never be more than 100% or a defined max value.
uint256 _equilibriumFee,
uint256 _maxFee
There is no check for an upper bound of 100% value, which may cause calculation errors, if set incorrectly.
Proof of Concept
Contract : TokenManager.sol
Functions : changeFee(...) and addSupportedToken(...)
Line : 44 and 84 respectively
Recommended Mitigation Steps
Define max values for these two state variables and add require statement to check these upper bounds in the two function listed above
https://github.com/code-423n4/2022-03-biconomy-findings/issues/165#issuecomment-1121112286
Warden: hubble
Details Issue#3
Title : Missing input validation for upper bound of values in TokenManager.sol functions
Impact
The below two state variables are defined as uint256, but they should never be more than 100% or a defined max value. uint256 _equilibriumFee, uint256 _maxFee
There is no check for an upper bound of 100% value, which may cause calculation errors, if set incorrectly.
Proof of Concept
Contract : TokenManager.sol Functions : changeFee(...) and addSupportedToken(...) Line : 44 and 84 respectively
Recommended Mitigation Steps
Define max values for these two state variables and add require statement to check these upper bounds in the two function listed above