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

Come up with a way to calculate pool profitability #467

Closed
erikd opened this issue Jan 6, 2021 · 3 comments
Closed

Come up with a way to calculate pool profitability #467

erikd opened this issue Jan 6, 2021 · 3 comments

Comments

@erikd
Copy link
Contributor

erikd commented Jan 6, 2021

From @dmitrystas 's comment #415 (comment) .

Specifically the pool profitability calculation should not be affected by the possibility that some stake addresses that delegated to the pool may not be valid (and hence rewards to that invalid stake address got back to the reserves).

@erikd
Copy link
Contributor Author

erikd commented Jan 6, 2021

Maybe an orphaned_rewards table is the best solution. Will keep that in mind when implementing the fix for #415 .

@erikd
Copy link
Contributor Author

erikd commented Jan 6, 2021

Another way to represent it might be to keep it in the rewards table but make the addr_id field NULLABLE and use a NULL in that column to indicate that there is no valid address in that column. Alternatively, there could be another boolean column indicating whether the reward could be distributed.

Open to feedback on how this should be handled.

@erikd
Copy link
Contributor Author

erikd commented Jan 7, 2021

PR #469 adds an OrphanReward table and splits the rewards retrieved from ledger state into either the Reward or OrphanReward tables depending on whether the stake address is valid or invalid.

@erikd erikd closed this as completed in 37b0a65 Jan 8, 2021
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

No branches or pull requests

1 participant