> For the complete documentation index, see [llms.txt](https://custos-org.gitbook.io/custos/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://custos-org.gitbook.io/custos/rollocker/interactive-blocks/order-driven-dynamic-balanced-algorithm.md).

# Order-Driven Dynamic Balanced Algorithm

Order-Driven Dynamic Balanced Algorithm (ODBA) is a novel market-making algorithm pioneered by Custos. It is designed to balance the impact of varying times and position ratios on the market and reward distribution.&#x20;

Each time a user creates a position, a Pool Multiplier would be assigned to the order based on ODBA. This multiplier, combined with the position size and funding source, determines the share of earnings that the position will receive after the Cooldown Period ends.

The *<mark style="color:blue;">**Pool Multiplier**</mark>* consists of three dimensions:

* **Time-Priority Weight:** The farther the order is placed from the resolution time (i.e., the earlier in the Entry Period), the higher the weight assigned to that order.
* **Trend Weight:** This reflects the real-time ratio of buy and sell positions. In the event of a directional imbalance, orders placed in the opposite direction receive an additional weight bonus.
* **Bootstrapping Weight:** If there is no new orders placed in the market for a period of time, the next user to place a trade receives a higher weight for the position.

$$
Composite Weight = Position Size × PoolMultiplier
$$

> *For example:*
>
> *User A creates a YES position of 100 $DOGE on BTC price, with a Pool Multiplier of 4. The composite weight is 400 (100 \* 4).*
>
> *User B also creates a YES position of 1000 $DOGE on BTC price, with a Pool Multiplier of 1.2. The composite weight is 1200 (1000 \* 1.2).*
>
> *If both users predict correctly, they will share the reward pool proportionally based on their composite weight ratio:*
>
> * *User A’s earnings = \[400 / (1200 + 400)] ×  Pool Size*&#x20;
> * *User B's earnings = \[1200 / (1200 + 400)] × Pool Size*&#x20;


---

# 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://custos-org.gitbook.io/custos/rollocker/interactive-blocks/order-driven-dynamic-balanced-algorithm.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.
