Summary:
This report outlines low-severity findings in the StrategyArb.sol
contract. While these issues do not pose critical risks, addressing them will enhance the contract's transparency, efficiency, and adherence to best practices. The findings focus on missing event emissions and validation checks, which could lead to inefficiencies, wasted gas, and challenges in off-chain monitoring. Each issue is detailed below, along with recommended fixes to improve the contract's overall robustness.
Description:
The functions setRouter
, _deployFunds
, and claimAndSwap
lack event emissions to log important state changes. This reduces the ability of external systems and users to track and monitor the contract's operations effectively.
Affected Code:#L42-L45, L60-L64, L73-L80
Recommendation:
Add events to log critical state changes. Example:
_amountClaim
and _minOut
Must Be Greater Than Zero in claimAndSwap
Description:
The claimAndSwap
function does not validate the _amountClaim
and _minOut
parameters, allowing execution with zero values, leading to wasted gas or unintended behavior.
Affected Code:#L73-L80
Recommendation:
Add validation checks to ensure inputs are greater than zero:
_amount
Must Be Greater Than Zero in _freeFunds
Description:
The _freeFunds
function does not validate the _amount
parameter, allowing execution with zero values, causing unnecessary gas waste and inefficiency.
Affected Code:#L115-L122
Recommendation:
Add a validation check for _amount
:
_amount
in _deployFunds
Description:
The _deployFunds
function does not validate that the _amount
parameter is greater than zero, potentially leading to unnecessary operations with zero values and gas waste.
Affected Code:#L60-L64
Recommendation:
Add a validation check for _amount
:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.