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