GithubHelp home page GithubHelp logo

dhecloud / platypus_compounder Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 16 KB

This repository helps you to compound $PTP from the liquidity pools on platypus.finance into a stablecoin of your choice.

Python 100.00%

platypus_compounder's Introduction

This repository helps you to compound $PTP from the liquidity pools on platypus.finance into a stablecoin of your choice. Please read the disclaimer before proceeding.

Disclaimer

This repository was made so that i wouldn't have to manually compound my $ptp everyday. It's a learning experience for me too. This exposes your wallet's private key locally in the config file. Use this repository only if you understand what you are doing and at your own risk! I will not be responsible for any potential losses.

What this repository does in specific terms

  1. Claims your vePTP if the option is turned on in config.py.
  2. Claims all your reward $PTP from the pools.
  3. Market sells all your claimed $PTP to the stablecoin defined in config.py via trader joe. There is no slippage used (as im not using an oracle).
  4. Then stakes available stable coins in your wallet into the pools. You can indicate which stablecoins to stake in config.py.

This repository assumes all tokens are all already approved. This repository does NOT take care of token approvals. If you are unsure how to perform token approvals, simply just go through the whole staking process once for your stablecoins on platypus.finance.

Prerequisites

  1. python>3.8
  2. pip install web3

Setting Up

  1. git clone [email protected]:dhecloud/platypus_compounder.git
  2. cd ptp_compounder
  3. Modify/change the config.py parameters using your text editor
  4. After setting up, run nohup python compound_ptp.py & for the python script to run in the background. Alternatively, you can use screen instead of the nohup. Depends on your preference.

Config parameters

  1. ADDR - your wallet public address
  2. PRIVATE_KEY - your wallet private key. IMPORTANT!
  3. USDT - Stake all USDT.e in your wallet into the USDT.e pool
  4. USDC - Stake all USDC.e in your wallet into the USDC.e pool
  5. DAI - Stake all DAI.e in your wallet into the DAI.e pool
  6. MIM - Stake all MIM in your wallet into the MIM pool
  7. TO - coin that your this script will sell to on trader joe. options: 'usdte', 'usdce', 'daie', 'mim'
  8. COMPOUND_FREQ- time (seconds) between each compounding run. default: 86400 (1 day)
  9. TX_INTERVALS - time (seconds) between each transaction. > 30 is best just in case avax is congested. default: 30
  10. CLAIM_VEPTP - Claim $VEPTP before compounding? 1 if yes, 0 if no

Support me

If this repository has helped you in any way, and if you would like to support me, you can send me any crypto (preferably stables) on any EVM chain at 0xda929736e4b407F16d2FAB648c87fdF71bf15CA9 or sending me UST at poohbear.ust

platypus_compounder's People

Contributors

dhecloud avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.