# Swaps

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

[Collateral value](https://kresko.gitbook.io/kresko-docs/fundamentals/cdps/..#collateral-deposit-value) available in the [SCDP](https://kresko.gitbook.io/kresko-docs/fundamentals/cdps/scdp) is utilized by accounts swapping their [Kresko Assets](https://kresko.gitbook.io/kresko-docs/fundamentals/kresko-assets) for an equivalent value of another Kresko Asset, minus a [fee](#fees).&#x20;

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

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

<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.&#x20;

<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.&#x20;
{% endhint %}

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

<br>

<br>
