MoDeFiaxelar prime 00-04 - tvl
    Updated 2023-05-26
    -- forked from axelar prime 01-04 - tvl 1 @ https://flipsidecrypto.xyz/edit/queries/291ba8db-9259-4c05-8378-bf009349f74d

    with price as (
    select distinct hour, 'GLMR' as token, 0.3 as PRICE
    from ethereum.core.fact_hourly_token_prices
    where TOKEN_ADDRESS='0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
    union all
    select distinct hour, 'USDC' as token, 1 as PRICE
    from ethereum.core.fact_hourly_token_prices
    where TOKEN_ADDRESS='0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
    union all
    select distinct hour, 'USDt' as token, 1 as PRICE
    from ethereum.core.fact_hourly_token_prices
    where TOKEN_ADDRESS='0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
    union all
    select distinct hour, 'ETH' as token, PRICE
    from ethereum.core.fact_hourly_token_prices
    where TOKEN_ADDRESS='0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
    union all
    select distinct hour, 'WETH.e' as token, PRICE
    from ethereum.core.fact_hourly_token_prices
    where TOKEN_ADDRESS='0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
    ),
    -------------------------------------------------Arbitrum-------------------------------------------------

    arb_borrow as (
    select BLOCK_TIMESTAMP, chain, user, symbol, amount, amount*price as usd_amount, tx_hash, 'Borrow' as action
    from
    (select BLOCK_TIMESTAMP, 'Arbitrum' as chain,
    CONCAT('0x',SUBSTR(INPUT_DATA, 99, 40)) as asset,
    case
    when asset in ('0x6cce9601ca44a9049a761c22b70d5849662c2c0a','0x1b0509d8cc044805f54d132ccda7b4a4ed88261a',
    '0x73c5c93e78cb8ca4939307e0d95e032631fb9eee','0xddc6df52f9749ed80966fb6a9d4c87264cc1e6c1',
    '0x227eeb717a3ec78025be51c87b3a7160192613d2') then 'USDC'
    when asset in ('0x1bf6752282039ee82c06de64d094c9e35578a1a0',
    '0xe06f55fb6c6c62b74aad7eb77f00b06920fb176e') then 'USDt'
    Run a query to Download Data