code-423n4 / 2021-04-basedloans-findings

0 stars 1 forks source link

Alphabetical order not complied with (contrary to the comments) #3

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

gpersoon

Vulnerability details

Impact

The enum FailureInfo in ErrorReporter.sol has a comment that the values are sorted in alphabetical order. However they are not in alphabetical order

Proof of Concept

ErrorReporter.sol: enum FailureInfo { ACCEPT_ADMIN_PENDING_ADMIN_CHECK, ... BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED, ... TRANSFER_TOO_MUCH, ADD_RESERVES_ACCRUE_INTEREST_FAILED, ADD_RESERVES_FRESH_CHECK, ADD_RESERVES_TRANSFER_IN_NOT_POSSIBLE }

Tools Used

Editor

Recommended Mitigation Steps

Sort the enum values in alphabetical order or remove the comment.

ghoul-sol commented 3 years ago

Added to backlog, thanks!