makerdao / univ2-lp-oracle

GNU Affero General Public License v3.0
23 stars 13 forks source link

CVF-58: Fix overflow from cast to uint128 #47

Closed WilfredTA closed 3 years ago

WilfredTA commented 3 years ago

Adding a requires to prevent overflow from casting to uint128. While this solves the overflow risk, I think there is a better solution but it's outside the scope of addressing this feedback. Will create a separate PR or issue for discussion, since it involves other dependencies.

kmbarry1 commented 3 years ago

We should probably consider widening quote, but that can be a different PR.

WilfredTA commented 3 years ago

We should probably consider widening quote, but that can be a different PR.

Yep, that's what I was alluding to with "Better solution outside the scope" of current PR.

kmbarry1 commented 3 years ago

Do you plan to address the comments I made?