Closed apbendi closed 2 years ago
Should matching donations be allowed while the round is active, or only before?
I'd say it should ! The reason being this only affects how the distribution is calculated and it allows projects to get in more funds
Should a minimum round duration be enforced in any way at deployment?
Feels more like a nice to have than a necessity. Any reason you think this might be beneficial?
===============
Open Questions
grantRoundStatus
? (something like 0 -> raising. 1 -> active, 2 -> done, 3 -> payout complete as opposed to relying on start and end date)grantRoundStatus
-> might making the condition checking easier as opposed to relying on the dates)metadataPtr
?totalPot
? grants
(or is this Offchain ) More advanced but worth thinking
excludedAddressPtr
? (This is where certain addresses contributions must to be ignored while calculating the distribution) This could live
excludedAddressPtr
metadataPtr
If it's on the contract -> it can be updated only the owner.
This way while the contract doesn't deal with sybil detection. It provides a means to store that data and use that while deriving the distributionI was playing around with subgraph and this was what I was assuming the contract would have when I wrote that up https://github.com/dcgtc/dgrants/issues/10
I'd say it should ! The reason being this only affects how the distribution is calculated and it allows projects to get in more funds
I've updated the spec to reflect this, unless anyone else has an objection
Feels more like a nice to have than a necessity. Any reason you think this might be beneficial?
Just as a sanity check at deployment, basically. Agree it's probably not needed.
Would we allow the start-date / end-date to be extended ?
This one feels like a nice to have to me, at best, an anti-feature at worst (could it be exploited or used to manipulate the results or grief grantees by making matching funds unavailable, etc..)
Is there a variable for grantRoundStatus? (something like 0 -> raising. 1 -> active, 2 -> done, 3 -> payout complete as opposed to relying on start and end date)
This can be derived from the start & end timestamps along with the current timestamp. Are you proposing a convenience method that would return the state or something like that?
Can grants be added/removed once the round starts.
Since there was not consensus on whitelisting grants explicitly on chain, I left this out of the spec completely for now. The only requirement enforced is that the grantId
is a valid one. The assumption is that non-qualifying grants would simply be left out of the matching calculation.
Is there a variable for metadataPtr?
I've updated the spec to include this.
Is there a variable for totalPot?
This would just be token.balanceOf(roundContractAddress)
Is there a variable excludedAddressPtr ?
I'm not sure what you mean here. Is this in relation to contributors, and whether their contribution would be ignored by matching? If so, I think this is mixing of concerns and not something the Round
would worry about.
cc @corydickson see above where I've added a couple of points to the spec
This can be derived from the start & end timestamps along with the current timestamp. Are you proposing a convenience method that would return the state or something like that?
A convience method help but doesn't need to be on the contracts. We could build this out in subgraphs maybe ! I was asking if we see value GrantRound having more than 2 states Eg : is there value in creating a distinction between when a round ends and when payouts are done or is that an overkill ? ( I feel it is but just wanted to ask if anyone else sees a value here )
I'm not sure what you mean here. Is this in relation to contributors, and whether their contribution would be ignored by matching? If so, I think this is mixing of concerns and not something the Round would worry about.
Ah so we leave that to decision to whoever is calculating the distribution to ignore contributions AKA the list of bad addresses are not stored off/on chain ?
@thelostone-mc I think it makes sense to have some public boolean to represent when payout has been completed so there is a way to verify that the owner of the contract has released the funds and one does not necessarily need to consume an event to do so. Furthermore if we decide to add extensions to the start and end time, this can be an additional check prior to updating these values, i.e. ensure the grant has not been payed out previously.
Thoughts @apbendi ?
I can see a payout bool being useful, so I've added that to the spec @corydickson. Good idea @thelostone-mc.
Ah so we leave that to decision to whoever is calculating the distribution to ignore contributions AKA the list of bad addresses are not stored off/on chain ?
The details are debatable, but right now I feel it doesn't belong in the Round contract. Could be convinced otherwise down the road, but as I see it now, it makes sense for it to be done by a separate sybil module, or in the matching calculation.
Should matching donations be allowed while the round is active, or only before?
To be clear this means there's start time bound, or am I understanding that incorrectly?
start end date extensions
agree this is a nice to have, would recommend excluding from the MVP.
grants added or removed once the round starts
I can see this possibly being an attack vector that eventually skews the results if there's a matching contract involved (removal of grants will free up the pot, changes the CLR matches). Not a huge deal right now.
convenience method to return the state
also unsure what you're asking here, perhaps something to discuss, but perhaps out of scope for the MVP - start and end dates should be enough proxy information. edit: I saw Aditya's ticket about the subgraph, perhaps it's just a way to index and quickly query the state of GrantRounds? Maybe the answer is build a dumb version first then we optimize.
ignoring fraudulent contributions
I remember Philip and I talking about managing payout through a payout proposal (after contributions are made). It's analogous to the centralized version of "using Blockscience and then Aditya & Frank re-running results), it's just done programmatically. Unsure of what form that will take though.
I wrote up my thoughts on what the end of a GrantRound should look like which might help with some of these questions. My thoughts are as follows.
Regarding some of the questions we are discussing... Per my thoughts above, it seems like the GrantRound contract should have the necessary pieces to:
grants being added or removed once the round starts For this one I think we need to break it down into the reasons that anyone would want to add/remove a grant from a round once it has started and the affects of that action. A) Adding Grants: a.1. A new grant has been created that fits into the round based on the rounds themes a.2 A new theme has been added to the round B) Removing Grants: b.1. A grant has been determined to be fraudulent b.2. A grant has been determined not to fit the requirements of the round or entity b.3. A theme has been removed from the round
a.1. - I think this could be a setting on the GrantRound to determine if the owner wants this to be possible. a.2. - This doesn't feel like a good idea to me. After money has been put on the table assuming a set of conditions were true, those conditions would change if we were to allow this. (enforcing this would be hard until we got more programatic with grant selection and lists) b.1. - This totally makes sense and we would want to stop them from receiving any donation as well as matching funds b.2. - This should be caught before being added to a round or being approved through curation. If it did not however, it could be excluded from matching. b.3. - This is really something that shouldn't happen once the round has started.
round state I do think that a round should have a state. I initially had it in the contract but had it being manually set which shouldn't be necessary. I do think that there should be a state (or states) after round end for waiting for payout data (or payout data contract), waiting for payout data approval, payout approved, payout complete. Something along those lines.
great writeup, thanks Ben - some thoughts:
Some service/dao/party external from that contract would run some open source software against the blockchain and generate payout detail data that could be pushed to the blockchain or used to update the blockchain in some way to enable/unlock payouts for eligible grants
this feels very similar to what we do for centralized grants. I'm wondering if this is just an artifact that we hope to deprecate, and instead, once a round starts, we somehow (magically) compute the QF matching and prevent a high percentage of sybil and collusion attacks so payout at the end can be more automated. This fits within a more decentralized way of doing things. It's more ideal, but I'm also discounting a lot of the technical challenges involved there. Perhaps it's a stretch goal.
adding grants
agree that once the round kicks off, it represents an agreed-upon state for that round. Adding in Grants after the fact eventually leads to matching contract differences (possibly less money to go around) and the possibility of fraudulent grants making their way in.
the opposite way, removing grants from a round, benefit everyone except the grant being removed. The only reason that I see to prevent this from happening is to keep in-step with the "non-mutability" of a round once it's been started (if folks can't add, then they can't remove either).
round state
do we think we're over-engineering the possible states that might occur after a round ends? While it makes sense to me, it could be fruitful to leave it open and see how usage organically falls (instead of drawing out a path in the grass, we can just analyze the trample pattern after the fact).
closed with #17
This issue is a minimal spec for a smart contract implementing a single matching grant round.
owner
with special internal privileges (see below)startTime
timestamp that must in the future at the time of deploymentendTime
timestamp that must be after the startTimedonationToken
address that is assumed to be an ERC20 implementationregistry
address that refers to a GrantsRegistry instancemetaPtr
variable that is set at deploymentminContribution
variable that is set at deployment, representing the minimum matching contribution that can be made to a grant during the roundhasPaidOut
boolean variable that defaults to false, and toggles only when the owner calls the payout method (see below)endTime
, (including before thestartTime
), the Round can accept matching pool donations indonationToken
via a special method. Internally, the method should usetransferFrom
to take custody of the funds and emit an event.grantId
as a parameter, and verify that the Grant exists in the GrantRegistryamount
is greater than or equal to theminContribution
amounttransferFrom
to send the funds the Grant'spayee
addressowner
should be able to transfer all matching pool funds to apayoutAddress
via a special method call. Only the owner should be able to call this method, and only after theendTime
has passed.Open Questions:
Notes: