-
Notifications
You must be signed in to change notification settings - Fork 19
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
Feature: Add the MEV earned per epoch in the ValidatorHistoryAccount #6
Labels
good first issue
Good for newcomers
Comments
hey @buffalu , I'd like to work on this, can you please assign me? |
ebatsell
pushed a commit
that referenced
this issue
Jan 26, 2024
I took a stab at #6 , saw it's been open for a few weeks mainly out of wanting to learn, this is my first experience w/ Anchor, solana programs, instructions etc etc I'd love a review to see if I thought about the issue correctly, but i'm happy to close it out or collaborate w/ the assignee of #6 to get this in
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
The ValidatorHistoryAccount should track the MEV earned per epoch for every validator on-chain. This allows one to determine the MEV / stake amount on-chain to determine how much MEV relative to stake every validator is receiving.
Describe the solution you'd like
The MEV earned every epoch is stored in the TipDistributionAccount, a PDA owned by the tip distribution program. After the merkle root is uploaded, the max_total_claim field can be referenced to find the total amount of MEV earned by the validator for a given epoch.
This can likely be copied over to the ValidatorHistory account in a modified version of the update_mev_comission instruction, which loads the tip distribution account. There would be a slight change to relax the epoch constraint and pass in the epoch as instruction data and ensure the MEV tips update the ValidatorHistoryAccount for the correct epoch.
In fact, it may be worth it to relax the epoch constraint on the update_mev_comission instruction as well to allow one to backfill missed epochs.
The text was updated successfully, but these errors were encountered: