Skip to content

Commit

Permalink
Added APR plotting functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
dehidehidehi authored and dehidehidehi committed Mar 17, 2022
1 parent 069447f commit ee56651
Show file tree
Hide file tree
Showing 50 changed files with 1,272 additions and 1,123 deletions.
151 changes: 0 additions & 151 deletions output/impermax_7_days_2021-11-15T14-42.csv

This file was deleted.

153 changes: 0 additions & 153 deletions output/impermax_7_days_2021-11-18T13-51.csv

This file was deleted.

157 changes: 0 additions & 157 deletions output/impermax_7_days_2021-11-20T00-58.csv

This file was deleted.

157 changes: 0 additions & 157 deletions output/impermax_7_days_2021-11-21T17-00.csv

This file was deleted.

3 changes: 3 additions & 0 deletions requirements-analysis.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
matplotlib
pandas
scipy
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pathlib import Path

from setuptools import setup, find_packages


Expand Down
47 changes: 0 additions & 47 deletions src/impermax/_csv_updater.py

This file was deleted.

File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions src/impermax/common/enums/contracts/imx_enums.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""
Impermax contracts
"""
from src.impermax.common.extended_enum import ExtendedEnum


class ImpermaxPairs(str, ExtendedEnum):
ETHEREUM_IMX_ETH_UNISWAP = "0xa00d47b4b304792eb07b09233467b690db847c91"
POLYGON_IMX_WETH_QUICKSWAP = "0x8ce3bf56767dd87e87487f3fae63e557b821ea32"
ARBITRUM_IMX_ETH_SUSHISWAP = "0xb7e5e74b52b9ada1042594cfd8abbdee506cc6c5"
ARBITRUM_IMX_ETH_SWAPR = "0xcc5c1540683aff992201d8922df44898e1cc9806"
FANTOM_IMX_FTM_SOLIDLY = "0x877a330af63094d88792b9ca28ac36c71673eb1c"
AVALANCHE_IMX_A_AVAX_PANGOLIN = "0xde0037afbe805c00d3cec67093a40882880779b7"
MOONRIVER_IMX_M_MOVR_SOLARBEAM = "0x6ed3bc66dfcc5ac05daec840a75836da935fac97"
50 changes: 50 additions & 0 deletions src/impermax/common/enums/contracts/stablecoins_enums.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
from src.impermax.common.extended_enum import ExtendedEnum

STABLECOIN_TICKERS = {"USDC", "USDT", "DAI", "MAI", "MIM"}


class StableCoins(str, ExtendedEnum):
pass


class AvalancheStables(StableCoins):
USDT_DAI_TRADERJOE = "0x1d4cee9bbf71e1c4dae1a6b1e10c0b4d7c44f96e"
AVAX_USDT_TRADERJOE = "0x20beea9fab7e05b05f110eed0cb4f3b29b3ddfb4"
USDC_DAI_TRADERJOE = "0xe58cf63240417fa2c91c5bcc92ef1a234ee9bfba"
AVAX_USDT_PANGOLINV2 = "0x734ee20bbad6d191432b34fbfd1493c16f065e9c"
USDC_USDT_TRADERJOE = "0xa1feadd11cd6a27bdfd945eb8ef685d8872639fa"
USDC_AVAX_TRADERJOE = "0xc05227adce1a291752e90bc989f71c4c534d26d5"
MIM_AVAX_TRADERJOE = "0xd04b43a8e016ead5c95971e428bffe5a32cfad3c"
AVAX_USDT_PANGOLIN = "0x9d1e250e40676a05b8e1ce256b3f2b9764827dc8"


class MaticStables(StableCoins):
MAI_USDT_QUICKSWAP = "0xc3a4c0677b033bf6e9a4e22f930f1d60c5cd2c86"
DAI_MAI_QUICKSWAP = "0x6d59c06a7f96a508310a76da84db397819e29c62"
USDC_USDT_SUSHISWAP = "0x9b2f10eae09fad574b3f76b977c06634a4ec3a46"
USDC_DAI_SUSHISWAP = "0x542ccc962097b184ca12a46030d967a735342cf8"
USDC_USDT_QUICKSWAP = "0x3e115a3af5a58c73571586468b0f5d08bfe9dab1"
USDC_WETH_SUSHISWAP = "0xbb7ccc9c0f72fb91dee7053c652e961117db4368"
WETH_USDT_QUICKSWAP = "0x2912a338df9877905e54c557e4d826f84365602e"
USDC_WETH_QUICKSWAP = "0xc380e7fa325e1708e9e6ef4d9bed2cd806fcb328"
WETH_DAI_QUICKSWAP = "0x16aed35d0c1f5500b73063b10c0dad42b772ac23"


class ArbitrumStables(StableCoins):
USDT_USDC_SWAPR = "0xd52c2e7feae13abbc9ac4861ef697f7210586696"
ETH_MIM_SUSHISWAP = "0xa6e69dd0c36f3b59539e2c7afd274ef91b5c70f9"
ETH_USDC_SWAPR = "0x82cde182702841dab46916738207123fe535909f"
ETH_USDC_SUSHISWAP = "0xb0e7ad5053414fde098122b61fd34d816fd6d93f"
ETH_USDT_SUSHISWAP = "0x95c9bf3f60cbc2be8e148fae82f26930bfcd1839"
ETH_DAI_SWAPR = "0xe965129938867a125f91a67e1b6d34d022bda569"


class EthereumStables(StableCoins):
USDC_ETH_UNISWAP = "0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc"
USDC_USDT_UNISWAP = "0x3041cbd36888becc7bbcbc0045e3b1f144466f5f"
ETH_USDT_UNISWAP = "0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852"
DAI_ETH_UNISWAP = "0xa478c2975ab1ea89e8196811f51a7b7ade33eb11"


class MoonRiverStables(StableCoins):
MIM_MOVR_SOLARBEAM = "0x2748d9d4e7379d5d29ca8887aeff929912ff06d8"
File renamed without changes.
9 changes: 4 additions & 5 deletions src/impermax/common/tests/test_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
from abc import ABC, abstractmethod
from unittest import TestCase

from src.impermax.common.enums.imx_urls_enum import ImpermaxURLS
from src.impermax.common.tests.singleton_meta import SingletonMeta
from src.impermax.common.urls_enum import ImpermaxURLS
from src.impermax.impermax_to_csv import enable_logging
from src.impermax.services.data_providers.web_scraper._async_scraper import (
from src.impermax.services.web_scraper._async_scraper import (
_AsyncWebScraper,
)
from src.impermax.services.data_providers.web_scraper._html_parser import _ImxPageParser
from src.impermax.services.web_scraper._html_parser import _ImxPageParser

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -40,8 +40,7 @@ def _fetch_sample_html_responses_for_tests(self):
return _AsyncWebScraper().get(self.urls)


class TestScraperHelper(ABC, TestCase):

class WebScraperIntegrationTestsHelper(ABC, TestCase):
@abstractmethod
def __init__(self, *args, **kwargs):
"""Reminding the call to this super.__init__() will silence verbose logging modules."""
Expand Down
92 changes: 0 additions & 92 deletions src/impermax/dao/csv_dao.py

This file was deleted.

13 changes: 0 additions & 13 deletions src/impermax/dao/dao_interface.py

This file was deleted.

29 changes: 0 additions & 29 deletions src/impermax/dao/tests/test_csv_dao.py

This file was deleted.

107 changes: 0 additions & 107 deletions src/impermax/dirty_analyser/analysis.py

This file was deleted.

Loading

0 comments on commit ee56651

Please sign in to comment.