> For the complete documentation index, see [llms.txt](https://docs.arenas.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.arenas.fi/credit-delegation.md).

# Boosted Yield (CDM)

The **Credit Delegation Module (CDM)** lets you put idle **SomniaLend** collateral to work earning Arenas yield. Instead of depositing stablecoins directly, you delegate the borrowing power of your SomniaLend position, and the CDM borrows against it to fund an Arenas pool.

***

### How it works

The CDM automates the **borrow-from-SomniaLend, deposit-to-Arenas** strategy in one place:

1. You keep collateral on **SomniaLend**, where it keeps earning its base supply yield.
2. You **delegate borrowing power** to the CDM using the standard credit-delegation interface.
3. The CDM **borrows against that delegated power** and **deposits the liquidity into an Arenas pool**.
4. While the pool's yield exceeds the borrow rate, you earn the **spread** as bonus yield, on top of the base supply yield you keep.

```mermaid
flowchart LR
    S[You · depositor] -->|1. supply collateral| SL[(SomniaLend · external)]
    S -->|2. approveDelegation| CDM[Credit Delegation Module]
    CDM -->|3. borrow onBehalfOf| SL
    CDM -->|4. deposit| Pools[(Arenas pools · Somnia)]
    Pools -->|spread / yield| S
```

***

### Credit delegation (the mechanism it builds on)

The CDM uses SomniaLend's native credit delegation, with nothing forked or reimplemented:

* You (the **delegator**) call `approveDelegation` on the relevant **`VariableDebtToken`**, authorizing the CDM (the **delegatee**) for an amount.
* The CDM calls `borrow` on the **`Pool`** with your address as `onBehalfOf`.
* SomniaLend's own rules still apply: the eMode category must match, and a borrow that would push your **health factor** below the liquidation threshold reverts. Your collateral must be supplied before the borrow executes.

***

### Contract address

On **Somnia** (chain `5031`):

| Name                            | Address                                                                                                                             |
| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| Credit Delegation Vault Factory | [`0x7d16B631B2134D48Fa6be13445191023dbF8D557`](https://mainnet.somnia.w3us.site/address/0x7d16B631B2134D48Fa6be13445191023dbF8D557) |

Your delegation runs through a vault deployed for you by this factory. Addresses for the liquidity layer are published by SomniaLend; see [docs.somnialend.finance](https://docs.somnialend.finance).

***

### Risk

This is a **leveraged** position. The borrowed amount accrues interest, your collateral remains subject to SomniaLend's health-factor and liquidation rules, and the Arenas financing itself carries credit risk. The bonus only holds while pool yield exceeds the borrow cost. See [Risks](/risks.md).

***

> **SomniaLend is an external protocol**, not operated by Arenas. Arenas uses its publicly available liquidity and the standard credit-delegation interface. It is one optional liquidity source, and it sets its own market parameters and risk rules. See [docs.somnialend.finance](https://docs.somnialend.finance) and [app.somnialend.finance](https://app.somnialend.finance).
