-
Notifications
You must be signed in to change notification settings - Fork 39
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
feat: dcurve #91
feat: dcurve #91
Conversation
@thelostone-mc - in
What's the use for match cap here? I think that was from downtown stimulus - we're not artificially limiting the cap, but we are normalizing when we hit saturation. |
The rest of the CLR logic LGTM. 👍 |
9cf2420
to
c626dae
Compare
6373349
to
d835977
Compare
All changes are in! Everything is working correctly, the If we're happy to optimise later, then this PR is good for review 🙌 @apbendi @phutchins @mds1 @frankchen07 @corydickson @wildmolasses @jferas - any feedback, please let us know and we'll get it sorted asap! 👍 Thanks for all your help here @thelostone-mc!! |
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.
This is awesomeeeeeee great job! Love all the code comments too, really helped me understand what's going on 😍
Personally I like avoiding reliance on the Graph for as long as possible because it does add another dependency / point of failure. Added some comments about the query options, and one other thing is we can cache events in IndexedDB if we want (caching in localStorage will fill it up too fast)
"dev": "echo 'TODO'", | ||
"build": "echo 'TODO'", | ||
"test": "echo 'TODO'", |
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.
Are these intentionally left as TODO
for now? Also I don't see any tests, but this feels like a good package for testing since we want to make sure the results are accurate. But we can create an issue for that and handle it at some future date
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.
yup ! we'd want to add this in soon
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.
@thelostone-mc Is there an issue for this? Just looked but might have missed it
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.
// get contributions and grantRound details | ||
const grantRoundArgs = await fetch({ | ||
provider: provider.value, | ||
grantRound: '0x8B4091997E3EbB87be90cEd3e50d8Bb27e1DC742', |
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.
kind of a nit, just wondering why it's not a constant here.
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.
This was just to demo/test that things are working, we will likely want to hook the prediction
call in rather than calculate
and we can probably avoid calling fetch
from the app
itself too.
We can remove these calls prior to merging 🙌
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.
All looks good!
distribution.hash = getMerkleRoot(distribution.merkle); | ||
} else { | ||
// empty state when we can't create a tree | ||
distribution.merkleError = 'Missing required context to build tree'; |
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 could definitely see this being used in a DAO UI as its something that is very much needed. It may be a while before we have that however so I could see going either way for the short term.
…ween predictions)
@dgrants/dcurve
This package allows you to create a distribution for a specific GrantRound based on the contributions recieved by the Grants.
This package is intended to be used
Structure
Examples/Testing
The distribution calculation has been (inefficiently) added to the datastore (
app/src/store/data.ts
) so that we can test the functionality ahead of getting this merged - please visit any page and check the console.