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

Slippage for add liquidity #7

Merged
merged 1 commit into from
Feb 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/GeckoV2Migrator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,12 @@ contract GeckoV2Migrator is Ownable {

IERC20(geckoV2).approve(address(uniswapRouter), v2Balance);
uniswapRouter.addLiquidityETH{value: ethBalance}(
geckoV2, // ERC20 token address
v2Balance, // All ERC20 tokens held by the contract
0, // Accept any amount of tokens (minToken)
0, // Accept any amount of ETH (minETH)
address(0), // NULL address receives the LP tokens
block.timestamp // Deadline
geckoV2, // ERC20 token address
v2Balance, // All ERC20 tokens held by the contract
v2Balance * 995 / 1000, // Min of 99.5% of the tokens will be added to the pool
ethBalance * 995 / 1000, // Min of 99.5% of the ETH will be added to the pool
address(0), // NULL address receives the LP tokens
block.timestamp // Deadline
);
}

Expand Down