> For the complete documentation index, see [llms.txt](https://zeebit.gitbook.io/zeebit.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://zeebit.gitbook.io/zeebit.io/technical-overview/smart-contract-structures/settlement-profiles-and-revenue-share-contract.md).

# Settlement, Profiles & Revenue Share Contract

The last of the core smart contracts deals with settlement of funds, maintenance of on-chain state like profiles and ranks, tracking statistics and handling revenue share distribution.

Think of it like an automated, ecosystem-wide teller that enables pool and protocol funds to be moved around in accordance with pre-specified rules – all without the ability or need for any influence from individuals or organisations to authorise any given transaction.

When the game rules have been applied and the conditions of a bet accepted by the game’s contract, an invocation is made to this contract requesting that the appropriate transfers take place to fund the bet and to place a temporary hold on the amount that might be paid out to the player should they win. The contract dynamically determines if the pool has sufficient funds to take on this bet, and that it is within an acceptable range. &#x20;

After randomness has been provided and the game has performed and assessed each bet, it invokes this contract once again, requesting that it settle the bet as required. Funds are settled directly into the player’s wallet in the event of a win, or the temporary liability and player wager can be released and made available for future wagers in the event of a loss.

The contract also updates various elements of state - keeping track of key player, platform and ecosystem metrics and statistics – like volumes bet, won and lost. It determines XP, rakeback and revenue share across all of the different ecosystem roles and distributes this to the relevant parties - all automatically within a single, lightning-fast settlement transaction.

<br>


---

# 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:

```
GET https://zeebit.gitbook.io/zeebit.io/technical-overview/smart-contract-structures/settlement-profiles-and-revenue-share-contract.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
