MVM: Avoid delayed claim issue by adding claimable from reimbursed #271
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.
NOTE: This issue was only affecting the amount that the foundation would be able to claim from the MVM after there were some reimbursements made to token holders (via
sendTokens
transactions). We think the impact was not really high because it only delays the amount that the foundation could claim for the burned tokens (only for those tokens) depending on when thesendTokens
tx is made:If the
sendTokens
tx is made early on the MVM lifetime, the amount that the foundation could claim from those tokens is super low, because of the distribution curve that follows an exponential distribution where the distribution amounts are low at the beginning and high approaching the end of the lifetime).If the
sendTokens
tx is made later, then even though the amount that the foundation could claim from those tokens would be higher, but having to wait until the end of MVM lifetime is not as high of an impact, precisely because the end of the MVM lifetime is close.Detailed explanation
Reimbursed ether in exchange of tokens in the MVM reduces the circulation which is involved in calculating the max claimable wei amount by the foundation, effectively delaying the amount claimable from those tokens until the MVM lifetime finishes. To recover that amount and avoid the delayed claim issue, we have to calculate and add the claimable from the burned tokens as the difference between the max amount claimable from those tokens (at the beginning of the MVM, using initialBuyPrice) and the amount effectively reimbursed.
Thanks to CoinFabrik for reporting this issue as part of their exhaustive LifToken audit!