# End-to-end workflow

#### Scenario

You have **ETH collateral on HyperEVM** and want to **borrow USDC on Base**.

#### What you do (single flow)

1. In PrimeFi (still on **HyperEVM**), choose:
   * **Borrow asset**: USDC
   * **Destination chain**: Base
   * **Amount**: e.g., 5,000 USDC
   * Optional safety params: **minAmountOut**, **slippage bps**, **deadline**
2. Confirm the transaction on **HyperEVM**.\
   The UI quotes **interest + LayerZero/Stargate fees** before you sign.

#### What happens on-chain

1. **Origin checks (HyperEVM)**
   * LendingPool validates your **health factor**, LTV and caps.
   * Your **variable debt** is minted on HyperEVM for the borrowed amount.
2. **Cross-chain messaging**
   * PrimeFi’s **Borrow OApp** sends a LayerZero message with borrow details.
   * In parallel, a **Stargate** instruction moves 5,000 USDC liquidity to **Base**.
3. **Destination delivery (Base)**
   * Stargate **delivers 5,000 USDC** to your wallet on Base.
   * Your **collateral and debt remain on HyperEVM**.

Result: you now **hold USDC on Base** while your **debt accrues on HyperEVM** against your ETH collateral.

> Tip: You don’t need to switch networks during the borrow. PrimeFi handles the bridge leg via Stargate.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.primefi.xyz/primefi-features/omnichain-lending-and-borrowing/end-to-end-workflow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
