Donation Handler

DonationHandler contract relays public donations during a match-funding round- to the respective projects and records the details of this contribution i.e the amount, the token used and the contributor address- in the MatchingRound contract.

The Donation Handler also points to the currently active round contract and the whitelist contract. These pointers can be changed by the DAO through a proposal.


The donate entrypoint of the contract is responsible for relaying the donations- either in tez or FA1.2 compliant tokens to the project's address and thereafter- call the contribute entrypoint of the currently active round contract. A call to donate terminates with an error if no round is currently active.

donate takes in a token_identifier as parameter. The token identifier could represent either of these-

  • Michelson PACK of the string "TEZ_IDENTIFIER"

  • Michelson PACK of the address of the FA1.2 token being contributed to a project.

The first value is supplied if the contribution is being made in tez, whereas the second value is supplied for a FA1.2 token contribution. The entrypoint handles the donation accordingly based on the token identifier value.

The token_identifier is a bytes type and using it makes it convenient to put both tez and token contributions under a single entrypoint.

Description of storage and entrypoint of Donation Handler could be found here.

Main Error Scenarios

Non-whitelisted Address

donate makes a call to the verify_whitelisted entrypoint of the Whitelist registry contract to confirm that the contributor is whitelisted. This is done to prevent an uncontrolled number of pseudonymous identities from showing up on Kickflow. Therefore, if a non-whitelisted address tries to make a contribution, the operation simple fails with an error message.

View the Whitelist section- to understand the registry and the whitelisting process.

No Active Round

Match-funding rounds on Kickflow happen periodically, and the DonationHandler could possibly not be pointing to any round contract if there is no ongoing funding round. This would result in an operation failure.

Incorrect Timing

Contributions must be made between the contribution_start and contribution_end timestamps of the MatchingRound contract. Contributions made outside of this time period would fail.

Double Contribution

Each whitelisted Tezos address can only contribute once to a specific entry in a match-funding round. Any subsequent contributions to the same entry would result in a failure.

Incorrect Token Identifier or Entry Address

The supplied token_identifier must be present in the token_set of the round contract. Attempts to contribute in any other token would result in a failure.

Similarly, the entry_address provided, must belong to one of the entries in the entries big_map.

Last updated