Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audit Fixes: Uniswap V2 DoS #13

Merged
merged 27 commits into from
Aug 14, 2024
Merged

Conversation

0xJem
Copy link
Collaborator

@0xJem 0xJem commented Aug 1, 2024

Mitigates a denial-of-service attack pre-settlement where an attacker can donate the quote token to the pool and prevent settlement.

This fix does the following:

  • Performs a low-level swap on the pool to adjust the reserves to be at the auction price
  • Provide the remaining quote and base tokens (in proportion) as liquidity

@0xJem 0xJem self-assigned this Aug 1, 2024
@0xJem
Copy link
Collaborator Author

0xJem commented Aug 2, 2024

This still has some fuzz tests failing, mainly due to rounding issues

@0xJem 0xJem marked this pull request as ready for review August 14, 2024 14:00
@0xJem
Copy link
Collaborator Author

0xJem commented Aug 14, 2024

CI is failing due to linting. All tests pass, however.

@0xJem 0xJem merged commit d0499ac into uniswap-dtl-fixes Aug 14, 2024
1 check failed
@0xJem 0xJem deleted the uniswap-v2-donate-and-sync branch August 14, 2024 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants