Skip to content
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

Closed
elena-zh opened this issue Feb 15, 2022 · 1 comment
Closed

Rounding issue on Claim when claim for yourself #2425

elena-zh opened this issue Feb 15, 2022 · 1 comment
Assignees
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

Comments

@elena-zh
Copy link

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 is 0x23cf3f9ccf107d0e9c but the claimed value is 0x23cf3f9ccf107d0955. Both correspond to 660.5698698823669 vCOW.

@elena-zh elena-zh added app:CowSwap CowSwap app Claim Issues related to 'Claim' feature Bug Something isn't working Low Severity indicator for defects. It won't cause any major break-down of the system labels Feb 15, 2022
ramirotw pushed a commit that referenced this issue Feb 18, 2022
Bumps [@uniswap/token-lists](https://github.com/Uniswap/token-lists) from 1.0.0-beta.25 to 1.0.0-beta.26.
- [Release notes](https://github.com/Uniswap/token-lists/releases)
- [Commits](Uniswap/token-lists@v1.0.0-beta.25...v1.0.0-beta.26)

---
updated-dependencies:
- dependency-name: "@uniswap/token-lists"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@anxolin
Copy link
Contributor

anxolin commented Mar 2, 2022

Not relevant anymore, just the part of post-mortem @alfetopito is looking into, just to see if theres a math problem, or this comes from the python script and we didn't take into account "not exact" vCOW calculations

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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
Projects
None yet
Development

No branches or pull requests

3 participants