cowprotocol / dune-sync

Components for syncing off-chain data with Dune Community Sources
4 stars 1 forks source link

Add looser block deadline in order rewards query #96

Closed harisang closed 7 months ago

harisang commented 7 months ago

I am tempted to say that there is a bug in the order rewards query. Specifically, it seems that the following case might happen:

To address this, we propose to add some very generous buffer in the block_deadline considered, so as to ensure all relevant info about the trades are pulled together and joined in the final table.

Note: this was first noticed when i was trying to fix the integration test for PR #94 , and because of that, I opened issue #95. This PR addresses this issue.

As a final comment, an alternative would be to actually not do the above and try to only use block_deadline, similar to the batch rewards query.

harisang commented 7 months ago

ok let's issue a release now with this, and we can revisit it soon as we will probably need some minor changes regarding integrator fees that should be implemented in the next few days.