Assessment reports>1inch Farming>Low findings>Internal discrepancy between function access control
Category: Code Maturity

Internal discrepancy between function access control

Low Severity
Informational Impact
N/A Likelihood

Description

The functions _updateCheckpoint in Farm and FarmingPool both have the private access control modifier. However, when passed to the startFarming function as a callback, the parameter type is labeled as internal.

Impact

A manual review found no security issues with the current implementation. However, while there is no immediate impact, inconsistencies like these can make the code confusing and difficult to reason about, which could lead to future bugs. Since there are plans to eventually merge the contracts into OpenZeppelin, a widespread community library, the code should be as mature as possible.

Recommendations

Modify the function _updateCheckpoint to be an internal function if this was not a deliberate design decision.

Remediation

The issue was fixed by 1inch in commit e513e429.

Zellic © 2024Back to top ↑