> For the complete documentation index, see [llms.txt](https://wagergang.gitbook.io/wagergang/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wagergang.gitbook.io/wagergang/product/automated-play-pools.md).

# Automated Play Pools (APP)

### Basics

The **Automated Play Pool ("APP")** is a smart contract dedicated to each sport match.&#x20;

At first, it collects the bets on different outcomes (e.g. team A wins / team B wins / draw). Once the match starts, bets are closed until completion. Finally, at the settlement of the match, one outcome is declared winner, allowing winners to withdraw a share of the losers bets alongside their initial investment.

In other words, if your team wins the event, you win a share of the opposite team pool :sunglasses:&#x20;

> Automated Play Pool Lifecycle Overview

```
                   Bets collection                     Match
.-------------------------'------------------------.-----'-----.

>----------------------------o---------------------|===========$


>       : APP opening
o       : a bet from some adventurous coon
|       : freeze
$       : settlement
```

In essence, the APP is a zero sum game. The right balance between the different outcomes is ensured through arbitrage opportunities in the same way as it is established on Decentralized Exchanges ("DEX").

### Timely Rewards

The last thing we want is to see everyone placing a bet at the last second. To counter that, incentives are provided for placing a bet earlier.

The incentive consists of 2 components:

* reduction of fees proportional to the whole bets collection time span
* redistribution of the collected fees among the early players proportional to the amount of their bet and their earliness

> Automated Play Pool Fees & Incentives for a given bet

```
                   fee                saved fee  
          .---------'----------.----------'----------.

[>--------]--------------------o---------------------|===========$

[]      : no fees window
>       : APP opening
o       : bet
|       : freeze
$       : settlement
```

**The earlier you bet, the bigger the incentive!**

A "no fees" window is added at the beginning of the APP lifecycle to give a fair chance to the most incentive greedy coons out there.

### Staking Rewards

As the cherry on the cake, the amount invested in an APP is automatically staked to earn GANG tokens until the event resolution, at a rate most likely higher than the regular GANG staking pool.&#x20;

Once again, the earlier you enter the play pool, the more you farm GANG tokens!

### A word about Event Cancellation

When a sport event is cancelled, every coon is able to withdraw what he invested without enduring any fees (the incentives are then lost too). However the staking rewards are still earned!

![](/files/C0txufbfHbSV8kSrTlvi)
