# Bet Cancelation

### **Initial State**

#### Assumptions

* [wagering](https://sgenetwork.gitbook.io/documentation-1/sge-network/technical-specifications/flow-of-funds/wagering "mention")

#### State

This is the state of the funds after bet placement.

**Balances Table**

<table><thead><tr><th width="224">Bettor</th><th width="160.66666666666663">BetFeeCollector</th><th width="189">OrderBookLiquidity</th><th>Market Creator</th></tr></thead><tbody><tr><td><code>999,989,950usge</code></td><td><code>0usge</code></td><td><code>10,045usge</code></td><td><code>1,000usge</code></td></tr></tbody></table>

**Participation Table**

<table><thead><tr><th width="259">Participant</th><th width="231.66666666666663">Liquidity amount</th><th>HouseFeeCollector Balance</th></tr></thead><tbody><tr><td>Participant 1</td><td><code>998,500usge</code></td><td><code>500usge</code></td></tr><tr><td>Participant 2</td><td><code>999,500usge</code></td><td><code>500usge</code></td></tr></tbody></table>

### **Cancelation State**

#### Calculations

* The bettor Balance: The bet amount and the fee will be returned to the bettor and the balance would be the same as the initial state `1,000,000,005usge`
* Order Book Liquidity Balance: The deposit amount will be returned to the Participant1 balance `10,000usge`
* House Fee Collector Balance: The deposit fee will be returned to the Participant1 and Participant2 balances so the module account balance will be `0usge`
* Participant 1: Will receive the deposit and the house fee.
* Participant 2: Will receive the deposit and the house fee.

#### State

**Betting Table**

<table><thead><tr><th width="224">Bettor</th><th width="160.66666666666663">BetFeeCollector</th><th width="189">OrderBookLiquidity</th><th>Market Creator</th></tr></thead><tbody><tr><td><code>1,000,000,000usge</code> </td><td><code>0usge</code></td><td><code>0usge</code></td><td><code>1,000usge</code></td></tr></tbody></table>

**Participation Table**

<table><thead><tr><th width="259">Participant</th><th width="231.66666666666663">Liquidity amount</th><th>HouseFeeCollector Balance</th></tr></thead><tbody><tr><td>Participant 1</td><td><code>1,000,000usge</code></td><td><code>0usge</code></td></tr><tr><td>Participant 2</td><td><code>1,000,000usge</code></td><td><code>0usge</code></td></tr></tbody></table>
