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

feat: add election funding and rewards mechanism #147

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

asmit27rai
Copy link
Contributor

Election Funding and Rewards

Description

This PR introduces a funding and rewards mechanism for elections. The feature allows election creators to fund their elections and distribute rewards to participants (e.g., voters or candidates) after the election ends. This incentivizes participation and enhances the overall user experience of the platform.

Changes

New Features

  1. Election Funding:

    • Added fundElection function.
    • Tracked total funds in a state variable (electionFund).
  2. Reward Distribution:

    • Implemented distributeRewards function to distribute funds after the election ends.
    • Supported multiple reward structures (e.g., equal distribution, winner-takes-all).

Fixes: #146

- Added `fundElection` function to allow election creators to deposit ETH or tokens.
- Implemented `distributeRewards` function to distribute funds to voters after election ends.
- Added events `ElectionFunded` and `RewardsDistributed` for transparency.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Election Funding and Rewards
1 participant