-
Notifications
You must be signed in to change notification settings - Fork 24
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
Freeze observations after shutdown #112
Freeze observations after shutdown #112
Conversation
LCOV of commit
|
…vations are finalized
LCOV of commit
|
src/PrizePool.sol
Outdated
// Any new contributions will be made to the draw ID immediately after shutdown. | ||
// The shutdown balances are calculated using the newest observations and do not rely on draw ID. | ||
_drawId = getDrawIdPriorToShutdown() + 1; | ||
_totalAccumulator.add(_amount, _drawId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think locking the draw id makes a ton of sense! This is the right approach.
If we don't update the vault accumulator then other functions will break: getContributedBetween
, getVaultPortion
, etc. We don't know how those functions will be used; so ideally we can keep them working as long as possible.
Instead I think we should insert the locking logic into the getOpenDrawId
function, because that will have a broader trickle-down effect. Anything bound to getOpenDrawId
will still be "correct", and the other functions will still work.
LCOV of commit
|
f26119f
into
gen-1337-investigate-shutdownbalanceof-logic
See description of issue here: #111 (comment)