Insufficient test suite code coverage
Description
Several functions in the smart contract are not covered by any unit or integration tests, to the best of our knowledge. We examined the tests ERC20Farmable.js
and FarmingPool.js
. The following functions do not have test coverage:
ERC20Farmable.sol
farmBalanceOf
userIsFarming
userFarmsCount
userFarmsAt
quitAll
claimAll
updateCheckpoint
Because correctness is so critically important when developing smart contracts, we always recommend that projects strive for 100% code coverage. Testing is an essential part of the software development lifecycle. No matter how simple a function may be, untested code is always prone to bugs.
Recommendations
Expand the test suite so that all functions are covered by unit or integration tests.
Remediation
The issue has been acknowledged by 1inch, and they will add additional tests.