MatchingRoundcontract contains the logic of a Kickflow match-funding round. It collects sponsorship funds, accepts project entries, allows contributions and finally withdrawal of match amount by the projects.
The Matching Round is governed by Flow DAO, and there are certain protected entrypoints that can only be called by a proposal that has passed the vote in the DAO.
For every new match-funding round, a fresh
MatchingRoundcontract is deployed. The currently active round contract's address is stored in the
The round contract to which the
DonationHandlerpoints too, can be changed by submitting a proposal in the DAO. This essentially means that every new match-funding round must be approved by the DAO.
Fresh Matching Round being approved by the DAO
Sponsorships for a match-funding round are collected preferably in a stablecoin, the address of which is mentioned in the storage. A stablecoin is chosen due to its relatively low price volatility, which assists in match amount calculation.
Right after a round is approved by the DAO, it is opened up to sponsorship collection and project entries. Sponsoring and entries continue for a pre-decided period of time (specified in the proposal).
Post this, the community can make their contributions that would be counted in the CLR match calculation of the project entries. Once the contribution period is over, there is a brief cooldown period, followed by which the DAO sets the CLR matches of the entries. The projects can then retrieve their match amount after a brief challenge period when the CLR matches set by the DAO can be disputed and reset through another proposal.
Lifecycle of a Match-Funding Round
Projects can enter a round by supplying their Tezos address to the
enter_roundentrypoint. Every entry must deposit a returnable stake in tez. The value of the deposit could vary across rounds.
The security deposit is a part of one of the multiple collusion prevention aspects. It would keep spam entries at bay.
Contributions are handled in a two-step process-
- Calling of the
donateentrypoint in the
DonationHandlercontract, to relay the contribution amount to the project's wallet address.
- The donate entrypoint subsequently making an inter-contract call to the
MatchingRoundcontract and record the amount, contributor address and token of contribution.
Contributions must be made in a token that is present in the
token_setof the round. The set of tokens that would be accepted during a round are predefined during contract deployment. Contributions are accepted only from a limited number of tokens based on their present market liquidity and ease of fetching the price during CLR match calculation.
Disqualification is done by means of submitting a proposal in the DAO. The
disqualifyentrypoint is called by a proposal that has passed the vote.
Once the community contributions stop, a cooldown period starts in the round, which gives extra time to the community to identify and remove potential violaters from the round.
As mentioned above, the disqualified project loses its security stake.
The CLR matches that the entries would be retrieving from the sponsor pool is also set by means of submitting a proposal in the DAO. The CLR matches are calculated off-chain for precision and to overcome the limitations of gas on the blockchain.
The matches can be set only after the cooldown period is over. Once the DAO sets the match, a brief challenge period begins, during which the currently set matches can be disputed and set again by means of a fresh proposal.