> For the complete documentation index, see [llms.txt](https://docs.helio.bet/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.helio.bet/fees-and-balances.md).

# Fees and balances

All amounts on this page use hTEST, the current pilot's valueless collateral token. Network gas is paid separately in ETH.

## Trading fee

The taker pays a fee on each completed incoming fill. The configured pilot rate is 20 basis points, or 0.2%, applied to the lower-priced outcome value.

For quantity q, UP price p in collateral units, and rate r:

```
fee = q × min(p, 1 - p) × r
```

The contract calculates this with integers and rounds the fee down to the collateral's six-decimal unit.

At an UP price of 0.55, 10 shares, and a 20-basis-point rate:

| Item                         |    hTEST |
| ---------------------------- | -------: |
| UP share payment             | 5.500000 |
| Taker fee: 10 × 0.45 × 0.002 | 0.009000 |
| Resting maker rebate         | 0.001800 |
| Protocol fee retained        | 0.007200 |

A taker buyer pays the fee in addition to the share payment. A taker seller receives proceeds after the fee. Resting makers pay no trading fee and receive one fifth of the collected fee, rounded down. The protocol receives the remainder.

The rate is fixed per series. Do not interpret 20 basis points as a flat charge on the full purchase payment.

Deposits, withdrawals, split/merge, and redemption have no additional exchange fee in this implementation. Transactions still incur network gas, including reverted transactions that reach the chain.

## Free, reserved, and escrowed collateral

A deposit credits free collateral in the exchange. A funded buy reserves collateral and, when applicable, an allowance for taker fees. A sell reserves outcome shares. The contract releases unused reservations after fills, cancellation, or expiry cleanup.

Complete pairs lock collateral in round escrow. Splitting one collateral unit creates one UP and one DOWN share. Merging an equal pair releases one unit back to your exchange balance. Equal free pairs remain mergeable before or after resolution.

The exchange tracks user ledger collateral, round escrow, and earned protocol fees separately:

```
accounted collateral =
  total user ledger collateral
  + total round escrow
  + accrued protocol fees
```

This accounting identity describes contract liabilities. It is not an audit or a guarantee against implementation defects.

## Outcome shares and collection

Free internal outcomes can be withdrawn to your wallet as the exchange's ERC1155 tokens. The same tokens can be deposited back into the internal ledger. Shares reserved in orders must first be released.

Redemption consumes free internal outcomes after resolution and credits their payout to free collateral. Payout fractions below one collateral micro-unit round down and remain in escrow.

The **Collect** action and wallet withdrawal are separate transactions. A completed collection does not mean funds have left the exchange contract.

The UI's net result includes trading fees and excludes ETH gas. Missing history or externally transferred shares can make a reliable net result unavailable.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.helio.bet/fees-and-balances.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
