Summary:
For example the function getAccountsWithActivePositions
is designed to return an array of account IDs with active positions within a specified range. However, it does not include a return statement, leading to the caller not receiving the expected data. This omission can cause significant issues in any system relying on this function to retrieve account information.
Vulnerability Details:
Cause: For example the function getAccountsWithActivePositions
allocates an array and populates it with account IDs but does not return the array to the caller.
Instance:
Impact:
The lack of a return statement prevents the function from fulfilling its intended purpose, leading to:
Functionality Issues: Any external calls to getAccountsWithActivePositions
will not receive the expected data, causing malfunctions in dependent contracts or systems.
Operational Disruptions: Systems relying on this function to retrieve active positions for further processing or decision-making will encounter failures or incorrect behavior.
Tools Used:
Manual Review
Recommendations:
Add Return Statement: Include a return statement at the end of the function.
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.