Closed frankchen07 closed 4 years ago
After investigating the grants contracts and the subminer, I've come up with the following solution:
MetaTX gasPrice to 10% of grant payment (total when paying will show 110%, but same amount of transactions. This is essentially already done, was recently disabled because the amount we were charging (literally 0.01%, probably a bug it was set so low) was confusing people since a 10 DAI subscription cost 10.01 DAI).
The "gasPrice" for the metaTX is transferred from the grant subscriber to the address that calls the executeSubscription
function on the grant contract: https://github.com/gitcoinco/grants1337/blob/master/Subscription/Subscription.sol#L263
However, this can be theoretically called by anyone, and they will receive the gasPrice fee. This is a security risk, as a third party could step in and call the metaTX subscription executionand receive the 10% of tokens.
Note:
Here's the small update to the frontend that we'll need as well: https://github.com/gitcoinco/web/pull/4231/files
User Story
As a Gitcoin user, my grant contributions will go through a splitter contract which needs to be integrated with recurring donations (adds backend and subminer code).
Why Is this Needed
Sub-task of https://github.com/gitcoinco/web/issues/4064. This is part of getting the splitter contract to do what we want it to do.
Description
When a contributor makes a grant contribution for one-time, their contribution should go through the splitter contract, which should be integrated with the subminer backend, since it will be recurring.
Current Behavior
No integration.
Expected Behavior
Splitter contract integrated with recurring donations with the subminer.
Definition of Done