-
Notifications
You must be signed in to change notification settings - Fork 141
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
Reward distributor improvements #881
Conversation
…ired distribution
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## development #881 +/- ##
===============================================
+ Coverage 96.64% 96.67% +0.03%
===============================================
Files 241 241
Lines 65544 65993 +449
===============================================
+ Hits 63347 63802 +455
+ Misses 2197 2191 -6 ☔ View full report in Codecov by Sentry. |
aa30ec7
to
31c6813
Compare
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.
great findings, especially the one to do with pausing an already expired distribution. totally missed it before.
lgtm!
7ae6bd3
to
5267dfe
Compare
This does a few things:
Adds an undistributed rewards query to the distributor so that you can check how many rewards would be withdrawn.
Fixes a bug pausing an already expired linear distribution. This isn't a vulnerability, but it should be possible, and there was just a minor logic error.
Adds the ability to fund the most recent distribution, without knowing its ID. This is useful when creating CW20 distributions. Because we can't verify the sender of a CW20 token send contract execution, we can't allow creating new distributions with initial CW20 funds (since the contract owner must create new distributions). Instead, the DAO can create a distribution AND fund the latest distribution (without knowing its ID) in one proposal.
Adds an
open_funding
flag so the owner can decide if a distribution can be funded by accounts other than the owner. The owner can always fund a distribution.Fixes a bug causing pending rewards and undistributed rewards queries to fail if a linear distribution has not yet been funded.