0xdavinchee / farmer

Farmer allows you to automate maximization of your yield farming on multiple networks by auto compounding your LP positions to achieve higher APY.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contributors Forks Stargazers Issues MIT License


Logo

Farmer

A collection of smart contracts to aid in my deep dive into becoming a farmer.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact
  7. Acknowledgements

About The Project

A collection of farming contracts which will be used to optimize yield.

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

You just need to have npm to use this project.

  • npm
    npm install npm@latest -g

You will also need a few .env variables for things to work properly:

  • INFURA_API_KEY: used for deployment and mainnet forking.
  • TEST_ACCOUNT: private key of a test account you will use to deploy the contracts for testing/mainnet.
  • WHALE_TEST_ADDRESS: public address of an account (preferably someone with a good amount of funds) which you can test off a fork.
  • MINI_CHEF_V2_ADDRESS: 0x0769fd68dFb93167989C6f7254cd0D766Fb2841F (on Polygon at least)

Installation

  1. Clone the repo
    git clone https://github.com/0xdavinchee/farmer.git
  2. Install NPM packages
    yarn install

Usage

  1. To use this without a frontend, you will to know how to interact with contracts using the hardhat console: https://ethereum.stackexchange.com/questions/93657/how-to-interact-with-the-functions-of-my-smart-contract-in-hardhat.
  2. You also have the option of deploying and then verifying the contract and interacting with it through etherscan/polygonscan/etc.
  3. To run tests, you will have to do this on a fork of mainnet as I don't believe any of the testnets have farms. The forking config is already set up in hardhat.config.ts. The variables you will change in farmer-tests.test.ts are: chainId, pid, independentAddress, dependentAddress, independentTokenInfo, dependentTokenInfo, rewardTokenA and rewardTokenB. This will allow you to test the SushiFarmer contract on other chains, with other farms and different reward types. Use the command yarn test --network localhost.

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

0xdavinchee - @0xdavinchee - 0xdavinchee@gmail.com

Project Link: https://github.com/0xdavinchee/farmer

Acknowledgements

About

Farmer allows you to automate maximization of your yield farming on multiple networks by auto compounding your LP positions to achieve higher APY.

License:MIT License


Languages

Language:TypeScript 80.8%Language:Solidity 15.3%Language:CSS 2.5%Language:HTML 1.4%