Skip to content
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

Support Bulk Grant Contributions in a Single Transaction #76

Closed
apbendi opened this issue Aug 2, 2021 · 0 comments · Fixed by #96
Closed

Support Bulk Grant Contributions in a Single Transaction #76

apbendi opened this issue Aug 2, 2021 · 0 comments · Fixed by #96
Assignees
Labels
contracts Smart contract issues

Comments

@apbendi
Copy link
Collaborator

apbendi commented Aug 2, 2021

The current swapAndDonate method supports:

  • Donating an arbitrary token
  • To a single Grant
  • In multiple Rounds

We want to update this to support:

  • Donating an arbitrary token
  • To multiple Grants
  • In multiple denominations (e.g. 1 Grant receives 5 Dai and another 10 Dai)
  • In multiple Rounds

To do this efficiently, it probably makes sense to first execute a single swap to donationToken, then transfer donationTokens to N Grant payee addresses. The assumption here is that 1 swap and N transfers is going to be less expensive than N swaps.

The caller should provide a proportion for each grant receiving a donation. The proportions should be applied to the total donationToken received after the swap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contracts Smart contract issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants