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

Improve fund burning and abstract costs #3

Open
2 tasks
Tomasvrba opened this issue Mar 6, 2020 · 0 comments
Open
2 tasks

Improve fund burning and abstract costs #3

Tomasvrba opened this issue Mar 6, 2020 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed P2 Medium priority

Comments

@Tomasvrba
Copy link
Contributor

Currently the burnSignal contract burns funds as follows:

Whenever funds are received on one of the VoteOptions contracts via the receive() function, two things happen:

There are two issues/areas for improvement with this approach:

  • This burn transfer happens on every deposit, adding an additional transaction to the network for each vote
  • The additional gas cost is incurred by the voter (roughly doubled since we are executing an extra transaction)

What should happen:

  • For efficiency, batch burn transactions together (e.g. when VoteOption contract balance surpasses a certain threshold)
  • Abstract the additional gas cost so it's not paid by the voter (e.g. Have the issuer of the proposal fund both the yes/no options with some funds to execute these transactions, these funds could be returned to the issuer after the deadline when the contract selfdestructs)
@Tomasvrba Tomasvrba added P2 Medium priority enhancement New feature or request help wanted Extra attention is needed labels Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed P2 Medium priority
Projects
None yet
Development

No branches or pull requests

1 participant