This repository was archived by the owner on Jun 24, 2022. It is now read-only.
Rounding issue on Claim when claim for yourself #2425
Labels
app:CowSwap
CowSwap app
Bug
Something isn't working
Claim
Issues related to 'Claim' feature
Low
Severity indicator for defects. It won't cause any major break-down of the system
Reported in https://gnosisinc.slack.com/archives/CSGLUC1BN/p1644938072913749
I've noticed a rounding bug in the claim transaction for paid claims when claiming for yourself: if selecting max, the executed amount is not the maximum claimed amount by the user, but the nearest rounded float approximation of that amount.
This means that some users will receive (and pay) negligibly less than the maximum, but also some users might see the transaction reverting if the rounding makes the amount go beyond the maximum allowed. Somewhat surprisingly this doesn't happen when claiming for other addresses.
Reproduce: use the impersonator wallet connect wrapper and impersonate address
0x56eB62E08FADBD1280fA57656C3Ea456864bD192
. Try to claim its GNO claim and look at the generated calldata. The theoretical max is0x23cf3f9ccf107d0e9c
but the claimed value is0x23cf3f9ccf107d0955
. Both correspond to660.5698698823669
vCOW.The text was updated successfully, but these errors were encountered: