Skip to content

Commit

Permalink
hotfix defillama prices
Browse files Browse the repository at this point in the history
  • Loading branch information
t0rbik committed Aug 20, 2023
1 parent 30e11ad commit af2f53f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions app/assets/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,6 @@ def dexscreener_price_in_stables(self):
if (
prices["baseToken"]["address"].lower() == self.address.lower()
and prices["baseToken"]["symbol"] == self.symbol
and not prices["quoteToken"]["address"].lower()
== "0x04068DA6C83AFCFA0e13ba15A6696662335D5B75".lower()
):
# To avoid this kek...
# ValueError: could not convert string to float: '1,272.43'
Expand All @@ -178,7 +176,8 @@ def dexscreener_price_in_stables(self):
return float(price)

def aggregated_price_in_stables(self):
price = self.defillama_price_in_stables()
# price = self.defillama_price_in_stables()
price = 0

if price != 0:
return price
Expand Down Expand Up @@ -264,8 +263,9 @@ def _update_price(self):
self.price = self.aggregated_price_in_stables()

if self.price == 0:
# self.price = self.chain_price_in_stables()
self.price = self.chain_price_in_native()
if self.price == 0:
self.price = self.chain_price_in_stables()

# if self.price == 0:
# self.price = self.debank_price_in_stables()
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:
- TOKENLISTS=https://raw.githubusercontent.com/Velocimeter/docs/main/tokenlists/base.json
- DEFAULT_TOKEN_ADDRESS=0xd386a121991E51Eab5e3433Bf5B1cF4C8884b47a
- OPTION_TOKEN_ADDRESS=0x762eb51D2e779EeEc9B239FFB0B2eC8262848f3E
- STABLE_TOKEN_ADDRESS=0x0b776552c1aef1dc33005dd25acda22493b6615d
- STABLE_TOKEN_ADDRESS=0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA
- ROUTE_TOKEN_ADDRESSES=0x4200000000000000000000000000000000000006
- SYNC_WAIT_SECONDS=20
- IGNORED_TOKEN_ADDRESSES=0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000
Expand Down
4 changes: 2 additions & 2 deletions env.example.base
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
WEB3_PROVIDER_URI=https://mainnet.base.org/
WEB3_PROVIDER_URI=https://base.blockpi.network/v1/rpc/public
ROUTER_ADDRESS=0xE11b93B61f6291d35c5a2beA0A9fF169080160cF
FACTORY_ADDRESS=0xe21Aac7F113Bd5DC2389e4d8a8db854a87fD6951
VOTER_ADDRESS=0xab9B68c9e53c94D7c0949FB909E80e4a29F9134A
Expand All @@ -7,7 +7,7 @@ REWARDS_DIST_ADDRESS=0x71Eaf68c2A23b7Bd78Db4987c3eCdB41c3b3b388
TOKENLISTS=https://raw.githubusercontent.com/Velocimeter/docs/main/tokenlists/base.json
DEFAULT_TOKEN_ADDRESS=0xd386a121991E51Eab5e3433Bf5B1cF4C8884b47a
OPTION_TOKEN_ADDRESS=0x762eb51D2e779EeEc9B239FFB0B2eC8262848f3E
STABLE_TOKEN_ADDRESS=0x0b776552c1aef1dc33005dd25acda22493b6615d
STABLE_TOKEN_ADDRESS=0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA
ROUTE_TOKEN_ADDRESSES=0x4200000000000000000000000000000000000006
SYNC_WAIT_SECONDS=20
IGNORED_TOKEN_ADDRESSES=0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000
Expand Down

0 comments on commit af2f53f

Please sign in to comment.