Git Product home page Git Product logo

forkharvester's Introduction

forkharvester


This is a Tomb fork harvester. Nothing here is financial advice, of course.

It's very simple right now:

  1. Check to see if we have pending masonry rewards and we can claim. If so, do it. TODO: Make LPs.
  2. If the pending LP rewards are > 100 USDC, harvest each.
  3. After harvesting, if we are taking profits, sell to USDC and then use anyswap router to send to the PROFIT_WALLET on Polygon (you can configure the chain if you want to go somewhere else). I have my PROFIT_WALLET set to my Crypto.com wallet address.
  4. If we are not taking profits, stake to the masonry.

Quickstart:

  1. pip install -r requirements.txt
  2. Set up your environment variables (you can use a .env file for this):
ADDRESS="WALLET_ADDRESS"
PROFIT_WALLET="ADDRESS OF THE WALLET YOU WANT TO TAKE PROFITS TO"
PRIVATE_KEY="YOUR WALLET'S PRIVATE KEY -- MAKE SURE TO KEEP THIS SAFE!!!"
PROVIDER='https://rpc.ankr.com/fantom'
  1. If you want to change the forks you're harvesting from, look at the FORKS dictionary in forkharvester.py and change it to suit your needs.
  2. Run the script! python forkharvester.py -h to learn about the command line options:
usage: forkharvester.py [-h] [--take-profits] [--pool-minimum POOL_MINIMUM] [--profit-wallet PROFIT_WALLET] [--profit-chain PROFIT_CHAIN]

Harvest your tomb fork yields!

optional arguments:
  -h, --help            show this help message and exit
  --take-profits        Passing this flag will not stake the yield in the masonry, but instead sell to USDC.
  --pool-minimum POOL_MINIMUM
                        The minimum amount of USDC value in the pool in order to harvest.
  --profit-wallet PROFIT_WALLET
                        Use the provided profit wallet address instead of using the $PROFIT_WALLET env var
  --profit-chain PROFIT_CHAIN
                        Bridge to the provided chain id. Default is 137 (Polygon).
  1. You could set this up as a cron job to run as often as you'd like, or just run it once or twice a day.

forkharvester's People

Contributors

hekman-eth avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.