Skip to content

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