KaskoazulAlgofi DEX TVL all pools
    Updated 2022-07-02
    with raw_txs_out as (
    select tf.block_timestamp,
    tf.tx_id,
    l.address as pool_address,
    l.address_name as pool_name,
    tf.asset_id,
    --concat_ws(' - ', pool_address, asset_id) as asset_in_pool,
    tf.amount
    from flipside_prod_db.algorand.transfers tf
    left join flipside_prod_db.algorand.labels l
    on l.address = tf.asset_sender
    where l.label = 'algofi' -- Tinyman DEX
    -- and (pool_address = '2FJLXZ4QPMN5JFJ635B755Q4VH7AB4QCQA264GAEHJXLMCYEPLOUVODZLM'
    -- or pool_address = 'CRYWUYTASSVQAZ55QG3CIPDQG5FDWFLH6XQ464I2OFTL6Y53GQ3HLIM6RA'
    -- or pool_address = '4TRTWZSFQWNW55MVT3UKFWYBT5W44VKQMUAWJLOULIRAIAZKOLDMLKCKDU')
    --and l.address_name in ('tinyman: goBTC-ALGO pool','tinyman: USDC-Tether USDt pool','tinyman: USDC-ALGO pool','tinyman: goETH-ALGO pool','tinyman: Yieldly-ALGO pool',
    --'tinyman: Chips-ALGO pool','tinyman: Cosmic Champs-ALGO pool','tinyman: gem-ALGO pool')
    order by 1 desc
    ),

    raw_txs_in as (
    select tf.block_timestamp,
    tf.tx_id,
    l.address as pool_address,
    l.address_name as pool_name,
    tf.asset_id,
    --concat_ws('-', pool_address, asset_id) as asset_in_pool,
    tf.amount
    from flipside_prod_db.algorand.transfers tf
    left join flipside_prod_db.algorand.labels l
    on l.address = tf.receiver
    where l.label = 'algofi' -- Tinyman DEX
    -- and (pool_address = '2FJLXZ4QPMN5JFJ635B755Q4VH7AB4QCQA264GAEHJXLMCYEPLOUVODZLM'
    -- or pool_address = 'CRYWUYTASSVQAZ55QG3CIPDQG5FDWFLH6XQ464I2OFTL6Y53GQ3HLIM6RA'
    -- or pool_address = '4TRTWZSFQWNW55MVT3UKFWYBT5W44VKQMUAWJLOULIRAIAZKOLDMLKCKDU')
    --and l.address_name in ('tinyman: goBTC-ALGO pool','tinyman: USDC-Tether USDt pool','tinyman: USDC-ALGO pool','tinyman: goETH-ALGO pool','tinyman: Yieldly-ALGO pool',