Skip to content

Commit

Permalink
fix: add another CG hack - rm iusdc
Browse files Browse the repository at this point in the history
  • Loading branch information
robcxyz committed Jun 28, 2024
1 parent c7c4d3f commit 46c74a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions balanced_backend/cache/coingecko.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ def clean_pools_for_coingecko(pools: list[Pool]) -> list[Pool]:
if p.base_liquidity + p.quote_liquidity < settings.COINGECKO_LIQUIDITY_CUTOFF:
# Skip low pools
continue
if p.name == 'sICX/ICX':
# TODO: RM this later
if 'IUSDC' in p.name:
continue

if p.name == 'sICX/ICX' and settings.COINGECKO_HACK:
p.price = 1
p.price_24h = 1
p.price_24h_high = 1
Expand Down Expand Up @@ -133,7 +137,8 @@ def update_coingecko_historical(session: 'Session'):
else:
swap_type = "buy"

if p.name == "sICX/ICX":
if p.name == "sICX/ICX" and settings.COINGECKO_HACK:
# This is insanely dumb - but we tried...
price = 1
target_volume = s.base_token_value_decimal
else:
Expand Down
1 change: 1 addition & 0 deletions balanced_backend/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class Settings(BaseSettings):

COINGECKO_LIQUIDITY_CUTOFF: int = 1000
COINGECKO_DISABLE: bool = False
COINGECKO_HACK: bool = False

class Config:
case_sensitive = True
Expand Down

0 comments on commit 46c74a2

Please sign in to comment.