> For the complete documentation index, see [llms.txt](https://limitless.gitbook.io/rammlend/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://limitless.gitbook.io/rammlend/products/universal-lending-pool.md).

# Universal Lending Pool

Perpetual/Floating Rate

**A universal lending pool is a vault<-> (isolated lending pool)s architecture that accepts&#x20;*****any*****&#x20;set of collateral/credit conditions, such as illiquid tokens or NFTs or a certain credit criterion(assuming a composable identity layer).** See the diagram in the *Borrowing from the pool* below.&#x20;

A RAMMLend's vault could host multiple lending pools where its collateral is either a singleton or a combination of collaterals. A lending pool will be supplied/withdrawn by the vault when managers issue or redeem `longZCB.`&#x20;

### Adding a new pool

A new lending pool can be added to the vault by anyone. The following information needs to a provided either through the UI or contract calls. More details in [parameter details](/rammlend/products/universal-lending-pool/parameter-details.md)

```cpp
// 1. CollateralInfo[], for each collateral. Includes params
// such as maxBorrowAble amount per unit collateral, collateral address, etc
struct CollateralInfo

// 2. Interest Rate Parameters
struct RateParams

// 3. Tranche Parameters applicable for all perpetual instruments, parametrizes the junior vs senior profit split 
struct PoolData
```

### Supplying to the pool

Whenever a manager issues `longZCB` for the given pool, the collateral presented + capital from the vault will be allocated to the lending pool.&#x20;

<img src="https://1265371261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxxJ0LIXf1rlOZ3GHpKwI%2Fuploads%2FOmF0PuvGslT8DLnZKhNj%2Ffile.excalidraw.svg?alt=media&amp;token=9fef0bb1-342a-44ee-95d6-01b5b8f2edaf" alt="High level of backend logic of supplying" class="gitbook-drawing">

### Withdrawing from the pool

Whenever a manager redeems `longZCB` for the given pool, the protocol withdraws funds from the lendingPool back to the vault, and the manager will realize his profit.&#x20;

<img src="https://1265371261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxxJ0LIXf1rlOZ3GHpKwI%2Fuploads%2FfinM8uRh1EyC5YUynT68%2Ffile.excalidraw.svg?alt=media&amp;token=a39eafa9-2bca-4c1c-8b36-a8f490696b48" alt="High level backend logic of withdrawing" class="gitbook-drawing">

### Borrowing from the pool

<img src="https://1265371261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxxJ0LIXf1rlOZ3GHpKwI%2Fuploads%2FWlB8lWCvh79GnYwkLnis%2Ffile.excalidraw.svg?alt=media&amp;token=4bc9f7c5-8512-47ab-96f1-155180927f52" alt="Dotted lines denotes capital is allocated from vault by the managers" class="gitbook-drawing">

### Investing in the pool directly&#x20;

An LP could also directly invest in the pool.&#x20;

<img src="https://1265371261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxxJ0LIXf1rlOZ3GHpKwI%2Fuploads%2F1umDtWOVsgBhofHsGIgB%2Ffile.excalidraw.svg?alt=media&amp;token=34eb378a-0f0e-41b5-b544-671b54517129" alt="" class="gitbook-drawing">

###

###
