Overview
Allocation Strategy

Voting Strategy

Voting Strategy Introduction

The Voting Strategy contract is used to determine which projects in a round should receive funding.

When a funding Round begins, voting will be opened. Voters will then vote on which projects they want to receive funding. The specifics of who can cast votes, how those votes are counted, and how much a project receives from votes will depend on the specifics of your unique Voting Strategy.

Grant programs can choose to use the existing Quadratic Funding voting strategy, or implement a custom strategy. There are many design considerations to account for when creating a custom Voting Strategy including who can vote and how those votes are counted. These are explored in more detail on the Getting Started page.

Voting Strategy Interface

While voting takes place on the Round contract, the logic for how a round handles voting is implemented in a Voting Strategy contract that adheres to the IVotingStrategy interface (opens in a new tab).

The interface contract provides a few methods and modifiers to help you implement a custom Voting Strategy. See the Interface and Spec page for more details.

A Round contract will call the init() method of a Voting Strategy when the Round is itself initialized. This will set the value for the roundAddress state variable, which serves two purposes: one preventing reinitialization and adding authorization to certain methods that should only be called by the Round contract.

Your implementation of the IVotingStrategy interface should implement a vote(bytes[],address) method. This is where your custom vote-counting logic should live.

Quadratic Funding Voting Strategy

Gitcoin uses a Quadratic Funding Voting Strategy (opens in a new tab) for all of its Rounds. If you wish to use the same strategy, you must deploy an instance of the Voting Strategy contract using the Factory (see Contracts) before you create a new Round with the Round Factory (see Contracts).