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

Differentiate between different Safe fees #144

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions cowprotocol/accounting/rewards/partner_fees_query_3602560.sql
Original file line number Diff line number Diff line change
Expand Up @@ -61,45 +61,45 @@ per_recipient_partner_fees as (
widget_app_code,
case
-- mainnet
when '{{blockchain}}' = 'ethereum' and partner_recipient = 0x63695eee2c3141bde314c5a6f89b98e62808d716 then sum(0.9 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'ethereum' and partner_recipient = 0x63695eee2c3141bde314c5a6f89b98e62808d716 and app_code != 'CoW Swap-SafeApp' then sum(0.9 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'ethereum' and partner_recipient = 0x352a3666b27bb09aca7b4a71ed624429b7549551 then sum(0.85 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'ethereum' and partner_recipient = 0xe37da2d07e769b7fcb808bdeaeffb84561ff4eca then sum(0.85 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'ethereum' and partner_recipient = 0x90a48d5cf7343b08da12e067680b4c6dbfe551be then sum(0.85 * raw_integrator_fee_in_eth)
-- gnosis
when '{{blockchain}}' = 'gnosis' and partner_recipient = 0x63695eee2c3141bde314c5a6f89b98e62808d716 then sum(0.9 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'gnosis' and partner_recipient = 0x63695eee2c3141bde314c5a6f89b98e62808d716 and app_code != 'CoW Swap-SafeApp' then sum(0.9 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'gnosis' and partner_recipient = 0x352a3666b27bb09aca7b4a71ed624429b7549551 then sum(0.85 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'gnosis' and partner_recipient = 0x8387fae9951724c00c753797b22b897111750673 then sum(0.85 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'gnosis' and partner_recipient = 0xb0E3175341794D1dc8E5F02a02F9D26989EbedB3 then sum(0.85 * raw_integrator_fee_in_eth)
-- arbitrum
when '{{blockchain}}' = 'arbitrum' and partner_recipient = 0x63695eee2c3141bde314c5a6f89b98e62808d716 then sum(0.9 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'arbitrum' and partner_recipient = 0x63695eee2c3141bde314c5a6f89b98e62808d716 and app_code != 'CoW Swap-SafeApp' then sum(0.9 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'arbitrum' and partner_recipient = 0x352a3666b27bb09aca7b4a71ed624429b7549551 then sum(0.85 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'arbitrum' and partner_recipient = 0x86cd2bBC859E797B75D86E6eEEC1a726A9284c23 then sum(0.85 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'arbitrum' and partner_recipient = 0x38276553F8fbf2A027D901F8be45f00373d8Dd48 then sum(0.85 * raw_integrator_fee_in_eth)
-- base
when '{{blockchain}}' = 'base' and partner_recipient = 0x63695eee2c3141bde314c5a6f89b98e62808d716 then sum(0.9 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'base' and partner_recipient = 0x63695eee2c3141bde314c5a6f89b98e62808d716 and app_code != 'CoW Swap-SafeApp' then sum(0.9 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'base' and partner_recipient = 0x352a3666b27bb09aca7b4a71ed624429b7549551 then sum(0.85 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'base' and partner_recipient = 0xAf1c727B605530AcDb00906a158E817f41aFD778 then sum(0.85 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'base' and partner_recipient = 0x9c9aA90363630d4ab1D9dbF416cc3BBC8d3Ed502 then sum(0.85 * raw_integrator_fee_in_eth)
else sum(0.5 * raw_integrator_fee_in_eth)
end as partner_fee_part,
case
-- mainnet
when '{{blockchain}}' = 'ethereum' and partner_recipient = 0x63695eee2c3141bde314c5a6f89b98e62808d716 then sum(0.1 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'ethereum' and partner_recipient = 0x63695eee2c3141bde314c5a6f89b98e62808d716 and app_code != 'CoW Swap-SafeApp' then sum(0.1 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'ethereum' and partner_recipient = 0x352a3666b27bb09aca7b4a71ed624429b7549551 then sum(0.15 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'ethereum' and partner_recipient = 0xe37da2d07e769b7fcb808bdeaeffb84561ff4eca then sum(0.15 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'ethereum' and partner_recipient = 0x90a48d5cf7343b08da12e067680b4c6dbfe551be then sum(0.15 * raw_integrator_fee_in_eth)
-- gnosis
when '{{blockchain}}' = 'gnosis' and partner_recipient = 0x63695eee2c3141bde314c5a6f89b98e62808d716 then sum(0.1 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'gnosis' and partner_recipient = 0x63695eee2c3141bde314c5a6f89b98e62808d716 and app_code != 'CoW Swap-SafeApp' then sum(0.1 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'gnosis' and partner_recipient = 0x352a3666b27bb09aca7b4a71ed624429b7549551 then sum(0.15 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'gnosis' and partner_recipient = 0x8387fae9951724c00c753797b22b897111750673 then sum(0.15 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'gnosis' and partner_recipient = 0xb0E3175341794D1dc8E5F02a02F9D26989EbedB3 then sum(0.15 * raw_integrator_fee_in_eth)
-- arbitrum
when '{{blockchain}}' = 'arbitrum' and partner_recipient = 0x63695eee2c3141bde314c5a6f89b98e62808d716 then sum(0.1 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'arbitrum' and partner_recipient = 0x63695eee2c3141bde314c5a6f89b98e62808d716 and app_code != 'CoW Swap-SafeApp' then sum(0.1 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'arbitrum' and partner_recipient = 0x352a3666b27bb09aca7b4a71ed624429b7549551 then sum(0.15 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'arbitrum' and partner_recipient = 0x86cd2bBC859E797B75D86E6eEEC1a726A9284c23 then sum(0.15 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'arbitrum' and partner_recipient = 0x38276553F8fbf2A027D901F8be45f00373d8Dd48 then sum(0.15 * raw_integrator_fee_in_eth)
-- base
when '{{blockchain}}' = 'base' and partner_recipient = 0x63695eee2c3141bde314c5a6f89b98e62808d716 then sum(0.1 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'base' and partner_recipient = 0x63695eee2c3141bde314c5a6f89b98e62808d716 and app_code != 'CoW Swap-SafeApp' then sum(0.1 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'base' and partner_recipient = 0x352a3666b27bb09aca7b4a71ed624429b7549551 then sum(0.15 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'base' and partner_recipient = 0xAf1c727B605530AcDb00906a158E817f41aFD778 then sum(0.15 * raw_integrator_fee_in_eth)
when '{{blockchain}}' = 'base' and partner_recipient = 0x9c9aA90363630d4ab1D9dbF416cc3BBC8d3Ed502 then sum(0.15 * raw_integrator_fee_in_eth)
Expand Down