alessio9567Main Pool exploiter Flash Loan
Updated 2023-04-01
999
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
-- forked from 0576a08c-36e8-47aa-a2ed-05261d3ead97
WITH
platypus_tokens_metadata AS (
SELECT DISTINCT
name AS token_name,
address,
decimals
FROM
avalanche.core.fact_decoded_event_logs
JOIN avalanche.core.dim_contracts ON decoded_log:"token" = address
WHERE
1 = 1
AND contract_address IN (
lower('0x66357dcace80431aee0a7507e2e361b7e2402370'), -- Main USD Pool
lower('0x39de4e02f76dbd4352ec2c926d8d64db8abdf5b2'), -- Alt pool BTC
lower('0xB8E567fc23c39C94a1f6359509D7b43D1Fbed824'), --Alt Pool Frax
lower('0x30C30d826be87Cd0A4b90855C2F38f7FcfE4eaA7'), --Alt Pool MIM
lower('0x4658EA7e9960D6158a261104aAA160cC953bb6ba'), --Alt Pool sAVAX
lower('0xC828D995C686AaBA78A4aC89dfc8eC0Ff4C5be83'), --Alt Pool YUSD (pure)
lower('0x81E63d0EEBA2D85609A6b206737e98e39B888F4C'), --Alt Pool axlUSDC (pure)
lower('0x91BB10D68C72d64a7cE10482b453153eEa03322C'), --Factory Pool TSD (pure)
lower('0x27912AE6Ba9a54219d8287C3540A8969FF35500B'), -- Factory Pool MONEY (pure)
lower('0x233Ba46B01d2FbF1A31bDBc500702E286d6de218'), --Factory Pool H2O (pure)
lower('0x89E9EFD9614621309aDA948a761D364F0236eDEA') --Factory Pool USX (pure)
)
),
platypus_tokens_prices_USD AS (
SELECT
'Axelar Wrapped USDC' AS token_name,
date_trunc('day', hour) AS avg_dt,
AVG(price) AS avg_token_price_usd
FROM
ethereum.core.fact_hourly_token_prices
WHERE
symbol = 'USDC'
AND hour > '2021-12-31'
Run a query to Download Data