-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'exp-reset-all' into fix-audit-and-invariants
- Loading branch information
Showing
10 changed files
with
270 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
- Add properties check to ensure that the math is sound <- HUGE, let's add it now | ||
|
||
A vote is: User TS * Votes | ||
So an allocation should use that | ||
We need to remove the data from the valid allocation | ||
And not from a random one | ||
|
||
I think the best test is to simply store the contribution done | ||
And see whether removing it is idempotent | ||
|
||
We would need a ton of work to make it even better | ||
|
||
|
||
Specifically, if a user removes their votes, we need to see that reflect correctly | ||
Because that's key | ||
|
||
- From there, try fixing with a reset on deposit and withdraw | ||
|
||
- Add a test that checks every: initiative, user allocation, ensure they are zero after a deposit and a withdrawal | ||
- Add a test that checks every: X, ensure they use the correct TS | ||
|
||
- From there, reason around the deeper rounding errors | ||
|
||
|
||
|
||
Optimizations | ||
Put the data in the storage | ||
Remove all castings that are not safe | ||
Invariant test it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.