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

# Withdrawing

> How to withdraw funds from the matching pool

This guide explains how to withdraw your funds from the Limora matching pool.

***

## Withdrawal Eligibility

You can withdraw funds that are **not currently matched** with active trades.

| Fund Status                | Can Withdraw?                      |
| -------------------------- | ---------------------------------- |
| Available (unmatched)      | ✅ Yes                              |
| Matched with active trade  | ❌ No, until trade closes           |
| Pending match confirmation | ❌ No, until confirmed or cancelled |

***

## Withdrawal Process

<Steps>
  <Step title="Check Available Balance">
    On the Match page, view your balances: - **Matched**: Funds in active
    positions (not withdrawable) - **Available**: Funds you can withdraw
  </Step>

  <Step title="Enter Withdrawal Amount">
    In the withdraw section, enter the amount you want to withdraw. - Minimum: 1
    USDC - Maximum: Your available balance
  </Step>

  <Step title="Confirm Withdrawal">
    Click "Withdraw" and confirm the transaction in your wallet.
  </Step>

  <Step title="Receive Funds">
    Once confirmed, USDC is transferred directly to your wallet.
  </Step>
</Steps>

***

## Understanding Availability

### Available Balance

Funds that are immediately withdrawable:

```
Available = Matching Balance - Matched - Pending
```

### Matched Funds

When you match a trade, those funds are locked until:

* The trader closes the position
* The trader is liquidated
* The trade expires (if applicable)

Once the trade settles, funds return to your Available balance (± P\&L from the trade).

***

## Partial vs. Full Withdrawal

### Partial Withdrawal

Withdraw any amount up to your Available balance while keeping the rest deposited for matching.

```
New Available = Current Available - Withdrawal Amount
```

### Full Withdrawal

Withdraw everything that's available. Note that if you have matched positions, you'll need to wait for them to close before withdrawing those funds.

***

## Withdrawal Timing

| Scenario          | Timing                       |
| ----------------- | ---------------------------- |
| Unmatched funds   | Immediate (1 transaction)    |
| Matched funds     | Must wait for trade to close |
| Trade just closed | Available immediately        |

***

## Withdrawal Fees

| Fee          | Amount        |
| ------------ | ------------- |
| Protocol Fee | None          |
| Network Gas  | \~\$0.02-0.05 |

Limora does not charge a fee for withdrawals. You only pay the Base network gas fee.

***

## Withdrawal Example

<Card title="Example: Partial Withdrawal">
  **Your Balances:**

  * Matching Balance: 5,000 USDC
  * Matched: 3,000 USDC
  * Available: 2,000 USDC

  **Action**: Withdraw 1,500 USDC

  **Result:**

  * Matching Balance: 3,500 USDC
  * Matched: 3,000 USDC (unchanged)
  * Available: 500 USDC
  * Wallet Balance: +1,500 USDC
</Card>

***

## What Happens When Trades Close?

When a trade you've matched closes:

1. **Settlement Calculation**

   ```
   Your Return = Your Contribution ± P&L + Interest Earned
   ```

2. **Funds Released**

   * P\&L calculated based on entry/exit prices
   * Interest added to your balance
   * Funds move from "Matched" to "Available"

3. **Example Settlements**

| Scenario          | Your P\&L | Interest | Net Return |
| ----------------- | --------- | -------- | ---------- |
| Trader lost 5%    | +50 USDC  | +2 USDC  | +52 USDC   |
| Trader gained 5%  | -50 USDC  | +2 USDC  | -48 USDC   |
| Trader broke even | 0 USDC    | +2 USDC  | +2 USDC    |

*Based on 1,000 USDC matched position*

***

## Exiting All Positions

If you want to fully exit Limora:

<Steps>
  <Step title="Stop Matching New Trades">
    Don't match any new trades while you're exiting.
  </Step>

  <Step title="Wait for Active Matches">
    Monitor your matched positions. Each will eventually close when: - Trader
    manually closes - Stop-loss/take-profit triggers - Trader gets liquidated
  </Step>

  <Step title="Withdraw Available">
    As funds become available, withdraw them to your wallet.
  </Step>

  <Step title="Final Withdrawal">
    Once all matches are settled, withdraw remaining balance.
  </Step>
</Steps>

<Note>
  You cannot force-close matched positions. You must wait for traders to close
  their trades or for liquidation conditions to be met.
</Note>

***

## Emergency Withdrawal

In certain emergency situations (smart contract issues, etc.), the protocol may enable emergency withdrawal mode that allows immediate withdrawal regardless of matched status.

This is a last-resort mechanism and may result in partial fund recovery depending on circumstances.

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Available balance is 0">
    All your funds are currently matched with active trades. Wait for trades to
    close, then you can withdraw.
  </Accordion>

  <Accordion title="Withdrawal transaction failing">
    * Ensure you have ETH for gas - Try withdrawing a smaller amount - Wait a
      moment and try again
  </Accordion>

  <Accordion title="Funds not appearing in wallet">
    * Wait for transaction confirmation - Check transaction on Basescan - Ensure
      you're viewing the correct network (Base)
  </Accordion>

  <Accordion title="Balance shows incorrect amount">
    * Refresh the page - Check if any trades recently closed - Verify
      transaction history on Basescan
  </Accordion>
</AccordionGroup>

***

## Tax Considerations

<Warning>
  Withdrawals may have tax implications in your jurisdiction. Keep records of: -
  Deposit dates and amounts - Withdrawal dates and amounts - Interest earned -
  P\&L from matched positions
</Warning>

Export your transaction history from the Match History section for record-keeping.

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Interest" icon="percent" href="/lending/interest">
    Understand how interest is calculated.
  </Card>

  <Card title="Matching Overview" icon="handshake" href="/lending/overview">
    Review matching fundamentals.
  </Card>
</CardGroup>
