flyingfishDecoding Drift Funding Data Rate - Instruction Hex data breakdown
    Updated 2025-04-17
    -- forked from Decoding Jupiter Swap Data - Instruction Hex data breakdown @ https://flipsidecrypto.xyz/studio/queries/dd54b96a-f461-4890-b87a-f8758f66372a

    select
    *
    from
    (
    values
    ('function signature', 'na', 16, '4403ff1a855b93fe')
    , ('timestamp', 'i64', 16, 'f315846600000000')
    , ('recordId', 'u64', 16, '8038000000000000')
    , ('market index', 'u16', 4, '0000')
    , ('funding rate', 'i64', 16, '6851100000000000')
    , ('funding rate long', 'i128', 32, '.' || '68511000000000000000000000000000')
    , ('funding rate short', 'i128', 32, '.' || '68511000000000000000000000000000')
    , ('cumulative funding long', 'i128', 32, 'cfc12fae080000000000000000000000')
    , ('cumulative funding short', 'i128', 32, '5466e5a1080000000000000000000000')
    , ('oracle price TWAP', 'u64', 16, 'd757de0800000000')
    , ('market price TWAP', 'u64', 16, 'dc47de0800000000')
    , ('period revenue', 'i64', 16, '9a5b8a1700000000')
    , ('base asset amount with amm', 'i128', 32, 'cc25ebfdffffffffffffffffffffffff')
    , ('base asset amount with unsettled LP', 'i128', 32, '349451deffffffffffffffffffffffff')
    t(description, data_type, hex_lenght, hex_data)
    )



    Last run: 2 months ago
    DESCRIPTION
    DATA_TYPE
    HEX_LENGHT
    HEX_DATA
    1
    function signaturena164403ff1a855b93fe
    2
    timestampi6416f315846600000000
    3
    recordIdu64168038000000000000
    4
    market indexu1640000
    5
    funding ratei64166851100000000000
    6
    funding rate longi12832.68511000000000000000000000000000
    7
    funding rate shorti12832.68511000000000000000000000000000
    8
    cumulative funding longi12832cfc12fae080000000000000000000000
    9
    cumulative funding shorti128325466e5a1080000000000000000000000
    10
    oracle price TWAPu6416d757de0800000000
    11
    market price TWAPu6416dc47de0800000000
    12
    period revenuei64169a5b8a1700000000
    13
    base asset amount with ammi12832cc25ebfdffffffffffffffffffffffff
    14
    base asset amount with unsettled LPi12832349451deffffffffffffffffffffffff
    14
    803B
    1s