Unnecessary gas consumption: Lack a check for zero input
redeem, lendToken, collectToken and other functions lack a zero-amount check, allowing zero-input calls that consume gas without effect.
Description
The redeem, lendToken, collectToken and more functions lack a check for zero input, which allows them to be executed with an amount of zero, leading to unnecessary gas consumption without any meaningful transaction effect.
While the functions have other checks, they do not verify that the amount parameter is greater than zero before proceeding.
Impact
If called with an amount of zero, the function unnecessarily consumes gas for validation checks and state modifications. This behavior does not lead to direct financial loss but can result in wasted gas if abused or called erroneously with zero. It also poses potential disruption or inconvenience through minor network load increase due to such calls.
Recommendation
To prevent unnecessary gas usage and ensure only meaningful transactions are processed, the function should include a check to verify that the amount is greater than zero:
require(amount != 0, "Amount must be greater than zero");

