Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions automations/anchor_feeds.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
"decimals": 6,
"base_asset": "TRON",
"category": "Crypto",
"risk": 3
"risk": 1
},
{
"feed_name": "LINK/USD",
Expand Down Expand Up @@ -373,7 +373,7 @@
"decimals": 5,
"base_asset": "Artificial Superintelligence Alliance",
"category": "Crypto",
"risk": 2
"risk": 1
},
{
"feed_name": "RENDER/USD",
Expand Down Expand Up @@ -401,7 +401,7 @@
},
{
"feed_name": "TRUMP/USD",
"feed_id": "0x015452554D502F5553440000000000000000000000",
"feed_id": "0x015452554d502f5553440000000000000000000000",
"decimals": 5,
"base_asset": "Official Trump",
"category": "Crypto",
Expand Down
105 changes: 52 additions & 53 deletions automations/anchor_risk.json
Original file line number Diff line number Diff line change
@@ -1,54 +1,53 @@
[
{ "name": "FLR/USD", "index": 0, "decimals": 7, "volatility": 1 },
{ "name": "SGB/USD", "index": 1, "decimals": 8, "volatility": 2 },
{ "name": "BTC/USD", "index": 2, "decimals": 2, "volatility": 1 },
{ "name": "XRP/USD", "index": 3, "decimals": 6, "volatility": 2 },
{ "name": "LTC/USD", "index": 4, "decimals": 5, "volatility": 1 },
{ "name": "XLM/USD", "index": 5, "decimals": 6, "volatility": 1 },
{ "name": "DOGE/USD", "index": 6, "decimals": 6, "volatility": 2 },
{ "name": "ADA/USD", "index": 7, "decimals": 6, "volatility": 2 },
{ "name": "ALGO/USD", "index": 8, "decimals": 6, "volatility": 2 },
{ "name": "ETH/USD", "index": 9, "decimals": 3, "volatility": 1 },
{ "name": "FIL/USD", "index": 10, "decimals": 5, "volatility": 1 },
{ "name": "ARB/USD", "index": 11, "decimals": 6, "volatility": 1 },
{ "name": "AVAX/USD", "index": 12, "decimals": 5, "volatility": 1 },
{ "name": "BNB/USD", "index": 13, "decimals": 4, "volatility": 1 },
{ "name": "POL/USD", "index": 14, "decimals": 6, "volatility": 2 },
{ "name": "SOL/USD", "index": 15, "decimals": 4, "volatility": 1 },
{ "name": "USDC/USD", "index": 16, "decimals": 5, "volatility": 0 },
{ "name": "USDT/USD", "index": 17, "decimals": 5, "volatility": 0 },
{ "name": "XDC/USD", "index": 18, "decimals": 7, "volatility": 2 },
{ "name": "TRX/USD", "index": 19, "decimals": 6, "volatility": 3 },
{ "name": "LINK/USD", "index": 20, "decimals": 5, "volatility": 1 },
{ "name": "ATOM/USD", "index": 21, "decimals": 5, "volatility": 1 },
{ "name": "DOT/USD", "index": 22, "decimals": 5, "volatility": 1 },
{ "name": "TON/USD", "index": 23, "decimals": 5, "volatility": 1 },
{ "name": "ICP/USD", "index": 24, "decimals": 5, "volatility": 1 },
{ "name": "SHIB/USD", "index": 25, "decimals": 10, "volatility": 3 },
{ "name": "DAI/USD", "index": 26, "decimals": 5, "volatility": 1 },
{ "name": "BCH/USD", "index": 27, "decimals": 4, "volatility": 1 },
{ "name": "NEAR/USD", "index": 28, "decimals": 5, "volatility": 1 },
{ "name": "LEO/USD", "index": 29, "decimals": 5, "volatility": 3 },
{ "name": "UNI/USD", "index": 30, "decimals": 5, "volatility": 1 },
{ "name": "ETC/USD", "index": 31, "decimals": 5, "volatility": 2 },
{ "name": "WIF/USD", "index": 32, "decimals": 5, "volatility": 3 },
{ "name": "BONK/USD", "index": 33, "decimals": 10, "volatility": 3 },
{ "name": "JUP/USD", "index": 34, "decimals": 5, "volatility": 1 },
{ "name": "ETHFI/USD", "index": 35, "decimals": 5, "volatility": 2 },
{ "name": "ENA/USD", "index": 36, "decimals": 6, "volatility": 3 },
{ "name": "PYTH/USD", "index": 37, "decimals": 6, "volatility": 1 },
{ "name": "HNT/USD", "index": 38, "decimals": 5, "volatility": 2 },
{ "name": "SUI/USD", "index": 39, "decimals": 5, "volatility": 1 },
{ "name": "PEPE/USD", "index": 40, "decimals": 10, "volatility": 3 },
{ "name": "QNT/USD", "index": 41, "decimals": 5, "volatility": 2 },
{ "name": "AAVE/USD", "index": 42, "decimals": 4, "volatility": 1 },
{ "name": "FTM/USD", "index": 43, "decimals": 5, "volatility": 3 },
{ "name": "ONDO/USD", "index": 44, "decimals": 5, "volatility": 2 },
{ "name": "TAO/USD", "index": 45, "decimals": 4, "volatility": 2 },
{ "name": "FET/USD", "index": 46, "decimals": 5, "volatility": 1 },
{ "name": "RENDER/USD", "index": 47, "decimals": 5, "volatility": 1 },
{ "name": "NOT/USD", "index": 48, "decimals": 7, "volatility": 2},
{ "name": "RUNE/USD", "index": 49, "decimals": 5, "volatility": 2 },
{ "name": "TRUMP/USD", "index": 50, "decimals": 5, "volatility": 4 }
]

{ "name": "FLR/USD", "index": 0, "decimals": 7, "volatility": 1 },
{ "name": "SGB/USD", "index": 1, "decimals": 8, "volatility": 2 },
{ "name": "BTC/USD", "index": 2, "decimals": 2, "volatility": 1 },
{ "name": "XRP/USD", "index": 3, "decimals": 6, "volatility": 2 },
{ "name": "LTC/USD", "index": 4, "decimals": 5, "volatility": 1 },
{ "name": "XLM/USD", "index": 5, "decimals": 6, "volatility": 1 },
{ "name": "DOGE/USD", "index": 6, "decimals": 6, "volatility": 2 },
{ "name": "ADA/USD", "index": 7, "decimals": 6, "volatility": 2 },
{ "name": "ALGO/USD", "index": 8, "decimals": 6, "volatility": 2 },
{ "name": "ETH/USD", "index": 9, "decimals": 3, "volatility": 1 },
{ "name": "FIL/USD", "index": 10, "decimals": 5, "volatility": 1 },
{ "name": "ARB/USD", "index": 11, "decimals": 6, "volatility": 1 },
{ "name": "AVAX/USD", "index": 12, "decimals": 5, "volatility": 1 },
{ "name": "BNB/USD", "index": 13, "decimals": 4, "volatility": 1 },
{ "name": "POL/USD", "index": 14, "decimals": 6, "volatility": 1 },
{ "name": "SOL/USD", "index": 15, "decimals": 4, "volatility": 1 },
{ "name": "USDC/USD", "index": 16, "decimals": 5, "volatility": 0 },
{ "name": "USDT/USD", "index": 17, "decimals": 5, "volatility": 0 },
{ "name": "XDC/USD", "index": 18, "decimals": 7, "volatility": 2 },
{ "name": "TRX/USD", "index": 19, "decimals": 6, "volatility": 1 },
{ "name": "LINK/USD", "index": 20, "decimals": 5, "volatility": 1 },
{ "name": "ATOM/USD", "index": 21, "decimals": 5, "volatility": 1 },
{ "name": "DOT/USD", "index": 22, "decimals": 5, "volatility": 1 },
{ "name": "TON/USD", "index": 23, "decimals": 5, "volatility": 1 },
{ "name": "ICP/USD", "index": 24, "decimals": 5, "volatility": 1 },
{ "name": "SHIB/USD", "index": 25, "decimals": 10, "volatility": 3 },
{ "name": "DAI/USD", "index": 26, "decimals": 5, "volatility": 1 },
{ "name": "BCH/USD", "index": 27, "decimals": 4, "volatility": 1 },
{ "name": "NEAR/USD", "index": 28, "decimals": 5, "volatility": 1 },
{ "name": "LEO/USD", "index": 29, "decimals": 5, "volatility": 3 },
{ "name": "UNI/USD", "index": 30, "decimals": 5, "volatility": 1 },
{ "name": "ETC/USD", "index": 31, "decimals": 5, "volatility": 2 },
{ "name": "WIF/USD", "index": 32, "decimals": 5, "volatility": 3 },
{ "name": "BONK/USD", "index": 33, "decimals": 10, "volatility": 3 },
{ "name": "JUP/USD", "index": 34, "decimals": 5, "volatility": 1 },
{ "name": "ETHFI/USD", "index": 35, "decimals": 5, "volatility": 2 },
{ "name": "ENA/USD", "index": 36, "decimals": 6, "volatility": 3 },
{ "name": "PYTH/USD", "index": 37, "decimals": 6, "volatility": 1 },
{ "name": "HNT/USD", "index": 38, "decimals": 5, "volatility": 2 },
{ "name": "SUI/USD", "index": 39, "decimals": 5, "volatility": 1 },
{ "name": "PEPE/USD", "index": 40, "decimals": 10, "volatility": 3 },
{ "name": "QNT/USD", "index": 41, "decimals": 5, "volatility": 2 },
{ "name": "AAVE/USD", "index": 42, "decimals": 4, "volatility": 1 },
{ "name": "FTM/USD", "index": 43, "decimals": 5, "volatility": 3 },
{ "name": "ONDO/USD", "index": 44, "decimals": 5, "volatility": 2 },
{ "name": "TAO/USD", "index": 45, "decimals": 4, "volatility": 2 },
{ "name": "FET/USD", "index": 46, "decimals": 5, "volatility": 1 },
{ "name": "RENDER/USD", "index": 47, "decimals": 5, "volatility": 1 },
{ "name": "NOT/USD", "index": 48, "decimals": 7, "volatility": 2},
{ "name": "RUNE/USD", "index": 49, "decimals": 5, "volatility": 2 },
{ "name": "TRUMP/USD", "index": 50, "decimals": 5, "volatility": 4 }
]
6 changes: 3 additions & 3 deletions automations/block_latency_feeds.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
"decimals": 6,
"base_asset": "TRON",
"category": "Crypto",
"risk": 2
"risk": 1
},
{
"feed_name": "LINK/USD",
Expand Down Expand Up @@ -420,7 +420,7 @@
"decimals": 5,
"base_asset": "Artificial Superintelligence Alliance",
"category": "Crypto",
"risk": 2
"risk": 1
},
{
"feed_name": "RENDER/USD",
Expand Down Expand Up @@ -452,7 +452,7 @@
{
"feed_name": "TRUMP/USD",
"feed_index": 50,
"feed_id": "0x015452554D502F5553440000000000000000000000",
"feed_id": "0x015452554d502f5553440000000000000000000000",
"decimals": 5,
"base_asset": "Official Trump",
"category": "Crypto",
Expand Down
105 changes: 52 additions & 53 deletions automations/block_latency_risk.json
Original file line number Diff line number Diff line change
@@ -1,54 +1,53 @@
[
{ "name": "FLR/USD", "index": 0, "decimals": 7, "volatility": 1 },
{ "name": "SGB/USD", "index": 1, "decimals": 8, "volatility": 2 },
{ "name": "BTC/USD", "index": 2, "decimals": 2, "volatility": 1 },
{ "name": "XRP/USD", "index": 3, "decimals": 6, "volatility": 1 },
{ "name": "LTC/USD", "index": 4, "decimals": 5, "volatility": 1 },
{ "name": "XLM/USD", "index": 5, "decimals": 6, "volatility": 2 },
{ "name": "DOGE/USD", "index": 6, "decimals": 6, "volatility": 2 },
{ "name": "ADA/USD", "index": 7, "decimals": 6, "volatility": 1 },
{ "name": "ALGO/USD", "index": 8, "decimals": 6, "volatility": 2 },
{ "name": "ETH/USD", "index": 9, "decimals": 3, "volatility": 1 },
{ "name": "FIL/USD", "index": 10, "decimals": 5, "volatility": 1 },
{ "name": "ARB/USD", "index": 11, "decimals": 6, "volatility": 1 },
{ "name": "AVAX/USD", "index": 12, "decimals": 5, "volatility": 1 },
{ "name": "BNB/USD", "index": 13, "decimals": 4, "volatility": 1 },
{ "name": "POL/USD", "index": 14, "decimals": 6, "volatility": 2 },
{ "name": "SOL/USD", "index": 15, "decimals": 4, "volatility": 1 },
{ "name": "USDC/USD", "index": 16, "decimals": 5, "volatility": 0 },
{ "name": "USDT/USD", "index": 17, "decimals": 5, "volatility": 0 },
{ "name": "XDC/USD", "index": 18, "decimals": 7, "volatility": 2 },
{ "name": "TRX/USD", "index": 19, "decimals": 6, "volatility": 2 },
{ "name": "LINK/USD", "index": 20, "decimals": 5, "volatility": 1 },
{ "name": "ATOM/USD", "index": 21, "decimals": 5, "volatility": 1 },
{ "name": "DOT/USD", "index": 22, "decimals": 5, "volatility": 1 },
{ "name": "TON/USD", "index": 23, "decimals": 5, "volatility": 1 },
{ "name": "ICP/USD", "index": 24, "decimals": 5, "volatility": 1 },
{ "name": "SHIB/USD", "index": 25, "decimals": 10, "volatility": 3 },
{ "name": "DAI/USD", "index": 26, "decimals": 5, "volatility": 1 },
{ "name": "BCH/USD", "index": 27, "decimals": 4, "volatility": 1 },
{ "name": "NEAR/USD", "index": 28, "decimals": 5, "volatility": 1 },
{ "name": "LEO/USD", "index": 29, "decimals": 5, "volatility": 3 },
{ "name": "UNI/USD", "index": 30, "decimals": 5, "volatility": 1 },
{ "name": "ETC/USD", "index": 31, "decimals": 5, "volatility": 2 },
{ "name": "WIF/USD", "index": 32, "decimals": 5, "volatility": 3 },
{ "name": "BONK/USD", "index": 33, "decimals": 10, "volatility": 3 },
{ "name": "JUP/USD", "index": 34, "decimals": 5, "volatility": 1 },
{ "name": "ETHFI/USD", "index": 35, "decimals": 5, "volatility": 2 },
{ "name": "ENA/USD", "index": 36, "decimals": 6, "volatility": 3 },
{ "name": "PYTH/USD", "index": 37, "decimals": 6, "volatility": 1 },
{ "name": "HNT/USD", "index": 38, "decimals": 5, "volatility": 2 },
{ "name": "SUI/USD", "index": 39, "decimals": 5, "volatility": 1 },
{ "name": "PEPE/USD", "index": 40, "decimals": 10, "volatility": 3 },
{ "name": "QNT/USD", "index": 41, "decimals": 5, "volatility": 2 },
{ "name": "AAVE/USD", "index": 42, "decimals": 4, "volatility": 1 },
{ "name": "FTM/USD", "index": 43, "decimals": 5, "volatility": 3 },
{ "name": "ONDO/USD", "index": 44, "decimals": 5, "volatility": 2 },
{ "name": "TAO/USD", "index": 45, "decimals": 4, "volatility": 2 },
{ "name": "FET/USD", "index": 46, "decimals": 5, "volatility": 1 },
{ "name": "RENDER/USD", "index": 47, "decimals": 5, "volatility": 1 },
{ "name": "NOT/USD", "index": 48, "decimals": 7, "volatility": 2},
{ "name": "RUNE/USD", "index": 49, "decimals": 5, "volatility": 2 },
{ "name": "TRUMP/USD", "index": 50, "decimals": 5, "volatility": 4 }
]

{ "name": "FLR/USD", "index": 0, "decimals": 7, "volatility": 1 },
{ "name": "SGB/USD", "index": 1, "decimals": 8, "volatility": 2 },
{ "name": "BTC/USD", "index": 2, "decimals": 2, "volatility": 1 },
{ "name": "XRP/USD", "index": 3, "decimals": 6, "volatility": 1 },
{ "name": "LTC/USD", "index": 4, "decimals": 5, "volatility": 1 },
{ "name": "XLM/USD", "index": 5, "decimals": 6, "volatility": 2 },
{ "name": "DOGE/USD", "index": 6, "decimals": 6, "volatility": 2 },
{ "name": "ADA/USD", "index": 7, "decimals": 6, "volatility": 1 },
{ "name": "ALGO/USD", "index": 8, "decimals": 6, "volatility": 2 },
{ "name": "ETH/USD", "index": 9, "decimals": 3, "volatility": 1 },
{ "name": "FIL/USD", "index": 10, "decimals": 5, "volatility": 1 },
{ "name": "ARB/USD", "index": 11, "decimals": 6, "volatility": 1 },
{ "name": "AVAX/USD", "index": 12, "decimals": 5, "volatility": 1 },
{ "name": "BNB/USD", "index": 13, "decimals": 4, "volatility": 1 },
{ "name": "POL/USD", "index": 14, "decimals": 6, "volatility": 1 },
{ "name": "SOL/USD", "index": 15, "decimals": 4, "volatility": 1 },
{ "name": "USDC/USD", "index": 16, "decimals": 5, "volatility": 0 },
{ "name": "USDT/USD", "index": 17, "decimals": 5, "volatility": 0 },
{ "name": "XDC/USD", "index": 18, "decimals": 7, "volatility": 2 },
{ "name": "TRX/USD", "index": 19, "decimals": 6, "volatility": 1 },
{ "name": "LINK/USD", "index": 20, "decimals": 5, "volatility": 1 },
{ "name": "ATOM/USD", "index": 21, "decimals": 5, "volatility": 1 },
{ "name": "DOT/USD", "index": 22, "decimals": 5, "volatility": 1 },
{ "name": "TON/USD", "index": 23, "decimals": 5, "volatility": 1 },
{ "name": "ICP/USD", "index": 24, "decimals": 5, "volatility": 1 },
{ "name": "SHIB/USD", "index": 25, "decimals": 10, "volatility": 3 },
{ "name": "DAI/USD", "index": 26, "decimals": 5, "volatility": 1 },
{ "name": "BCH/USD", "index": 27, "decimals": 4, "volatility": 1 },
{ "name": "NEAR/USD", "index": 28, "decimals": 5, "volatility": 1 },
{ "name": "LEO/USD", "index": 29, "decimals": 5, "volatility": 3 },
{ "name": "UNI/USD", "index": 30, "decimals": 5, "volatility": 1 },
{ "name": "ETC/USD", "index": 31, "decimals": 5, "volatility": 2 },
{ "name": "WIF/USD", "index": 32, "decimals": 5, "volatility": 3 },
{ "name": "BONK/USD", "index": 33, "decimals": 10, "volatility": 3 },
{ "name": "JUP/USD", "index": 34, "decimals": 5, "volatility": 1 },
{ "name": "ETHFI/USD", "index": 35, "decimals": 5, "volatility": 2 },
{ "name": "ENA/USD", "index": 36, "decimals": 6, "volatility": 3 },
{ "name": "PYTH/USD", "index": 37, "decimals": 6, "volatility": 1 },
{ "name": "HNT/USD", "index": 38, "decimals": 5, "volatility": 2 },
{ "name": "SUI/USD", "index": 39, "decimals": 5, "volatility": 1 },
{ "name": "PEPE/USD", "index": 40, "decimals": 10, "volatility": 3 },
{ "name": "QNT/USD", "index": 41, "decimals": 5, "volatility": 2 },
{ "name": "AAVE/USD", "index": 42, "decimals": 4, "volatility": 1 },
{ "name": "FTM/USD", "index": 43, "decimals": 5, "volatility": 3 },
{ "name": "ONDO/USD", "index": 44, "decimals": 5, "volatility": 2 },
{ "name": "TAO/USD", "index": 45, "decimals": 4, "volatility": 2 },
{ "name": "FET/USD", "index": 46, "decimals": 5, "volatility": 1 },
{ "name": "RENDER/USD", "index": 47, "decimals": 5, "volatility": 1 },
{ "name": "NOT/USD", "index": 48, "decimals": 7, "volatility": 2},
{ "name": "RUNE/USD", "index": 49, "decimals": 5, "volatility": 2 },
{ "name": "TRUMP/USD", "index": 50, "decimals": 5, "volatility": 4 }
]
17 changes: 15 additions & 2 deletions automations/feed_table_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

HARD_CODED_FEEDS = {
"FTM/USD": {
"name": "Fantom",
"decimals": 6,
"category": "Crypto",
}
}


def get_contract_abi(contract_address: str) -> dict:
"""Get the ABI for a contract from the Chain Explorer API."""
Expand Down Expand Up @@ -101,6 +109,11 @@ def generate_feed_data(
for idx, (name, decimal) in enumerate(zip(feed_names, decimals, strict=True)):
feed_id = get_feed_id("01", name)
coin = find_coin_by_symbol(coins, name.split("/")[0])

# Handle hardcoded feeds
if name in HARD_CODED_FEEDS:
coin = HARD_CODED_FEEDS[name]

if not coin:
logger.warning("Coin %s not found in CoinGecko data", name)
continue
Expand All @@ -111,8 +124,8 @@ def generate_feed_data(
"feed_index": idx,
"feed_id": feed_id,
"decimals": decimal,
"base_asset": coin["name"],
"category": "Crypto",
"base_asset": coin.get("name"),
"category": coin.get("category", "Crypto"),
"risk": feed_risk[idx].get("volatility", -1),
}
else:
Expand Down
Loading
Loading