Skip to content

🎚 Peripheral smart contracts for interacting with Uniswap V2

License

Notifications You must be signed in to change notification settings

Roger-Wu/uniswap-v2-liquidity-adder-contract

 
 

Repository files navigation

Uniswap V2 Liquidity Adder

This tool allows you to add tokens or ETH to a Uniswap V2 pair in any proportion.

DApp

https://uniswap-helper.netlify.app/#/add

Introduction

This is not an official tool.

This tool allows you to add tokens or ETH to a Uniswap V2 pair in any proportion.

For example, no matter how much ETH and DAI are in the pool of ETH-DAI pair,
you can still add any amount of ETH and DAI to the pool in one transaction, such as [1 ETH + 100 DAI] or [1 ETH + 0 DAI] or [0 ETH + 100 DAI].
Behind the scenes, the contract swaps part of your token (or ETH) to the other token (or ETH) and then adds them all to the pair.
The amount to swap is calculated with this formula to maximize the funds added into the pool.

The contract has been tested but not fully audited;
however, if there's a serious flaw in our contract,
Uniswap's Router will revert the transaction,
ensuring that your funds are safe.
Nevertheless, use at your own risk.

We don't charge an additional fee because we don't want to waste more gas charging ourselves. 😄

Local Development

The following assumes the use of node@>=10.

Install Dependencies

yarn

Compile Contracts

yarn compile

Run Tests

yarn test

About

🎚 Peripheral smart contracts for interacting with Uniswap V2

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Solidity 79.2%
  • TypeScript 20.8%