code-423n4 / 2021-10-covalent-findings

0 stars 0 forks source link

Inconsistent definition of integer sizes in function `getDelegatorDetails()` #70

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

pmerkleplant

Vulnerability details

Impact

The function getDelegatorDetails() declares three arrays of type uint (alias for uint256).

The variables saved in the arrays are of type uint128.

See lines 451-453.

The suggestion is to be consistent with the integer sizes.

GalloDaSballo commented 2 years ago

Agree with the finding, I do not believe there will be any gas savings as memory is stored in 32bits chunks, that said, it does make the code more consistent