Skip to main content

Create a Custom Prize Vault

PoolTogether provides a default PrizeVault contract that enables new prize savings integrations to be spun up quickly using an underlying ERC4626 yield source, but the prize pool is permissionless and anyone can create a custom prize vault for integrations not covered by the default contract.

How to Create a Custom Prize Vault‚Äč

Custom prize vaults need to fulfill three basic requirements to participate in the prize pool:

  1. Store depositor balances in the prize pool's TWAB Controller (this can be done easily by extending the TwabERC20 base contract!)
  2. Contribute prize tokens to the prize pool by calling the contributePrizeTokens function
  3. Enable prizes to be claimed each draw (extend the Claimable contract to quickly enable automatic prize claims!)

Check out the custom prize vault example code to see how to create a custom vault in less than 50 lines of code!