This repository has been archived by the owner on Dec 20, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add protocol fees to dune #64
Add protocol fees to dune #64
Changes from 9 commits
a1713e7
5c63fc8
415cc89
46aeab2
78f7e60
30c5b85
76431e0
70401ce
210a4fe
ca65ccb
0cc12f1
8dfd308
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we call this something different? I am a bit confused as two lines later you use a
fee
term in theuncapped_payment_eth
computation, and it is probably not referring to this total fee. What exactly are you trying to compute here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could to
corrected_fee
and later selectcorrected_fee as fee
for the uploading. Changing the name for what we upload might be breaking dune queries (but not the queries we use for payments, I guess, which only depend oncapped_payment
).Another alternative is to repurpose the
fee
field to just be something like network fees. We do not use the field directly in the payment queries, so there it should be fine. Since protocol fees are synced explicitly, we can still recover the corrected quality on dune,quality = surplus + protocol_fee + fee
.With the implementation in this PR, we would still be able to do
quality = surplus + fees
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The query now computes
protocol_fee
andnetwork_fee
separately. The payment is thus byquality = surplus + protocol_fee + network_fee
.On dune, the entry
network_fee
is still called justfee
for now to not break existing queries.