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

# Borrow Overview

<div className="w-full" id="borrow-page">
  <div className="relative w-full overflow-hidden bg-white dark:bg-transparent" id="borrow-hero-section">
    <div className="relative z-10 w-full max-w-[1200px] mx-auto px-6 sm:px-12 pt-12 pb-12 sm:pt-16 sm:pb-16 lg:pt-20 lg:pb-20">
      <div className="text-center">
        <h1 className="text-5xl sm:text-6xl lg:text-7xl font-bold text-gray-900 dark:text-gray-100 mb-6">
          Borrow & Lend
        </h1>

        <p className="text-lg sm:text-xl text-gray-700 dark:text-gray-400 max-w-3xl mx-auto mb-10 leading-relaxed">
          Integrate borrow and lending markets, and build leveraged positions with Multiply.
        </p>

        <div className="flex justify-center mb-20">
          <a href="/docs/build/developers/borrow" className="inline-flex items-center justify-center gap-2 px-7 py-3.5 bg-white hover:bg-gray-50 border border-gray-300 dark:bg-[#0EA5E9] dark:hover:bg-[#0284C7] dark:border-transparent text-gray-900 dark:text-white font-semibold rounded-lg transition-all hover:-translate-y-0.5 text-base">
            Developers Guide

            <Icon icon="arrow-right" iconType="regular" className="w-4 h-4" />
          </a>
        </div>

        <div className="grid grid-cols-2 sm:grid-cols-3 gap-4 sm:gap-6 md:gap-8 lg:gap-10 text-center">
          <div>
            <div className="text-4xl sm:text-5xl font-bold text-gray-900 dark:text-gray-100 mb-2">
              \$2.7B
            </div>

            <div className="text-xs sm:text-sm font-semibold text-gray-500 dark:text-gray-500 uppercase tracking-wider">
              MARKET SIZE
            </div>
          </div>

          <div>
            <div className="text-4xl sm:text-5xl font-bold text-gray-900 dark:text-gray-100 mb-2">
              \$1B
            </div>

            <div className="text-xs sm:text-sm font-semibold text-gray-500 dark:text-gray-500 uppercase tracking-wider">
              ACTIVE BORROWS
            </div>
          </div>

          <div className="col-span-2 sm:col-span-1">
            <div className="flex items-center justify-center gap-2 text-4xl sm:text-5xl font-bold text-gray-900 dark:text-gray-100 mb-2">
              <Icon icon="circle-check" iconType="solid" size={30} className="text-[#0EA5E9]" />

              18+
            </div>

            <div className="text-xs sm:text-sm font-semibold text-gray-500 dark:text-gray-500 uppercase tracking-wider">
              AUDITS
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

  <div className="w-full pt-16 sm:pt-20 pb-12 sm:pb-14 bg-[#fcfbfb] dark:bg-[#0c1b37]">
    <div className="w-full max-w-[1200px] mx-auto px-6 sm:px-12">
      <div className="text-center mb-16">
        <h2 className="text-4xl lg:text-5xl font-semibold text-gray-900 dark:text-gray-100 mb-4">
          How It Works
        </h2>

        <p className="text-lg text-gray-700 dark:text-gray-400 max-w-2xl mx-auto">
          Seamless integration flow designed for composability.
        </p>
      </div>

      <div className="grid grid-cols-1 md:grid-cols-3 gap-8 md:gap-12">
        <div className="text-center">
          <div className="flex justify-center mb-6">
            <img src="https://mintcdn.com/kamino-3d73a151/tFFdBOJZz2VvEXNt/docs/images/borrow/deposit.svg?fit=max&auto=format&n=tFFdBOJZz2VvEXNt&q=85&s=dd09f73398cdf0333075a37de044d932" alt="Deposit icon" width="75" height="75" data-path="docs/images/borrow/deposit.svg" />
          </div>

          <h3 className="text-2xl font-bold text-gray-900 dark:text-gray-100 mb-3">
            Deposit
          </h3>

          <p className="text-sm text-gray-700 dark:text-gray-400 leading-relaxed">
            User supplies collateral tokens. An obligation is created to track their position and enable borrowing capacity.
          </p>
        </div>

        <div className="text-center">
          <div className="flex justify-center mb-6">
            <img src="https://mintcdn.com/kamino-3d73a151/tFFdBOJZz2VvEXNt/docs/images/borrow/borrow.svg?fit=max&auto=format&n=tFFdBOJZz2VvEXNt&q=85&s=88980bd7cb7acd30dacec0ef17a6bd50" alt="Borrow icon" width="75" height="75" data-path="docs/images/borrow/borrow.svg" />
          </div>

          <h3 className="text-2xl font-bold text-gray-900 dark:text-gray-100 mb-3">
            Borrow
          </h3>

          <p className="text-sm text-gray-700 dark:text-gray-400 leading-relaxed">
            User borrows assets against collateral. LTV ratio determines borrow limit. Interest accrues on borrowed amount.
          </p>
        </div>

        <div className="text-center">
          <div className="flex justify-center mb-6">
            <img src="https://mintcdn.com/kamino-3d73a151/tFFdBOJZz2VvEXNt/docs/images/borrow/repay.svg?fit=max&auto=format&n=tFFdBOJZz2VvEXNt&q=85&s=b143121520530b9ae5c5485c91dc4a73" alt="Repay icon" width="75" height="75" data-path="docs/images/borrow/repay.svg" />
          </div>

          <h3 className="text-2xl font-bold text-gray-900 dark:text-gray-100 mb-3">
            Repay
          </h3>

          <p className="text-sm text-gray-700 dark:text-gray-400 leading-relaxed">
            User repays borrowed assets plus interest. Reduces debt, improves health factor, and unlocks collateral for withdrawal.
          </p>
        </div>
      </div>
    </div>
  </div>

  <div className="w-full pt-8 sm:pt-10 pb-8 sm:pb-10 bg-white dark:bg-[#0c1b37]">
    <div className="w-full max-w-[1200px] mx-auto px-6 sm:px-12">
      <div className="mb-12">
        <div className="inline-flex items-center gap-2 px-3 py-1 rounded-full text-xs font-mono uppercase tracking-wider mb-6 bg-transparent border-2 border-blue-400/30 text-blue-600 dark:text-blue-400">
          INTEGRATION ARCHITECTURE
        </div>

        <h2 className="text-3xl lg:text-4xl font-bold tracking-tight mb-4 text-gray-900 dark:text-gray-100">
          Borrow Integration Model
        </h2>

        <p className="text-lg text-gray-700 dark:text-gray-400 max-w-xl">
          Borrow integrations involve four core areas.
        </p>
      </div>

      <Tabs>
        <Tab title="Markets & Reserves">
          <h3 className="text-xl font-bold text-gray-900 dark:text-gray-100 mb-4">
            Market Discovery & Reserve Data
          </h3>

          <p className="text-gray-700 dark:text-gray-400 mt-4 mb-6 text-sm">
            Discover lending markets and retrieve reserve configuration, performance metrics, liquidity data, and active incentive programs.
          </p>

          <ul className="space-y-3 pl-5">
            <li className="text-sm text-gray-700 dark:text-gray-400">
              Discover all lending markets via <code className="text-xs px-1 rounded bg-[#e0f5fa] dark:bg-[#0ea5e9]/10 text-[#00a3c4] dark:text-[#0ea5e9]">/markets</code>
            </li>

            <li className="text-sm text-gray-700 dark:text-gray-400">Reserve APY (supply and borrow), utilization rates, and available liquidity</li>
            <li className="text-sm text-gray-700 dark:text-gray-400">Market configuration (Main, JLP, Altcoins markets)</li>
            <li className="text-sm text-gray-700 dark:text-gray-400">Reserve token metadata (mint, decimals, symbols)</li>
            <li className="text-sm text-gray-700 dark:text-gray-400">Active reward farms and bonus yield programs</li>
          </ul>
        </Tab>

        <Tab title="Transactions">
          <h3 className="text-xl font-bold text-gray-900 dark:text-gray-100 mb-4">
            Lending Operations
          </h3>

          <p className="text-gray-700 dark:text-gray-400 mt-4 mb-6 text-sm">
            Generate transaction instructions for deposit, borrow, repay, and withdraw operations. Manage obligations and handle token approvals automatically.
          </p>

          <ul className="space-y-3 pl-5">
            <li className="text-sm text-gray-700 dark:text-gray-400">Deposit, borrow, repay, and withdraw instruction generation</li>
            <li className="text-sm text-gray-700 dark:text-gray-400">Obligation creation and management</li>
            <li className="text-sm text-gray-700 dark:text-gray-400">ATA creation and token approval handling</li>
            <li className="text-sm text-gray-700 dark:text-gray-400">Transaction status monitoring and confirmation</li>
          </ul>
        </Tab>

        <Tab title="Positions & Health">
          <h3 className="text-xl font-bold text-gray-900 dark:text-gray-100 mb-4">
            Position Tracking & Health Monitoring
          </h3>

          <p className="text-gray-700 dark:text-gray-400 mt-4 mb-6 text-sm">
            Access user obligations, track collateral and debt positions, monitor LTV ratios and health factors to prevent liquidations.
          </p>

          <ul className="space-y-3 pl-5">
            <li className="text-sm text-gray-700 dark:text-gray-400">User obligation and position data</li>

            <li className="text-sm text-gray-700 dark:text-gray-400">
              LTV ratios via <code className="text-xs px-1 rounded bg-[#e0f5fa] dark:bg-[#0ea5e9]/10 text-[#00a3c4] dark:text-[#0ea5e9]">getCurrentLTV()</code>, Max LTV, and Liquidation LTV
            </li>

            <li className="text-sm text-gray-700 dark:text-gray-400">Health factor calculations and liquidation risk</li>
            <li className="text-sm text-gray-700 dark:text-gray-400">Collateral and debt balances across multiple assets</li>

            <li className="text-sm text-gray-700 dark:text-gray-400">
              Borrow capacity via <code className="text-xs px-1 rounded bg-[#e0f5fa] dark:bg-[#0ea5e9]/10 text-[#00a3c4] dark:text-[#0ea5e9]">getBorrowCapacity()</code>
            </li>

            <li className="text-sm text-gray-700 dark:text-gray-400">Position history and performance metrics</li>
          </ul>
        </Tab>

        <Tab title="Risk & Rewards">
          <h3 className="text-xl font-bold text-gray-900 dark:text-gray-100 mb-4">
            Risk Management & Rewards
          </h3>

          <p className="text-gray-700 dark:text-gray-400 mt-4 mb-6 text-sm">
            Monitor liquidation risk, track interest accrual, understand borrow factors, and access reward farms for additional yield opportunities.
          </p>

          <ul className="space-y-3 pl-5">
            <li className="text-sm text-gray-700 dark:text-gray-400">Liquidation risk monitoring and alerts</li>
            <li className="text-sm text-gray-700 dark:text-gray-400">Interest rate tracking and debt accrual calculations</li>
            <li className="text-sm text-gray-700 dark:text-gray-400">Borrow factors and asset risk tiers</li>
            <li className="text-sm text-gray-700 dark:text-gray-400">Reward farms and claiming rewards</li>
          </ul>
        </Tab>
      </Tabs>
    </div>
  </div>

  <div className="w-full pt-8 sm:pt-10 pb-8 sm:pb-10 bg-white dark:bg-[#0c1b37]">
    <div className="w-full max-w-[1200px] mx-auto px-6 sm:px-12">
      <div className="mb-12">
        <div className="inline-flex items-center gap-2 px-3 py-1 rounded-full text-xs font-mono uppercase tracking-wider mb-6 bg-transparent border-2 border-blue-400/30 text-blue-600 dark:text-blue-400">
          RESOURCES
        </div>

        <h2 className="text-3xl lg:text-4xl font-bold tracking-tight mb-4 text-gray-900 dark:text-gray-100">
          Start Building
        </h2>

        <p className="text-lg text-gray-700 dark:text-gray-400 max-w-xl">
          Explore guides, tutorials, and API references.
        </p>
      </div>

      <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
        <a href="/docs/build/borrow/tutorials/deposit-and-borrow" className="p-6 rounded-xl border border-gray-200 dark:border-gray-800 bg-white dark:bg-[#0e1f3d] hover:border-[#0ea5e9] dark:hover:border-[#0ea5e9] transition-colors group">
          <div className="w-10 h-10 rounded-lg flex items-center justify-center mb-4 bg-blue-500/10 group-hover:bg-blue-500/20 transition-colors">
            <Icon icon="book" iconType="solid" className="w-5 h-5 text-[#0ea5e9]" />
          </div>

          <h3 className="text-lg font-bold text-gray-900 dark:text-gray-100 mb-2">
            SDK Tutorials
          </h3>

          <p className="text-sm text-gray-700 dark:text-gray-400 mb-3">
            Step-by-step guides for building with Kamino lending markets.
          </p>

          <div className="flex items-center gap-2 text-[#0ea5e9] text-sm font-medium">
            View Tutorials

            <Icon icon="arrow-right" iconType="regular" className="w-3 h-3" />
          </div>
        </a>

        <a href="/docs/build/borrow/recipes/deposit-via-api" className="p-6 rounded-xl border border-gray-200 dark:border-gray-800 bg-white dark:bg-[#0e1f3d] hover:border-[#0ea5e9] dark:hover:border-[#0ea5e9] transition-colors group">
          <div className="w-10 h-10 rounded-lg flex items-center justify-center mb-4 bg-green-500/10 group-hover:bg-green-500/20 transition-colors">
            <Icon icon="flask" iconType="solid" className="w-5 h-5 text-green-500" />
          </div>

          <h3 className="text-lg font-bold text-gray-900 dark:text-gray-100 mb-2">
            API Recipes
          </h3>

          <p className="text-sm text-gray-700 dark:text-gray-400 mb-3">
            Quick code examples for common lending operations via API.
          </p>

          <div className="flex items-center gap-2 text-green-500 text-sm font-medium">
            View Recipes

            <Icon icon="arrow-right" iconType="regular" className="w-3 h-3" />
          </div>
        </a>

        <a href="/docs/build/borrow/multiply/leverage-concepts" className="p-6 rounded-xl border border-gray-200 dark:border-gray-800 bg-white dark:bg-[#0e1f3d] hover:border-[#0ea5e9] dark:hover:border-[#0ea5e9] transition-colors group">
          <div className="w-10 h-10 rounded-lg flex items-center justify-center mb-4 bg-purple-500/10 group-hover:bg-purple-500/20 transition-colors">
            <Icon icon="chart-line-up" iconType="solid" className="w-5 h-5 text-purple-500" />
          </div>

          <h3 className="text-lg font-bold text-gray-900 dark:text-gray-100 mb-2">
            Multiply Integration
          </h3>

          <p className="text-sm text-gray-700 dark:text-gray-400 mb-3">
            Build leveraged positions with flash loans and swaps.
          </p>

          <div className="flex items-center gap-2 text-purple-500 text-sm font-medium">
            Learn More

            <Icon icon="arrow-right" iconType="regular" className="w-3 h-3" />
          </div>
        </a>

        <a href="/docs/build/borrow/market-data-metrics" className="p-6 rounded-xl border border-gray-200 dark:border-gray-800 bg-white dark:bg-[#0e1f3d] hover:border-[#0ea5e9] dark:hover:border-[#0ea5e9] transition-colors group">
          <div className="w-10 h-10 rounded-lg flex items-center justify-center mb-4 bg-orange-500/10 group-hover:bg-orange-500/20 transition-colors">
            <Icon icon="database" iconType="solid" className="w-5 h-5 text-orange-500" />
          </div>

          <h3 className="text-lg font-bold text-gray-900 dark:text-gray-100 mb-2">
            Market Data
          </h3>

          <p className="text-sm text-gray-700 dark:text-gray-400 mb-3">
            Access market metrics, APY data, and obligation details.
          </p>

          <div className="flex items-center gap-2 text-orange-500 text-sm font-medium">
            View Data Guide

            <Icon icon="arrow-right" iconType="regular" className="w-3 h-3" />
          </div>
        </a>
      </div>
    </div>
  </div>
</div>
