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

Enable QUICK conversion on add/remove liquidity #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

paulbarclay
Copy link

Enable QuickConverter to receive requests from approved contracts (not just tx.origin)
Add converter.convert() to the end of addLiquidity, addLiquidityETH, and removeLiquidity

This hasn't been tested. Other than adding the conversion step, the router code should be identical, so it's low risk. I have not audited this for potential reentrancy attacks, but I think it's safe because the added code can only function if there's a uni-v2 balance, and the uni-v2 balance can only be added by other contracts.

It's possible this can enable a flash loan attack, though I don't think that can happen because you can't add anything between the mint/burn and the convert steps are atomic, and nothing can be inserted between them

Enable QuickConverter to receive requests from approved contracts (not just tx.origin)
Add converter.convert() to the end of addLiquidity, addLiquidityETH, and removeLiquidity
@Cosxxxx
Copy link

Cosxxxx commented Feb 9, 2022

Hhh

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