-
Notifications
You must be signed in to change notification settings - Fork 39
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
Izumi lp integration #402
base: main
Are you sure you want to change the base?
Izumi lp integration #402
Conversation
amount1Min | ||
); | ||
|
||
// refund unused tokens |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if token0 & token1 are not WETH, we need to refund ETH to user when msg.value > 0.
require(token0 == weth || token1 == weth, Errors.INVALID_AMOUNT); | ||
token0IsETH = (token0 == weth); | ||
token1IsETH = (token1 == weth); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are many duplicated code here, I think we can declare variable to represent ethToken, ethAmount
} else { | ||
IERC20(token0).safeTransfer(payer, refund0); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here I think we can remove duplicated code
I think upgrade script should also be fixed by adding Izumi LP |
@@ -25,6 +25,7 @@ enum XTokenType { | |||
NTokenOtherdeed, | |||
NTokenStakefish, | |||
NTokenChromieSquiggle, | |||
NTokenIZUMILp, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will break PTokenStKSM which is deployed on moonbeam
Security Checklist
Make sure to think about each of these exploits in this PR.