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

Checking input amount when burning #1006

Open
TAnNbR opened this issue Oct 8, 2024 · 0 comments
Open

Checking input amount when burning #1006

TAnNbR opened this issue Oct 8, 2024 · 0 comments

Comments

@TAnNbR
Copy link

TAnNbR commented Oct 8, 2024

The input amount must less than the amount that a LP have in a position, it's apparently here's no logic error in the code because LiquidityMath.addLiquidity(a,b) will make sure a>b when a-b due to solidity's OverFlow checking, but if adding a specific checking such as if (inputAmount < position.liquidity) and a clear revert like notEnoughLiquidity is more clear and meaningful instead of reverting by solidity's OverFlow checking.This is my personal opinion, which may not necessarily be correct

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

No branches or pull requests

2 participants
@TAnNbR and others