Omniscia Beanstalk Audit

InitHotFix4 Static Analysis Findings

InitHotFix4 Static Analysis Findings

PRC-01S: Illegible Value Literal

TypeSeverityLocation
Code StyleInitHotFix4.sol:L30

Description:

The linked value literal is meant to represent a very large number but does so illegibly.

Example:

protocol/contracts/farm/init/InitHotFix4.sol
20function init() external {
21 // Migrate farmable Beans to Legacy V2 system
22 s.v2SIBeans = s.si.beans;
23 s.si.beans = 0;
24
25 // Remove all exiting farmable Stalk
26 s.s.stalk = s.s.stalk.sub(s.si.stalk);
27 s.si.stalk = 0;
28
29 // Increment unclaimed Roots to total for previous misallocation
30 s.unclaimedRoots = s.unclaimedRoots.add(11941504984220113756780626858);
31}

Recommendation:

We advise the special underscore (_) character to be utilised as a separator per thousand units to better represent the linked value (i.e. 10000 becomes 10_000).

Alleviation:

The value literal was properly updated to contain the underscore separator character alleviating this exhibit.