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

# Quick Start

> Get started with Vita Finance in under 5 minutes

<Info>
  **Prerequisites**: You'll need a NEAR wallet and some NEAR tokens. If you're new to NEAR Protocol, visit [wallet.near.org](https://wallet.near.org) to create one.
</Info>

## Start Trading in 3 Steps

<Steps>
  <Step title="Connect Your Wallet">
    Visit [app.vita.finance](https://app.vita.finance) and click "Connect Wallet"

    <Note>
      Vita Finance supports 23 different wallets including NEAR Wallet, Meteor, Sender, MetaMask, Ledger, and many more.
    </Note>

    ```bash theme={null}
    # Using NEAR CLI
    near login
    ```
  </Step>

  <Step title="Select Tokens to Swap">
    Choose your input and output tokens from our supported list

    <Tabs>
      <Tab title="Popular Pairs">
        * **NEAR ↔ USDC** - High volume
        * **NEAR ↔ VITA** - Protocol token
        * **VITA ↔ xVITA** - Staking conversion
        * **USDC ↔ USDT** - Stable swap
      </Tab>

      <Tab title="All Tokens">
        View the complete list in our [app](https://app.vita.finance/tokens)
      </Tab>
    </Tabs>

    <Warning>
      Remember decimal differences:

      * NEAR: 24 decimals
      * VITA/xVITA: 18 decimals
      * USDC/USDT: 6 decimals
    </Warning>
  </Step>

  <Step title="Execute Your Swap">
    Enter the amount, review the details, and confirm

    <Warning>
      Always check the price impact and minimum received amount before confirming. Default swap fee is 0.3%.
    </Warning>
  </Step>
</Steps>

## Trading Options

<Note>
  Vita uses an Automated Market Maker (AMM) with concentrated liquidity for optimal pricing and instant swaps. We also offer a Central Limit Order Book (CLOB) for advanced traders.
</Note>

### AMM Swaps

Instant token swaps with concentrated liquidity:

* Best prices through smart routing
* Minimal slippage on popular pairs
* Default 0.3% trading fee
* Instant execution

<CardGroup cols={1}>
  <Card title="Try AMM Swap" icon="right-left" href="https://app.vita.finance/swap">
    Instant token exchange
  </Card>
</CardGroup>

## Your First Liquidity Position

Ready to earn fees? Here's how to provide liquidity:

<AccordionGroup>
  <Accordion title="1. Choose a Pool" icon="droplet">
    Browse available pools and select one based on:

    * **Volume:** Higher volume = more fees
    * **Your tokens:** What you hold
  </Accordion>

  <Accordion title="2. Set Your Price Range" icon="chart-line">
    Concentrated liquidity lets you choose where to deploy capital:

    ```javascript theme={null}
    // Example ranges for NEAR/USDC (assuming current price: $5)
    const ranges = {
      narrow: { min: 4.90, max: 5.10 }, // ±2% - Higher fees, more management
      medium: { min: 4.50, max: 5.50 }, // ±10% - Balanced approach
      wide: { min: 3.00, max: 8.00 }    // ±40% - Lower fees, less management
    };

    // Valid tick range: -665454 to 831818
    ```
  </Accordion>

  <Accordion title="3. Deposit and Mint NFT" icon="coins">
    Add your tokens and receive an NFT representing your position

    <CodeGroup>
      ```bash NEAR CLI theme={null}
      # Mint position directly via CLI
      near call [TBD] mint_position \
        '{
          "pool_id": "NEAR-USDC",
          "tick_lower_index": -10986,
          "tick_upper_index": 9183,
          "amount0_desired": "1000000000000000000000000",
          "amount1_desired": "5000000",
          "amount0_min": "990000000000000000000000",
          "amount1_min": "4950000"
        }' \
        --accountId your-wallet.near \
        --amount 0.1
      ```

      ```javascript Near-API-JS theme={null}
      // Direct contract call
      const contract = new Contract(
        account,
        "[TBD]", // Contract address
        {
          changeMethods: ["mint_position"],
        }
      );

      await contract.mint_position({
        pool_id: "NEAR-USDC",
        tick_lower_index: -10986,    // Lower tick
        tick_upper_index: 9183,       // Upper tick
        amount0_desired: "1000000000000000000000000", // 1 NEAR (24 decimals)
        amount1_desired: "5000000",   // 5 USDC (6 decimals)
        amount0_min: "990000000000000000000000",
        amount1_min: "4950000"
      });
      ```
    </CodeGroup>
  </Accordion>
</AccordionGroup>

## Stake VITA for xVITA

<Card title="Why Stake?" icon="lock">
  xVITA holders earn protocol revenue from AMM trading fees, plus boost multipliers up to 2.5x
</Card>

### Quick Staking Guide

<CodeGroup>
  ```bash Convert VITA theme={null}
  # 1. Convert VITA to xVITA using ft_transfer_call
  near call [TBD] ft_transfer_call \
    '{"receiver_id": "[TBD]", "amount": "1000000000000000000", "msg": "{\"convert\": {}}"}' \
    --accountId your-wallet.near \
    --amount 0.000000000000000000000001
  ```

  ```bash Check Balance theme={null}
  # 2. Check your xVITA balance (18 decimals)
  near view [TBD] ft_balance_of \
    '{"account_id": "your-wallet.near"}'
  ```

  ```bash View Info theme={null}
  # 3. View staking info
  near view [TBD] get_user_staking_info \
    '{"account_id": "your-wallet.near"}'
  ```
</CodeGroup>

### Redemption Options

<Tabs>
  <Tab title="Instant Redeem">
    **Period:** 15 days\
    **Return:** 50% of VITA (penalty)\
    **Use case:** Need liquidity quickly
  </Tab>

  <Tab title="Standard Redeem">
    **Period:** 15-180 days\
    **Return:** 50-100% (linear scaling)\
    **Use case:** Balanced approach
  </Tab>

  <Tab title="Max Redeem">
    **Period:** 180 days\
    **Return:** 100% of VITA (full value)\
    **Use case:** Maximum value
  </Tab>
</Tabs>

## Common Actions

### Check Token Balances

<CodeGroup>
  ```bash VITA Balance theme={null}
  near view [TBD] ft_balance_of \
    '{"account_id": "your-wallet.near"}'
  # Returns: "1000000000000000000" (1 VITA with 18 decimals)
  ```

  ```bash xVITA Balance theme={null}
  near view [TBD] ft_balance_of \
    '{"account_id": "your-wallet.near"}'
  # Returns: "500000000000000000" (0.5 xVITA with 18 decimals)
  ```

  ```bash NEAR Balance theme={null}
  near state your-wallet.near
  # Shows total NEAR balance in the account
  ```
</CodeGroup>

### Monitor Your Positions

<CodeGroup>
  ```bash List Positions theme={null}
  # Get all your NFT position IDs
  near view [TBD] get_user_positions \
    '{"account_id": "your-wallet.near"}'
  ```

  ```bash Position Details theme={null}
  # Get specific position details
  near view [TBD] get_position \
    '{"token_id": "12345"}'
  ```

  ```bash Unclaimed Fees theme={null}
  # Check accumulated fees
  near view [TBD] get_unclaimed_fee \
    '{"position_id": "12345"}'
  ```
</CodeGroup>

### Claim Rewards

<Steps>
  <Step title="Check Claimable Rewards">
    <CodeGroup>
      ```bash Session Rewards theme={null}
      near view [TBD] get_unclaimed_rewards \
        '{"account_id": "your-wallet.near", "session_id": 42}'
      ```

      ```bash Farming Rewards theme={null}
      near view [TBD] get_farming_rewards \
        '{"account_id": "your-wallet.near"}'
      ```
    </CodeGroup>
  </Step>

  <Step title="Claim Your Rewards">
    <CodeGroup>
      ```bash Claim All theme={null}
      near call [TBD] claim_all_rewards \
        '{}' \
        --accountId your-wallet.near \
        --amount 0.01
      ```

      ```bash Claim Specific Session theme={null}
      near call [TBD] claim_session_rewards \
        '{"session_id": 42}' \
        --accountId your-wallet.near \
        --amount 0.01
      ```
    </CodeGroup>
  </Step>
</Steps>

## Helpful Resources

<CardGroup cols={2}>
  <Card title="Discord Community" icon="discord" href="https://discord.gg/vitafinance">
    Get help from the community
  </Card>

  <Card title="API Documentation" icon="code" href="/api-reference">
    Complete contract reference
  </Card>

  <Card title="Example Scripts" icon="github" href="https://github.com/vita-finance/examples">
    Ready-to-use code examples
  </Card>

  <Card title="Video Tutorials" icon="youtube" href="/guides">
    Step-by-step video guides
  </Card>
</CardGroup>

## Common Issues & Solutions

<AccordionGroup>
  <Accordion title="Transaction Failed" icon="circle-xmark">
    Common causes and solutions:

    * **Insufficient gas:** Attach at least 0.1 NEAR for complex operations
    * **Slippage too low:** Increase slippage tolerance in settings
    * **Price moved:** Refresh and try again with updated prices
  </Accordion>

  <Accordion title="Can't See My Position" icon="eye-slash">
    Check these common issues:

    * Ensure you're connected with the correct wallet
    * Positions are NFTs - check your NFT tab
    * Use the CLI commands above to verify
  </Accordion>

  <Accordion title="Decimal Confusion" icon="hashtag">
    **NEAR: 24 decimals**\
    `1 NEAR = 1000000000000000000000000`

    **VITA/xVITA: 18 decimals**\
    `1 VITA = 1000000000000000000`

    **USDC/USDT: 6 decimals**\
    `1 USDC = 1000000`
  </Accordion>
</AccordionGroup>

## What's Next?

<Tip>
  ### Continue Your Journey

  **For Traders**

  * Explore [trading strategies](/guides/swap-tokens)
  * Learn about [limit orders](/clob/overview)
  * Master [order types](/clob/order-types)

  **For Liquidity Providers**

  * Study [concentrated liquidity](/guides/provide-liquidity)
  * Optimize [staking strategies](/concepts/xvita-staking)
  * Calculate [impermanent loss](/guides/provide-liquidity#impermanent-loss)
</Tip>

<Note>
  **Pro tip:** Start small with wide ranges to get familiar with the system, then gradually narrow your ranges as you gain experience.
</Note>
