> For the complete documentation index, see [llms.txt](https://kopio.gitbook.io/kopio-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kopio.gitbook.io/kopio-docs/fundamentals/cdps/scdp/swaps.md).

# Swaps

{% hint style="info" %}
**This documentation is a work in progress!**
{% endhint %}

[Collateral value](/kopio-docs/fundamentals/cdps.md#collateral-deposit-value) available in the [SCDP](/kopio-docs/fundamentals/cdps/scdp.md) is utilized by accounts swapping their [Kopio Assets](/kopio-docs/fundamentals/kresko-assets.md) for an equivalent value of another Kopio Asset, minus a [fee](#fees).

The account receives the desired Kopio Assets either as newly minted ones – incurring debt to the SCDP – or from available protocol owned collateral resulting from prior exchanges.

The assets provided by the trader in a swap contribute to repaying any outstanding debt tied to the specific asset.

<figure><img src="https://lh7-us.googleusercontent.com/c7-s7P0EIK18IIXjLSLmLBtBJXKrTEJFZ5MGUN2XeRHAvt-yHjDcvV8_RczAahVWQrLHCxC-LVrAzj5ovk3ivTazxhcjCh5HwLPuq02tBgQhrgMDgh9_esPFEugqDF6vEhZBOBE6lOY6QNtmkbYrBH8" alt="" width="563"><figcaption><p>Swap creating protocol owned collateral and new debt</p></figcaption></figure>

### Protocol Owned Collateral

In the scenario where the asset has no existing debt, the provided assets become temporary deposits within the SCDP, marked as protocol owned collateral.

<figure><img src="https://lh7-us.googleusercontent.com/gB9JYnTymSm2kh0JQ1BNR4mXY9davyS-k-uGAESxAkzCaTddI1ZSNIJkmffVPdyo-hWOHh_D_81DwPvWBYKfBE5dpyMON6_4QVtBxg_O62PbGNDk3eX6_Q7o1mQbiGfR27eh6kGiEfSM86d-untuH2U" alt="" width="563"><figcaption><p>Subsequent swap uses the protocol owned collateral and repays the debt</p></figcaption></figure>

This temporary deposit serves as valid collateral subject to liquidation and a reservoir for subsequent swaps, offering an alternative to minting new assets and enhancing the efficiency of the protocol's capital utilization.

## Fees

Swap fees are configured **per asset and direction**, thus the final fee percentage depends on the asset pair and direction taken.

{% hint style="success" %}
Fees are not used as collateral and can be claimed at any time. They cannot be seized in a liquidation.
{% endhint %}

<figure><img src="https://lh7-us.googleusercontent.com/d2EVCl9DXYtr9mZ3bCCzgw69Lof0LikIGfxh-wBarF84lPknSKj040-hAUgRDONXuqp5akzHBOLyfWJlOy2X29mK_6QfvyFmHhftT6ddBAtFi89n9vkkJBvl0TOrzoYar9ZN6U99GUJIzPio7plQ5Ro" alt="" width="563"><figcaption><p>Configuration of two Kopio Assets and the resulting fee distribution</p></figcaption></figure>

\\

\\


---

# 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://kopio.gitbook.io/kopio-docs/fundamentals/cdps/scdp/swaps.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.
