Assessment reports>SSI Protocol>Low findings>The ,getOrderHashs, function returns the array growing indefinitely
Category: Code Maturity

The getOrderHashs function returns the array growing indefinitely

Low Impact
Low Severity
Low Likelihood

Description

The following getOrderHashs function returns the list of all order hashes stored in the contract:

function getOrderHashs() external view returns (bytes32[] memory orderHashs_) {
    orderHashs_ = new bytes32[](orderHashs.length());
    for (uint i = 0; i < orderHashs.length(); i++) {
        orderHashs_[i] = orderHashs.at(i);
    }
}

However, the list of order hashes grows indefinitely, posing a possibility that this function reverts after the number of order hashes exceeds some threshold determined by the gas.

Impact

The getOrderHashs function may revert in the future, assuming the list of order hashes constantly grows. Although this function is not used by other contracts in the scope of this audit and therefore this won't affect the on-chain business logic, off-chain infrastructure depending on this function may be affected by this finding.

Recommendations

Consider removing the function if possible.

Remediation

Zellic © 2025Back to top ↑