Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add partner fees verification query #29

Merged
merged 9 commits into from
Sep 20, 2024

Conversation

harisang
Copy link
Contributor

This PR adds the query 3602560 that we use to verify partner fees each week under version control

@harisang harisang requested a review from fhenneke September 11, 2024 18:59
-- {{result}} - two views of the result, one aggregated and one on a per tx basis

with
per_settlement_prelim as (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is probably not per settlement but per trade

Suggested change
per_settlement_prelim as (
per_trade as (

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I did rename some of the tables. Let me know what you think.

Comment on lines 52 to 58
per_settlement as (
select *
from
per_settlement_prelim
where
raw_integrator_fee_in_eth > 0
),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To get a per settlement value you would probably need

Suggested change
per_settlement as (
select *
from
per_settlement_prelim
where
raw_integrator_fee_in_eth > 0
),
per_settlement as (
select
block_time,
tx_hash,
partner_recipient,
sum(est_partner_revenue) as est_partner_revenue,
sum(est_cow_revenue) as est_cow_revenue,
sum(raw_integrator_fee_in_eth) as raw_integrator_fee_in_eth
from
per_trade
where
raw_integrator_fee_in_eth > 0
),

@harisang harisang merged commit d7f5e6b into main Sep 20, 2024
1 check passed
@harisang harisang deleted the add_partner_fees_verification_query branch September 20, 2024 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants