PoolTogether 3.0
HomeAppBuilder
v3.0.1
v3.0.1
  • ✨Introduction
  • 📡Networks
  • 💱Migrating from V2 to V3
  • 🚰Resources
  • Protocol
    • 🌐Overview
    • 🏆Prize Pools
      • ⚖️ Fairness
      • Compound Prize Pool
      • yVault Prize Pool
      • Token Listener
    • 💸Prize Strategies
      • 🤑Single Random Winner
        • 🎟️ Ticket
        • 🎁Sponsorship
    • 🧞Random Number Generator
      • Blockhash
      • Chainlink VRF
  • Tutorials
    • Getting Started
    • Deposit into a Prize Pool
    • Withdraw from a Prize Pool
    • Create a Prize Pool
    • Create a Prize Strategy
  • Governance
    • 🏛️ Overview
    • 💰Comptroller
  • Security
    • Risks
    • Audits & Testing
    • Bounties
Powered by GitBook
On this page
  • How it works
  • Architecture
  • Prize Pools
  • Prize Strategies
  • Builders
  • Random Number Generator
  • Comptroller
  • Conventions
  • Gas Station Network

Was this helpful?

  1. Protocol

Overview

What are No-Loss Prize Games?

PreviousResourcesNextPrize Pools

Last updated 4 years ago

Was this helpful?

No-loss prize games are pools of funds whose accrued interest is distributed as prizes.

The high level protocol architecture is outlined below. The code is available on .

How it works

  1. Users deposit funds into a Prize Pool. They receive pool tokens in exchange.

  2. The funds earn interest.

  3. The interest is distributed by the Prize Strategy as pool tokens.

  4. Users withdraw their funds at any time by telling the Prize Pool to burn their pool tokens.

Architecture

Prize Pools are the central building block of prize games. They pool user funds in a yield source and expose the yield to their Prize Strategy, which then disburses as desired.

Prize Pools can be differentiated in four primary ways:

  • The yield source the prize pool uses to generate no loss return

  • The prize strategy used to determine frequency and distribution

  • The rewards offered by the prize pool

  • The asset type the prize pool accepts for deposits

  • The fairness parameters

Prize Strategies determine the prize distribution for the Prize Pool. They can define any logic to allocate tokens that the prize pool accrues. Specifically they can:

  • Award yield in the Prize Pool as pool tokens

  • Award ERC20 tokens held by the Prize Pool

  • Award ERC721 tokens held by the Prize Pool

Builders

There are many different ways to generate a random number, so we've abstracted them as request-based Random Number Generator services. Each RNG service has a different security profile, so be sure to use the appropriate one for your game.

Comptroller

Comptrollers make it simple to "drip" tokens to players. Comptrollers listen for token mints, transfers and burns and drip tokens accordingly. The global PoolTogether governance comptroller is baked into every Prize Pool, so rewards can be dripped to all prize games.

Conventions

Fixed point math is used extensively in PoolTogether. We used fixed point math with 18 decimal places for all fractional numbers. You can think of this as being just like Ether and wei: a value of "1" Ether is represented as "1000000000000000000" wei.

When a number is a fixed point 18 number we always suffix the number with mantissa. For example the credit rate is written as creditRateMantissa, because it is a fixed point number.

Gas Station Network

Builders make it easy to create pre-configured prize games. The first builder offered by PoolTogether is the Compound Single Random Winner Builder, which creates a bound to a prize strategy and a token as the pool token.

PoolTogether supports the . The Gas Station Network is an open source system for meta-transactions on Ethereum. The GSN consists of smart contracts, relayers, and a protocol to support a decentralized meta transaction relayer network.

The PoolTogether smart contracts support GSNv2 by inheriting from the contract and being bound to a trusted forwarder. The contracts are tooled so that they support GSN transactions.

🌐
Github
Prize Pools
Prize Strategies
Compound Prize Pool
Single Random Winner
Ticket
Random Number Generator
Gas Station Network 2.0
BaseRelayRecipient