> For the complete documentation index, see [llms.txt](https://stargateprotocol.gitbook.io/stargate/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stargateprotocol.gitbook.io/stargate/v2-user-docs/whats-new-in-stargate-v2/credit-allocation-system.md).

# Credit Allocation System

## Credits and Credit Allocation System

Credits are a way of tracking inflows and outflows of tokens in the protocol. The credit allocation system is an on-chain mechanism that manages and distributes credits within the Stargate liquidity network. These credits are allocated across various transaction pathways according to demand of liquidity.&#x20;

The credit allocation system is enhanced by the inclusion of the Artificial Intelligence Planning Module (AIPM), an off-chain entity. The AIPM dynamically adjusts the distribution of credits across pathways in response to observed changes in volume and user behavior, optimizing liquidity, slippage, and fee structures for the protocol.&#x20;

## Instant Guaranteed Finality

Users & Applications can trust that when they successfully commit a transaction on the source chain, it will arrive on the destination chain. Instant Guaranteed Finality means that Stargate swaps are settled locally immediately, without the risk of revert, rollback or double spending on the source chain.&#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, and the optional `goal` query parameter:

```
GET https://stargateprotocol.gitbook.io/stargate/v2-user-docs/whats-new-in-stargate-v2/credit-allocation-system.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.
