> ## Documentation Index
> Fetch the complete documentation index at: https://docs.loopscale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Advanced Lending

Users can lend on Loopscale using:

1. **Loopscale Vaults:** A passive approach where funds are optimized by third-party Curators. Learn more about Vaults [here](/using-loopscale/earn).
2. **Advanced Lending:** A more hands-on approach that gives lenders control over terms, collateral, and rate. This page describes how to use advanced lending strategies.

With Advanced Lending, lenders place limit orders using a ruleset to define eligible collateral, durations, and rates. This means funds are "reusable" across markets, visible to borrowers on any matching order book.

## Open Position

1. Visit the [Lend](https://app.loopscale.com/lend) page
2. Choose an asset to lend (e.g., USDC)
3. Click **"View Market"** to configure your lending strategy

From here, you’ll define which collateral types you're willing to accept, interest rates for each loan duration (1-day, 1-week, 1-month, 3-month), and whether to enable <Tooltip tip="Idle funds are deposited to variable-rate protocols (e.g. MarginFi) while waiting to be filled">Optimized Yield</Tooltip>

<AccordionGroup>
  <Accordion title="Eligible Collateral">
    Lenders can choose which collateral types they'll accept. This helps price risk more accurately.

    For example, a lender may accept only stablecoins to minimize volatility risk, or choose to accept memecoins in exchange for higher interest rates.
  </Accordion>

  <Accordion title="Target APY">
    Specify fixed interest rates for each supported duration: 1 day, 1 week, 1 month, and 3 months.

    For example, offering a 5% APY for 1-month USDC loans means borrowers can borrow your USDC for that term at 5%, fixed until maturity.

    Interest rates are market-driven and set by lenders—not by protocol algorithms. More competitive rates are filled sooner. Longer terms usually command higher APYs.
  </Accordion>

  <Accordion title="Lend Idle Capital">
    Lenders can leverage Optimized Yield by keeping this toggle on. Optimized Yield deposits idle capital into partner variable-rate lending protocols (currently [marginfi](https://app.marginfi.com)) so your capital earns yield while waiting to be matched.
  </Accordion>
</AccordionGroup>

<Info>
  If this is your first time lending a specific token (or if you've deleted a
  past position), you'll pay a small one-time SOL rent fee. This is fully
  refundable when you delete the position later.
</Info>

## Manage Position

Once created, your position appears on the [Lend](https://app.loopscale.com/lend) page and in your [Portfolio](https://app.loopscale.com/portfolio).

<Tabs>
  <Tab title="View Position">
    You can view and manage all active positions:

    1. From the Portfolio, under the Advanced Lending section
    2. From the bottom of the Lend page for the selected token
  </Tab>

  <Tab title="Withdraw Funds">
    Unutilized capital can be withdrawn at any time:

    * Click "Deposit/Withdraw"
    * Select "Withdraw"

    To withdraw funds from an active loan (before maturity):

    1. Click "More"
    2. Select "View Loans"
    3. Choose "Withdraw Early" from any active loan

    <Info>Withdrawing early *may* (but not always) have a cost to reimburse borrowers, should the early withdrawl move the borrower to a higher APY offer.</Info>
  </Tab>

  <Tab title="Update Position">
    Position terms and settings (including Optimized Yield) can be updated at any time. To stop originating new loans from a position:

    1. Go to the position settings
    2. Toggle off "Allow new loans"

    After turning off new loans, all existing loans will continue to run until maturity and no new loans will be started.
  </Tab>

  <Tab title="Close Position">
    To fully close your lending position and reclaim the SOL rent fee (there must be no active loans):

    1. Click "More"
    2. Select "Delete Position"

    Historical position information is not available for deleted positions but new positions may be opened at any time.
  </Tab>
</Tabs>

## Defaults & Liquidations

Liquidations are automatically processed for Advanced Lending positions on Loopscale. If the position is lending to a loan that has defaulted:

* The borrower's collateral is automatically liquidated to repay you
* Recovered funds are returned to your lending position
