developer_violadragonswap abuser detecting
    Updated 2024-12-12
    WITH rraw AS (
    SELECT
    block_Timestamp,
    tx_hash,
    decoded_log:amount0::int / 1e18 AS first_token_amount,
    decoded_log:amount1::int / 1e6 AS second_token_amount,
    decoded_log:tokenId::string AS nft_id
    FROM kaia.core.ez_decoded_event_logs
    WHERE contract_address = '0x68f762d28cebad501c090949e4680697e56848fc'
    AND event_name = 'IncreaseLiquidity'
    AND block_timestamp > TIMESTAMP '2024-09-25'
    ),

    ralmost AS (
    SELECT
    tx_hash,
    block_timestamp,
    first_token_amount,
    second_token_amount,
    nft_id
    FROM rraw
    QUALIFY ROW_NUMBER() OVER (PARTITION BY nft_id ORDER BY block_timestamp ASC) = 1
    ),

    rbase AS (
    SELECT
    block_timestamp,
    tx_hash,
    from_address,
    to_address,
    value_precise,
    LEFT(input, 10) AS function_signature,
    input,
    output
    FROM kaia.core.fact_traces
    ),
    QueryRunArchived: QueryRun has been archived