> For the complete documentation index, see [llms.txt](https://docs.native.org/native-dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.native.org/native-dev/legacy-v2/credit-based-swap.md).

# Credit-Based Swap

Credit-based Swap is a unique design from **Native Swap Engine** that provides the opportunity for private market makers (PMMs) to execute swaps using the **Native Credit Pool** as their inventory. In this process, PMMs are required to lock on-chain collateral to gain credits.

This approach enables higher capital efficiency for PMMs while offering liquidity providers a much simpler way to perform liquidity provisioning.

Check out this example for how the credit-based swap works:

{% content-ref url="/pages/kW0bmzxXy0w3UcZiNixq" %}
[Native Swap Engine](/native-dev/legacy-v2/native-swap-engine.md)
{% endcontent-ref %}

Learn more about PMM collateral and credits:

{% content-ref url="/pages/njJjDp5JPWfqf6KK2ny7" %}
[Collateral Factor](/native-dev/legacy-v2/credit-based-swap/collateral-factor.md)
{% endcontent-ref %}

{% content-ref url="/pages/FV3qYa1vnbvsPIa2BuGR" %}
[PMM Credit](/native-dev/legacy-v2/credit-based-swap/pmm-credit.md)
{% endcontent-ref %}


---

# 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://docs.native.org/native-dev/legacy-v2/credit-based-swap.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.
