code-423n4 / 2021-08-gravitybridge-findings

1 stars 0 forks source link

Regular arithmetic operations when calculating cumulativePower #38

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

pauliax

Vulnerability details

Impact

When calculating cumulativePower regular arithmetic operations (not SafeMath) are used. In theory, this can result in value overflows, however, in practice, this depends on the honesty of those that can assign powers (e.g. when deploying or updating valset).

Recommended Mitigation Steps

Make sure that you understand this risk and consider using SafeMath operations there.

jkilpatr commented 2 years ago

duplicate of #60