Closed code423n4 closed 1 year ago
https://github.com/code-423n4/2023-04-eigenlayer/blob/main/src/contracts/libraries/BeaconChainProofs.sol#L179
Precision loss occurs when division is carried out before multiplication, related with possibility of getting wrong balance of validator. Wrong balance can affect indexing of validator.
Manual Review
Recommendation is made for avoiding divison before multiplication and always performs division in last to maintain precision.
Math
AI spam.
0xSorryNotSorry marked the issue as low quality report
GalloDaSballo marked the issue as unsatisfactory: Invalid
Lines of code
https://github.com/code-423n4/2023-04-eigenlayer/blob/main/src/contracts/libraries/BeaconChainProofs.sol#L179
Vulnerability details
Impact
Precision loss occurs when division is carried out before multiplication, related with possibility of getting wrong balance of validator. Wrong balance can affect indexing of validator.
Proof of Concept
https://github.com/code-423n4/2023-04-eigenlayer/blob/main/src/contracts/libraries/BeaconChainProofs.sol#L179
Tools Used
Manual Review
Recommended Mitigation Steps
Recommendation is made for avoiding divison before multiplication and always performs division in last to maintain precision.
Assessed type
Math