From b4ba2a644bdfe0c48c1f6f7925a0f4fe6a7a7d40 Mon Sep 17 00:00:00 2001 From: Austin <93135983+austinFlipside@users.noreply.github.com> Date: Mon, 1 Jul 2024 12:10:12 -0400 Subject: [PATCH] new column (#71) --- models/flashbots/bronze/bronze__flashbots_mev_txs.sql | 1 + models/flashbots/bronze/bronze__flashbots_mev_txs_fr.sql | 1 + .../flashbots/gold/flashbots__fact_mevshare_transactions.sql | 3 ++- .../flashbots/gold/flashbots__fact_mevshare_transactions.yml | 4 +++- models/flashbots/silver/silver__flashbots_mev_txs.sql | 1 + 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/models/flashbots/bronze/bronze__flashbots_mev_txs.sql b/models/flashbots/bronze/bronze__flashbots_mev_txs.sql index da60f2b..019ed97 100644 --- a/models/flashbots/bronze/bronze__flashbots_mev_txs.sql +++ b/models/flashbots/bronze/bronze__flashbots_mev_txs.sql @@ -41,6 +41,7 @@ WITH meta AS ( refund_from, refund_to, refund_value_eth, + is_mevshare, s.value FROM {{ source( diff --git a/models/flashbots/bronze/bronze__flashbots_mev_txs_fr.sql b/models/flashbots/bronze/bronze__flashbots_mev_txs_fr.sql index a9129e4..a49e975 100644 --- a/models/flashbots/bronze/bronze__flashbots_mev_txs_fr.sql +++ b/models/flashbots/bronze/bronze__flashbots_mev_txs_fr.sql @@ -40,6 +40,7 @@ WITH meta AS ( refund_from, refund_to, refund_value_eth, + is_mevshare, s.value FROM {{ source( diff --git a/models/flashbots/gold/flashbots__fact_mevshare_transactions.sql b/models/flashbots/gold/flashbots__fact_mevshare_transactions.sql index af79be8..8853f32 100644 --- a/models/flashbots/gold/flashbots__fact_mevshare_transactions.sql +++ b/models/flashbots/gold/flashbots__fact_mevshare_transactions.sql @@ -26,6 +26,7 @@ SELECT refund_tx_hash, refund_from, refund_to, - refund_value_eth + refund_value_eth, + is_mevshare FROM {{ ref('silver__flashbots_mev_txs') }} diff --git a/models/flashbots/gold/flashbots__fact_mevshare_transactions.yml b/models/flashbots/gold/flashbots__fact_mevshare_transactions.yml index 08e217d..ef9c36e 100644 --- a/models/flashbots/gold/flashbots__fact_mevshare_transactions.yml +++ b/models/flashbots/gold/flashbots__fact_mevshare_transactions.yml @@ -42,4 +42,6 @@ models: - name: REFUND_TX_TO description: The Ethereum address to which the refund was sent, which usually is user address but can be a different address user set when sending transaction to Flashbots Protect / MEV-share. - name: REFUND_VALUE_ETH - description: The amount of ETH refunded to the protect transaction, as a result of a successful OFA backrun, depending on user's refund percentage setting when sending the transaction. \ No newline at end of file + description: The amount of ETH refunded to the protect transaction, as a result of a successful OFA backrun, depending on user's refund percentage setting when sending the transaction. + - name: IS_MEVSHARE + description: If true, mev-share matched the transactions in the bundle. If false, it was sent pre-matched from a third party to mev-share. \ No newline at end of file diff --git a/models/flashbots/silver/silver__flashbots_mev_txs.sql b/models/flashbots/silver/silver__flashbots_mev_txs.sql index 8c8fba2..28e3d53 100644 --- a/models/flashbots/silver/silver__flashbots_mev_txs.sql +++ b/models/flashbots/silver/silver__flashbots_mev_txs.sql @@ -23,6 +23,7 @@ SELECT LOWER(refund_from) AS refund_from, LOWER(refund_to) AS refund_to, refund_value_eth, + is_mevshare::boolean as is_mevshare, _inserted_timestamp, {{ dbt_utils.generate_surrogate_key( ['user_tx_hash', 'backrun_tx_hash', 'bundle_id']