CryptoIcicleInflows and Outflows (redux) - Stablecoins
    Updated 2024-02-14
    -- -- Inflows and Outflows

    -- Pay by Quality Your score determines your final payout.
    -- Grand Prize 75 USDC (A score of 11 or 12 earns you a Grand Prize title)
    -- Payout 50 USDC
    -- Score Multiplier 0-7 : 0% 8 : 50% 9 : 75% 10 : 100% 11 : 125% 12 : 150%
    -- Payout Network Ethereum
    -- Level Beginner
    -- Difficulty Medium
    -- What is the volume of ETH and three stablecoins of your choice that's moved between the Optimism
    -- network and the Ethereum network across the bridge?
    -- How has that changed over time? Note any interesting trends or outliers that you see.
    -- BONUS: Post your dashboard on Twitter and tag @flipsidecrypto and any relevant accounts!

    with txns as (
    select
    iff(origin_to_address = '0x25ace71c97b33cc4729cf772ae268934f7ab5fa1', 'OP-->ETH', 'ETH-->OP') as flow,
    concat(flow,'::',symbol) as type,
    block_timestamp,
    tx_hash,
    amount_usd,
    origin_from_address
    from ethereum.core.ez_token_transfers
    where origin_to_address in (
    '0x25ace71c97b33cc4729cf772ae268934f7ab5fa1' -- Optimism --> ETH
    ,'0x99c9fc46f92e8a1c0dec1b1747d010903e884be1' -- ETH --> Optimism
    )
    and block_timestamp >= CURRENT_DATE - {{n_days}}
    and symbol in ('USDC','DAI','USDT')
    )

    select
    date_trunc('{{date_range}}',block_timestamp) as date,
    type,
    count(distinct tx_hash) as n_txns,
    count(distinct origin_from_address) as n_wallets,
    Last run: about 1 year agoAuto-refreshes every 24 hours
    DATE
    TYPE
    N_TXNS
    N_WALLETS
    AMOUNT_USD
    1
    2023-12-21 00:00:00.000ETH-->OP::USDT155542862.597801271
    2
    2024-02-12 00:00:00.000ETH-->OP::USDT184486055.055351504
    3
    2023-12-29 00:00:00.000ETH-->OP::USDT1261511046.86413986
    4
    2023-12-19 00:00:00.000ETH-->OP::USDT2138275437.2616577
    5
    2023-12-17 00:00:00.000ETH-->OP::USDC85169705.544611253
    6
    2024-01-28 00:00:00.000ETH-->OP::USDT921304410.39061993
    7
    2023-12-30 00:00:00.000ETH-->OP::USDT6262734.148773139
    8
    2024-01-29 00:00:00.000ETH-->OP::USDT175221964.930956276
    9
    2023-11-16 00:00:00.000ETH-->OP::USDT4457462.632198459
    10
    2023-11-19 00:00:00.000ETH-->OP::USDT5536929.223237198
    11
    2023-12-21 00:00:00.000ETH-->OP::USDC66347372.168928956
    12
    2023-11-24 00:00:00.000ETH-->OP::USDT541392241.81396632
    13
    2023-11-22 00:00:00.000ETH-->OP::USDC75196660.597575988
    14
    2023-12-10 00:00:00.000ETH-->OP::USDC97425163.281011417
    15
    2024-01-15 00:00:00.000ETH-->OP::USDC11141282.025684
    16
    2023-12-01 00:00:00.000ETH-->OP::USDT63257796.050304514
    17
    2024-01-12 00:00:00.000ETH-->OP::USDT74245962.447299847
    18
    2024-01-14 00:00:00.000ETH-->OP::USDC331626285.14694021
    19
    2024-01-03 00:00:00.000ETH-->OP::USDT1163453941.87571453
    20
    2023-12-04 00:00:00.000ETH-->OP::USDC65630434.509388246
    ...
    178
    11KB
    9s