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

fix: track earned op rewards #510

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

amateima
Copy link
Collaborator

@amateima amateima commented Jan 12, 2025

This PR stores in DB how much OP have been earned so far.
The next step is to check in the OpRebateRewardConsumer that the total OP earned is less than 750K. If so, OP rewards will not be allocated to deposits.

SUM is a relatively expensive query so it would have been ineficient to compute the sum for each deposit eligible for OP rewards. My approach was to use a precomputed value

@amateima amateima merged commit a597779 into master Jan 13, 2025
2 checks passed
@amateima amateima deleted the amatei/keep-track-of-earned-op-rewards branch January 13, 2025 12:39
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