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

Test try withdrawing too much #29

Merged
merged 3 commits into from
Jul 12, 2024
Merged

Conversation

woocash2
Copy link
Contributor

@woocash2 woocash2 commented Jul 12, 2024

Description

Try exploiting the contract by adding large liquidity, and then split the withdrawal into ~100 smaller withdrawals, hoping that rounding errors when computing the LPT to burn will burn not enough tokens, and that after withdrawing the whole added amount, there will still be some small amount of LPT to use for another withdrawal.

Test passed - no exploit succeeded.

Note

Also observed: If we increase the burned shares by 1, as in curve.fi, the user is not able to withdraw the whole deposited amount. Some tiny amount of them will be locked forever.

@JanKuczma JanKuczma merged commit 4be58d5 into drink-tests Jul 12, 2024
1 check passed
@JanKuczma JanKuczma deleted the drink-test-try-exploit branch July 12, 2024 11:06
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