fix(affiliate): conflict in prod & staging dashboards#7188
fix(affiliate): conflict in prod & staging dashboards#7188kernelwhisperer wants to merge 10 commits intodevelopfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughAdds and updates multiple affiliate SQL queries: joins app metadata (environment) for staging/production gating, treats missing protocol fee volume as 0 for low-fee checks, removes Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
5eb626c to
65861cb
Compare
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
apps/cowswap-frontend/src/modules/affiliate/misc/traders_debug.sql (1)
32-35:⚠️ Potential issue | 🟡 MinorExclude integrator-origin swaps from debug
first_trade.This CTE still includes integration traffic, so
is_trader_eligibleandeligibility_reasoncan disagree with the payout queries for wallets whose earliest swap came from an integrator.Based on learnings: In `apps/cowswap-frontend/src/modules/affiliate/misc/traders.sql`, ensure the `first_trade` CTE excludes integrator-origin swaps by adding `WHERE NOT is_excluded_integrators_source` to prevent traders whose earliest swap came via an integrator from being incorrectly marked as ineligible at the eligibility gate.🛠️ Suggested change
first_trade as ( select trader, min(block_time) as first_trade_time from trades + where not is_excluded_integrators_source group by 1 ),🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/cowswap-frontend/src/modules/affiliate/misc/traders_debug.sql` around lines 32 - 35, The first_trade CTE currently includes swaps originating from integrators which causes mismatches with eligibility and payout logic; update the first_trade CTE (named first_trade) to exclude integrator-origin swaps by adding a WHERE clause filtering out rows where is_excluded_integrators_source is true (e.g., add "WHERE NOT is_excluded_integrators_source" or equivalent) so the computed first_trade_time only considers non-integrator-origin trades and aligns with is_trader_eligible / eligibility_reason logic.apps/cowswap-frontend/src/modules/affiliate/misc/affiliates.sql (1)
46-68:⚠️ Potential issue | 🟠 MajorDon't reset the new-trader gate at
start_date.Line 67 applies the cutoff before
first_tradeis computed, so existing wallets can look new again after the cutoff. A trader with a pre-cutoff unreferred swap and a post-cutoff referred swap will now count towardreferral_volume,active_traders, and payout totals.🛠️ Suggested change
-trades_with_referrer as ( +all_trades_with_referrer as ( select dune.cowprotocol.result_fac_trades.blockchain, dune.cowprotocol.result_fac_trades.block_time, dune.cowprotocol.result_fac_trades.tx_hash, dune.cowprotocol.result_fac_trades.trader as trader, dune.cowprotocol.result_fac_trades.usd_value as usd_value, dune.cowprotocol.result_fac_trades.referrer_code as referrer_code, dune.cowprotocol.result_fac_trades.swap_source as swap_source, dune.cowprotocol.result_fac_trades.protocol_fee_volume_bps, ( coalesce(dune.cowprotocol.result_fac_trades.protocol_fee_volume_bps, 0) < constants.min_fee_bps ) as is_excluded_low_fee, ( lower(coalesce(dune.cowprotocol.result_fac_trades.swap_source, '')) = 'integrations' ) as is_excluded_integrators_source from dune.cowprotocol.result_fac_trades cross join params cross join constants where if(array_position(params.blockchains, '-=All=-') > 0, true, array_position(params.blockchains, dune.cowprotocol.result_fac_trades.blockchain) > 0) - and dune.cowprotocol.result_fac_trades.block_time >= cast(params.start_date as timestamp) ), +trades_with_referrer as ( + select * + from all_trades_with_referrer + where block_time >= cast((select start_date from params) as timestamp) +), first_trade as ( select trader, min(block_time) as first_trade_time - from trades_with_referrer + from all_trades_with_referrer where not is_excluded_integrators_source group by 1 ),🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/cowswap-frontend/src/modules/affiliate/misc/affiliates.sql` around lines 46 - 68, The CTE trades_with_referrer currently filters rows by params.start_date before computing first_trade, which can reset the "new-trader" gate; remove or postpone the block_time >= cast(params.start_date as timestamp) filter from trades_with_referrer (i.e., stop trimming dune.cowprotocol.result_fac_trades by params.start_date in that CTE) so that first_trade is computed from full history, and instead apply params.start_date only when calculating referral_volume/active_traders/payouts or when filtering the final metric joins; refer to trades_with_referrer, dune.cowprotocol.result_fac_trades.block_time, params.start_date and the first_trade logic to locate where to move the cutoff.apps/cowswap-frontend/src/modules/affiliate/misc/traders.sql (1)
46-68:⚠️ Potential issue | 🟠 MajorKeep
first_tradeon full history.Line 67 filters
trades_with_referrerbeforefirst_tradeis derived, so the gate becomes “first non-integrator trade sincestart_date”. A wallet with an unreferred pre-cutoff trade and a referred post-cutoff trade will now passfirst_trade.first_trade_time = first_ref_trade.first_ref_trade_time, which changes payout eligibility rather than only the reporting window.🛠️ Suggested change
-trades_with_referrer as ( +all_trades_with_referrer as ( select dune.cowprotocol.result_fac_trades.blockchain, dune.cowprotocol.result_fac_trades.block_time, dune.cowprotocol.result_fac_trades.tx_hash, dune.cowprotocol.result_fac_trades.trader as trader, dune.cowprotocol.result_fac_trades.usd_value as usd_value, dune.cowprotocol.result_fac_trades.referrer_code as referrer_code, dune.cowprotocol.result_fac_trades.swap_source as swap_source, dune.cowprotocol.result_fac_trades.protocol_fee_volume_bps, ( coalesce(dune.cowprotocol.result_fac_trades.protocol_fee_volume_bps, 0) < constants.min_fee_bps ) as is_excluded_low_fee, ( lower(coalesce(dune.cowprotocol.result_fac_trades.swap_source, '')) = 'integrations' ) as is_excluded_integrators_source from dune.cowprotocol.result_fac_trades cross join params cross join constants where if(array_position(params.blockchains, '-=All=-') > 0, true, array_position(params.blockchains, dune.cowprotocol.result_fac_trades.blockchain) > 0) - and dune.cowprotocol.result_fac_trades.block_time >= cast(params.start_date as timestamp) ), +trades_with_referrer as ( + select * + from all_trades_with_referrer + where block_time >= cast((select start_date from params) as timestamp) +), first_trade as ( select trader, min(block_time) as first_trade_time - from trades_with_referrer + from all_trades_with_referrer where not is_excluded_integrators_source group by 1 ),🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/cowswap-frontend/src/modules/affiliate/misc/traders.sql` around lines 46 - 68, The current CTE pipeline filters trades_with_referrer by params.start_date and exclusion flags before deriving first_trade, causing first_trade to be computed only over the reporting window; instead compute first_trade over the wallet's full history. Fix by creating or using an unfiltered source CTE (e.g., a new trades_full or reuse dune.cowprotocol.result_fac_trades) to derive first_trade (do not apply the start_date filter or is_excluded_* logic there), then apply the params.start_date and exclusion filters downstream when computing first_ref_trade and payout-eligibility; update references to trades_with_referrer/first_trade so first_trade.first_trade_time compares against first_ref_trade.first_ref_trade_time using the full-history first_trade.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@apps/cowswap-frontend/src/modules/affiliate/misc/affiliates.sql`:
- Around line 46-68: The CTE trades_with_referrer currently filters rows by
params.start_date before computing first_trade, which can reset the "new-trader"
gate; remove or postpone the block_time >= cast(params.start_date as timestamp)
filter from trades_with_referrer (i.e., stop trimming
dune.cowprotocol.result_fac_trades by params.start_date in that CTE) so that
first_trade is computed from full history, and instead apply params.start_date
only when calculating referral_volume/active_traders/payouts or when filtering
the final metric joins; refer to trades_with_referrer,
dune.cowprotocol.result_fac_trades.block_time, params.start_date and the
first_trade logic to locate where to move the cutoff.
In `@apps/cowswap-frontend/src/modules/affiliate/misc/traders_debug.sql`:
- Around line 32-35: The first_trade CTE currently includes swaps originating
from integrators which causes mismatches with eligibility and payout logic;
update the first_trade CTE (named first_trade) to exclude integrator-origin
swaps by adding a WHERE clause filtering out rows where
is_excluded_integrators_source is true (e.g., add "WHERE NOT
is_excluded_integrators_source" or equivalent) so the computed first_trade_time
only considers non-integrator-origin trades and aligns with is_trader_eligible /
eligibility_reason logic.
In `@apps/cowswap-frontend/src/modules/affiliate/misc/traders.sql`:
- Around line 46-68: The current CTE pipeline filters trades_with_referrer by
params.start_date and exclusion flags before deriving first_trade, causing
first_trade to be computed only over the reporting window; instead compute
first_trade over the wallet's full history. Fix by creating or using an
unfiltered source CTE (e.g., a new trades_full or reuse
dune.cowprotocol.result_fac_trades) to derive first_trade (do not apply the
start_date filter or is_excluded_* logic there), then apply the
params.start_date and exclusion filters downstream when computing
first_ref_trade and payout-eligibility; update references to
trades_with_referrer/first_trade so first_trade.first_trade_time compares
against first_ref_trade.first_ref_trade_time using the full-history first_trade.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 2065ad57-ca8a-4a62-b43f-1dd781566bad
📒 Files selected for processing (4)
apps/cowswap-frontend/src/modules/affiliate/misc/affiliates.sqlapps/cowswap-frontend/src/modules/affiliate/misc/trader_debug.sqlapps/cowswap-frontend/src/modules/affiliate/misc/traders.sqlapps/cowswap-frontend/src/modules/affiliate/misc/traders_debug.sql
💤 Files with no reviewable changes (1)
- apps/cowswap-frontend/src/modules/affiliate/misc/trader_debug.sql
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/cowswap-frontend/src/modules/affiliate/misc/affiliates.sql`:
- Around line 6-9: The current inline start_date CASE is truncating source rows
and thus resetting affiliate state used for first_trade, paid_out and
next_payout; instead compute lifetime eligibility and paid_out from the full
history (do not apply the '{{start_date}}' cast/filter when building those
aggregates/windows—look for the expressions named start_date, paid_out,
first_trade and next_payout) and only apply the '{{start_date}}' cutoff as a
post-aggregation display filter (e.g. in a final WHERE or in the outer SELECT
that restricts displayed earning rows). Update the logic at the start_date
occurrences (and the other occurrences noted) so that calculations of lifetime
metrics use the unfiltered source, then apply the date filter purely for output.
In `@apps/cowswap-frontend/src/modules/affiliate/misc/traders.sql`:
- Around line 6-9: The current CASE for start_date is mutating lifetime state
used by computed fields (first_trade, first_ref_trade, paid_out) instead of just
filtering the reporting window; change the query so start_date is not injected
into derived-state calculations—compute first_trade, first_ref_trade and
paid_out over the full history, then apply the start_date cutoff only when
filtering rows for the reporting/earnings window (e.g., move the CASE-based
start_date usage out of aggregations/CTEs that produce
first_trade/first_ref_trade/paid_out and use it only in the final WHERE or
window that defines the reporting period), and make the same change for the
other occurrences of start_date referenced in this file.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 5aaecdf8-3725-4ac2-88a4-2b770e912453
📒 Files selected for processing (5)
apps/cowswap-frontend/src/modules/affiliate/misc/affiliates.sqlapps/cowswap-frontend/src/modules/affiliate/misc/payouts.sqlapps/cowswap-frontend/src/modules/affiliate/misc/trader_debug.sqlapps/cowswap-frontend/src/modules/affiliate/misc/traders.sqlapps/cowswap-frontend/src/modules/affiliate/misc/traders_debug.sql
💤 Files with no reviewable changes (1)
- apps/cowswap-frontend/src/modules/affiliate/misc/trader_debug.sql
🚧 Files skipped from review as they are similar to previous changes (1)
- apps/cowswap-frontend/src/modules/affiliate/misc/traders_debug.sql
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (2)
apps/cowswap-frontend/src/modules/affiliate/misc/traders_activity.sql (1)
62-70: Consider extracting blockchain list to params CTE for consistency.Other affiliate SQL files (
traders.sql,affiliates.sql) storesplit('{{blockchain}}', ',')in theparamsCTE asblockchains. This file inlines it in the WHERE clause, which works but is slightly inconsistent.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/cowswap-frontend/src/modules/affiliate/misc/traders_activity.sql` around lines 62 - 70, The WHERE clause currently inlines split('{{blockchain}}', ',') — extract that expression into the params CTE as blockchains (matching the pattern used in traders.sql and affiliates.sql) and then replace the inline uses in the WHERE with references to params.blockchains (e.g., use array_position(params.blockchains, dune.cowprotocol.result_fac_trades.blockchain) and the '-=All=-' check against params.blockchains) so the CTE holds the parsed blockchain list consistently across files.apps/cowswap-frontend/src/modules/affiliate/misc/fac_trades.sql (1)
163-165: Consider documenting the fee sanity-check threshold.The magic number
500000in the final filter and the truncated comment ("to eliminate big price errors from be") would benefit from clarification. Is this $500,000 USD? Why this specific threshold?🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/cowswap-frontend/src/modules/affiliate/misc/fac_trades.sql` around lines 163 - 165, The WHERE clause in the query on fees_with_conversions uses a magic number 500000 with an incomplete comment; replace this with a documented constant or parameter and expand the comment to explain it's a USD threshold to filter out implausible total-fee vs trade-value mismatches (e.g., sums of protocol_fee_usd + partner_fee_cow_cut_usd + partner_fee_partner_cut_usd compared to usd_value), state why 500000 was chosen (source, trade-size percentile, or heuristic) and, if possible, move the threshold into a named CTE/variable (e.g., fee_sanity_threshold) so future readers can find and adjust it easily.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/cowswap-frontend/src/modules/affiliate/misc/affiliate_data_issues.sql`:
- Around line 12-20: The SELECT currently lists specific columns
(base.block_time, base.environment, base.protocol_fee_volume_bps,
base.referrer_code, base.blockchain, base.order_uid, base.trader_address) and
then also includes base.*, causing duplicate columns in the result; fix this by
removing base.* from the select list (or alternatively remove the explicit
columns and keep base.*) so each column appears once—update the SELECT that
references base.* accordingly (look for the SELECT block with the explicit
base.* and the listed base.<column> names).
In `@apps/cowswap-frontend/src/modules/affiliate/misc/fac_trades.sql`:
- Around line 67-69: The BPS expressions (protocol_fee_bps, protocol_fee_pi_bps,
protocol_fee_volume_bps) can divide by zero because the denominator uses
if(rod.protocol_fee_token = t.buy_token_address,
t.atoms_bought+rod.protocol_fee, t.atoms_sold+rod.protocol_fee); fix by wrapping
that denominator with NULLIF(...) to convert 0 to NULL and avoid the division
error, and ensure you coalesce null operands to 0 (e.g., use
coalesce(t.atoms_bought,0), coalesce(rod.protocol_fee,0),
coalesce(t.atoms_sold,0), coalesce(rod.protocol_volume_fee,0)) so the calculated
numerator/denominator remain numeric; update each expression (protocol_fee_bps,
protocol_fee_pi_bps, protocol_fee_volume_bps) to use the NULLIF-wrapped
denominator.
- Around line 142-151: The ETH conversion expressions (e.g., the conversions of
protocol_fee_native, volume_fee_native, limit_pi_fee_native,
market_pi_fee_native, ui_fee_native, partner_fee_cow_cut_native,
partner_fee_partner_cut_native) currently divide by p_eth.price which can be
NULL or zero; update each occurrence of "p_native.price / p_eth.price" (and
similar native/ETH divisions) to use a safe denominator such as "p_native.price
/ nullif(p_eth.price, 0)" (or nullif on p_eth.price where used) so the division
won't error on zero and will yield NULL when ETH price is missing; apply this
pattern to all conversion expressions in the block (including
partner_fee_*_native conversions).
---
Nitpick comments:
In `@apps/cowswap-frontend/src/modules/affiliate/misc/fac_trades.sql`:
- Around line 163-165: The WHERE clause in the query on fees_with_conversions
uses a magic number 500000 with an incomplete comment; replace this with a
documented constant or parameter and expand the comment to explain it's a USD
threshold to filter out implausible total-fee vs trade-value mismatches (e.g.,
sums of protocol_fee_usd + partner_fee_cow_cut_usd + partner_fee_partner_cut_usd
compared to usd_value), state why 500000 was chosen (source, trade-size
percentile, or heuristic) and, if possible, move the threshold into a named
CTE/variable (e.g., fee_sanity_threshold) so future readers can find and adjust
it easily.
In `@apps/cowswap-frontend/src/modules/affiliate/misc/traders_activity.sql`:
- Around line 62-70: The WHERE clause currently inlines split('{{blockchain}}',
',') — extract that expression into the params CTE as blockchains (matching the
pattern used in traders.sql and affiliates.sql) and then replace the inline uses
in the WHERE with references to params.blockchains (e.g., use
array_position(params.blockchains,
dune.cowprotocol.result_fac_trades.blockchain) and the '-=All=-' check against
params.blockchains) so the CTE holds the parsed blockchain list consistently
across files.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 4278cc4b-c9ba-44ef-9b40-270ad360e6f0
📒 Files selected for processing (6)
apps/cowswap-frontend/src/modules/affiliate/misc/affiliate_data_issues.sqlapps/cowswap-frontend/src/modules/affiliate/misc/affiliates.sqlapps/cowswap-frontend/src/modules/affiliate/misc/fac_trades.sqlapps/cowswap-frontend/src/modules/affiliate/misc/traders.sqlapps/cowswap-frontend/src/modules/affiliate/misc/traders_activity.sqlapps/cowswap-frontend/src/modules/affiliate/misc/traders_debug.sql
🚧 Files skipped from review as they are similar to previous changes (1)
- apps/cowswap-frontend/src/modules/affiliate/misc/traders_debug.sql
f0bbad7 to
7fe7ea0
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
apps/cowswap-frontend/src/modules/affiliate/misc/ethflow_debug.sql (1)
1-50: Consider adding optional environment filtering for consistency.Unlike
affiliates.sqlandtraders_activity.sql, this debug query has no environment filtering. If this is intentional (to see all environments for debugging the staging/prod conflict), consider adding a comment explaining this design choice. Otherwise, adding the standardparamsCTE withis_staging_envwould maintain consistency.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/cowswap-frontend/src/modules/affiliate/misc/ethflow_debug.sql` around lines 1 - 50, This query lacks the standard environment filtering; add the usual params CTE (including is_staging_env and environment param) and either filter the app_data/trades CTEs by coalesced environment (e.g., join or where using params.environment / params.is_staging_env) to match the pattern in affiliates.sql and traders_activity.sql, or if the omission is intentional, add a clear comment above the app_data/trades CTEs stating that the query intentionally spans all environments for debugging staging/prod conflicts; reference the app_data, trades and native_sell_symbols CTEs when applying the filter or placing the comment.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/cowswap-frontend/src/modules/affiliate/misc/traders_activity.sql`:
- Around line 175-183: The CASE for eligibility_reason is missing a branch for
trades excluded by the time cap applied earlier in the eligible_trades CTE;
update the eligibility_reason CASE (used when computing eligibility_reason) to
include a WHEN that detects trades where block_time > bound_time + time_cap_days
(the same condition used in eligible_trades) and return 'time_cap_exceeded' so
those rows are labeled correctly instead of falling through to 'eligible';
reference the eligible_trades CTE, the bound_time and time_cap_days fields, and
the eligibility_reason CASE/column when making the change.
---
Nitpick comments:
In `@apps/cowswap-frontend/src/modules/affiliate/misc/ethflow_debug.sql`:
- Around line 1-50: This query lacks the standard environment filtering; add the
usual params CTE (including is_staging_env and environment param) and either
filter the app_data/trades CTEs by coalesced environment (e.g., join or where
using params.environment / params.is_staging_env) to match the pattern in
affiliates.sql and traders_activity.sql, or if the omission is intentional, add
a clear comment above the app_data/trades CTEs stating that the query
intentionally spans all environments for debugging staging/prod conflicts;
reference the app_data, trades and native_sell_symbols CTEs when applying the
filter or placing the comment.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 33ab54d7-8d7f-44cd-8b74-2c0f3f4d6b7c
📒 Files selected for processing (9)
apps/cowswap-frontend/src/modules/affiliate/misc/affiliate_data_issues.sqlapps/cowswap-frontend/src/modules/affiliate/misc/affiliates.sqlapps/cowswap-frontend/src/modules/affiliate/misc/ethflow_debug.sqlapps/cowswap-frontend/src/modules/affiliate/misc/fac_trades.sqlapps/cowswap-frontend/src/modules/affiliate/misc/payouts.sqlapps/cowswap-frontend/src/modules/affiliate/misc/trader_debug.sqlapps/cowswap-frontend/src/modules/affiliate/misc/traders.sqlapps/cowswap-frontend/src/modules/affiliate/misc/traders_activity.sqlapps/cowswap-frontend/src/modules/affiliate/misc/traders_debug.sql
💤 Files with no reviewable changes (1)
- apps/cowswap-frontend/src/modules/affiliate/misc/trader_debug.sql
🚧 Files skipped from review as they are similar to previous changes (5)
- apps/cowswap-frontend/src/modules/affiliate/misc/traders.sql
- apps/cowswap-frontend/src/modules/affiliate/misc/traders_debug.sql
- apps/cowswap-frontend/src/modules/affiliate/misc/affiliate_data_issues.sql
- apps/cowswap-frontend/src/modules/affiliate/misc/payouts.sql
- apps/cowswap-frontend/src/modules/affiliate/misc/fac_trades.sql
|
Hey @kernelwhisperer , could you please provide a bit more clear test steps? What in particular I should test? |
Mainly this one ETH-flow orders are not included into referral volume (I tested it myself with 2 trades on gnosis, looks like Nitish fixed it) |
elena-zh
left a comment
There was a problem hiding this comment.
Hey @kernelwhisperer , not all ETH-floe orders are included into referral volume. See details in https://www.notion.so/cownation/ETH-flow-orders-are-not-included-into-referral-volume-3298da5f04ca80dc9fa6f22c95c77b39?d=1b08da5f04ca83d39df0036b81134faf
shoom3301
left a comment
There was a problem hiding this comment.
I don't really have expertise here and it will take too much to obtain it. So I just blindly approve
Summary
Fixes:
fixa loophole allowing you to create a code that was used on staging and get those rewardsfixhandle fee bps being null in SQL queriesfixactive traders being computed wronglyfeatallow to deny addresses in payoutsfeatnew dashboard to check for missing fee & missing envchorenew query to analyze ETH-flow orders are not included into referral volumeContext:
Summary by CodeRabbit
New Features
Bug Fixes
Chores