Omniscia Beanstalk Audit

Bean Code Style Findings

Bean Code Style Findings

BEA-01C: Deprecated Representation Style

TypeSeverityLocation
Code StyleBean.sol:L30

Description:

The linked code contains the representation of the maximum value of a uint256 in the uint256(-1) format which has been officially deprecated and no longer compiles in recent pragma versions.

Example:

protocol/contracts/Bean.sol
30if (allowance(sender, _msgSender()) != uint256(-1)) {

Recommendation:

We advise the type(uint256).max standardised representational style to be utilised instead.

Alleviation:

The literal representation was correctly updated to type(uint256).max standardizing the codebase.