> ## 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.

# How to Swap Tokens

> Trade tokens instantly with the best prices on NEAR Protocol

## Start Swapping in Seconds

Vita offers instant AMM swaps with concentrated liquidity for optimal pricing and minimal slippage.

<Info>
  Vita uses an Automated Market Maker (AMM) with concentrated liquidity pools for instant token swaps.
</Info>

## Step-by-Step Guide: AMM Swaps

<Steps>
  <Step title="Connect Your Wallet">
    Click the **Connect Wallet** button in the top right corner

    <Note>
      Visit [app.vita.finance](https://app.vita.finance) and look for the **Connect Wallet** button in the top right corner.
    </Note>

    Choose from 23 supported wallets:

    * NEAR Wallet
    * Meteor Wallet
    * Sender Wallet
    * MetaMask (via Aurora)
    * Ledger
    * And 18 more...
  </Step>

  <Step title="Select Your Tokens">
    Choose the tokens you want to swap

    <Frame>
      <img className="block dark:hidden" src="https://mintcdn.com/vita-29cb4832/0BX7ec2JKnkM5V86/images/screenshots/swap-hero.png?fit=max&auto=format&n=0BX7ec2JKnkM5V86&q=85&s=8d75b5de5ac243460cad47f64d857001" alt="Swap interface" width="2880" height="2048" data-path="images/screenshots/swap-hero.png" />

      <img className="hidden dark:block" src="https://mintcdn.com/vita-29cb4832/0BX7ec2JKnkM5V86/images/screenshots/swap-hero.png?fit=max&auto=format&n=0BX7ec2JKnkM5V86&q=85&s=8d75b5de5ac243460cad47f64d857001" alt="Swap interface" width="2880" height="2048" data-path="images/screenshots/swap-hero.png" />
    </Frame>

    * **You sell:** The token you're trading away
    * **You buy:** The token you want to receive
    * Click on either token to open the selection modal

    <Frame>
      <img className="block dark:hidden" src="https://mintcdn.com/vita-29cb4832/0BX7ec2JKnkM5V86/images/screenshots/token-selector.png?fit=max&auto=format&n=0BX7ec2JKnkM5V86&q=85&s=b645edcaa6b15daea30480e4efd028d3" alt="Token selection modal" width="1248" height="1408" data-path="images/screenshots/token-selector.png" />

      <img className="hidden dark:block" src="https://mintcdn.com/vita-29cb4832/0BX7ec2JKnkM5V86/images/screenshots/token-selector.png?fit=max&auto=format&n=0BX7ec2JKnkM5V86&q=85&s=b645edcaa6b15daea30480e4efd028d3" alt="Token selection modal" width="1248" height="1408" data-path="images/screenshots/token-selector.png" />
    </Frame>

    <Note>
      Remember: VITA and xVITA use 18 decimals, while NEAR uses 24 decimals
    </Note>
  </Step>

  <Step title="Enter Amount">
    Type the amount you want to swap

    <Frame>
      <img className="block dark:hidden" src="https://mintcdn.com/vita-29cb4832/0BX7ec2JKnkM5V86/images/screenshots/swap-amount-input.png?fit=max&auto=format&n=0BX7ec2JKnkM5V86&q=85&s=d3945b3aae9a838abd10f5bdba002289" alt="Swap interface with amounts" width="960" height="228" data-path="images/screenshots/swap-amount-input.png" />

      <img className="hidden dark:block" src="https://mintcdn.com/vita-29cb4832/0BX7ec2JKnkM5V86/images/screenshots/swap-amount-input.png?fit=max&auto=format&n=0BX7ec2JKnkM5V86&q=85&s=d3945b3aae9a838abd10f5bdba002289" alt="Swap interface with amounts" width="960" height="228" data-path="images/screenshots/swap-amount-input.png" />
    </Frame>

    * Enter amount in either field
    * The other field auto-calculates based on current price
    * Use **MAX** button to swap your entire balance
  </Step>

  <Step title="Review & Swap">
    Check the details and confirm your swap

    <Frame>
      <img className="block dark:hidden" src="https://mintcdn.com/vita-29cb4832/0BX7ec2JKnkM5V86/images/screenshots/swap-review.png?fit=max&auto=format&n=0BX7ec2JKnkM5V86&q=85&s=e4f4bba34df13481ed151a1683a91ee3" alt="Swap review interface" width="2880" height="2048" data-path="images/screenshots/swap-review.png" />

      <img className="hidden dark:block" src="https://mintcdn.com/vita-29cb4832/0BX7ec2JKnkM5V86/images/screenshots/swap-review.png?fit=max&auto=format&n=0BX7ec2JKnkM5V86&q=85&s=e4f4bba34df13481ed151a1683a91ee3" alt="Swap review interface" width="2880" height="2048" data-path="images/screenshots/swap-review.png" />
    </Frame>

    Review these details:

    * **Exchange rate:** Current price between tokens
    * **Price impact:** How much your trade affects the price
    * **Minimum received:** Guaranteed amount after slippage
    * **Route:** Path your swap will take through AMM pools
    * **Fee:** <span className="inline-flex items-center px-2 py-1 text-xs font-medium bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-gray-100 rounded">Default 0.3% trading fee</span>

    <Frame>
      <img className="block dark:hidden" src="https://mintcdn.com/vita-29cb4832/0BX7ec2JKnkM5V86/images/screenshots/swap-settings.png?fit=max&auto=format&n=0BX7ec2JKnkM5V86&q=85&s=ad02ae6052e4ef7166806d8044126f11" alt="Slippage settings" width="464" height="228" data-path="images/screenshots/swap-settings.png" />

      <img className="hidden dark:block" src="https://mintcdn.com/vita-29cb4832/0BX7ec2JKnkM5V86/images/screenshots/swap-settings.png?fit=max&auto=format&n=0BX7ec2JKnkM5V86&q=85&s=ad02ae6052e4ef7166806d8044126f11" alt="Slippage settings" width="464" height="228" data-path="images/screenshots/swap-settings.png" />
    </Frame>
  </Step>
</Steps>

### Special Case: Wrapped NEAR

<Frame caption="Convert between NEAR and wNEAR for trading">
  <img className="block dark:hidden" src="https://mintcdn.com/vita-29cb4832/ZxuKdRA_Rq7qGhDL/images/screenshots/wrap-modal.png?fit=max&auto=format&n=ZxuKdRA_Rq7qGhDL&q=85&s=f9226cadd7f7cc57dc24d501731b239b" alt="Wrap/Unwrap NEAR interface" width="874" height="650" data-path="images/screenshots/wrap-modal.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/vita-29cb4832/ZxuKdRA_Rq7qGhDL/images/screenshots/wrap-modal.png?fit=max&auto=format&n=ZxuKdRA_Rq7qGhDL&q=85&s=f9226cadd7f7cc57dc24d501731b239b" alt="Wrap/Unwrap NEAR interface" width="874" height="650" data-path="images/screenshots/wrap-modal.png" />
</Frame>

For swapping with NEAR, you'll need to wrap/unwrap it:

* **Wrap:** Convert NEAR to wNEAR for trading
* **Unwrap:** Convert wNEAR back to NEAR

## Mobile Trading Experience

<Frame caption="Full-featured mobile interface for trading on the go">
  <img className="block dark:hidden" src="https://mintcdn.com/vita-29cb4832/0BX7ec2JKnkM5V86/images/screenshots/mobile-swap.png?fit=max&auto=format&n=0BX7ec2JKnkM5V86&q=85&s=22be3b10e42a5c0a236e69bd12f1a95e" alt="Mobile swap interface" width="786" height="2248" data-path="images/screenshots/mobile-swap.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/vita-29cb4832/0BX7ec2JKnkM5V86/images/screenshots/mobile-swap.png?fit=max&auto=format&n=0BX7ec2JKnkM5V86&q=85&s=22be3b10e42a5c0a236e69bd12f1a95e" alt="Mobile swap interface" width="786" height="2248" data-path="images/screenshots/mobile-swap.png" />
</Frame>

Our mobile interface provides the same powerful features in a touch-friendly design.

## Understanding the Interface

1. **Token Pair Selector:** Choose your trading pair
2. **Amount Fields:** Enter how much to swap
3. **Swap Direction:** Click to reverse the trade
4. **Price Info:** See current rates and impact
5. **Settings:** Adjust slippage tolerance
6. **Action Button:** Execute your swap

### Advanced Settings

#### Slippage Tolerance

* **0.1%:** For stable pairs (USDC/USDT)
* **0.5%:** Default for most swaps
* **1-3%:** For volatile tokens
* **Custom:** Set your own tolerance

## Common Swap Scenarios

<AccordionGroup>
  <Accordion title="Swapping NEAR for VITA" icon="coins">
    The most common swap on our platform:

    ### AMM Swap Steps

    1. Select **NEAR** as "You sell"
    2. Select **VITA** as "You buy"
    3. Enter your NEAR amount (24 decimals)
    4. Click **Swap**

    <Note>
      Make sure to keep some NEAR for gas fees (usually 0.1-0.5 NEAR is enough)
    </Note>
  </Accordion>

  <Accordion title="Converting Stablecoins" icon="dollar-sign">
    For stable-to-stable swaps:

    ### AMM Benefits:

    * Use lower slippage (0.1%)
    * Larger amounts have minimal price impact
    * Best rates due to concentrated liquidity

    Popular pairs: USDC ↔ USDT, USDC ↔ DAI
  </Accordion>

  <Accordion title="Staking VITA to xVITA" icon="lock">
    Convert VITA to xVITA for staking:

    ```bash theme={null}
    # Use ft_transfer_call with convert message
    near call [TBD] ft_transfer_call \
      '{"receiver_id": "[TBD]", "amount": "1000000000000000000", "msg": "{\"convert\": {}}"}' \
      --accountId your-wallet.near \
      --amount 0.000000000000000000000001
    ```

    <Note>
      VITA and xVITA both use 18 decimals
    </Note>
  </Accordion>
</AccordionGroup>

## Price Impact Explained

### What is Price Impact?

Price impact shows how much your trade affects the market price:

<CardGroup cols={3}>
  <Card title="Low Impact" icon="circle-check" className="border border-gray-200 dark:border-gray-700 rounded-lg shadow-sm">
    **\< 0.5%**

    Great for trading
  </Card>

  <Card title="Medium Impact" icon="triangle-exclamation" className="border border-gray-200 dark:border-gray-700 rounded-lg shadow-sm">
    **0.5% - 3%**

    Consider smaller trades
  </Card>

  <Card title="High Impact" icon="circle-xmark" className="border border-gray-200 dark:border-gray-700 rounded-lg shadow-sm">
    **> 3%**

    Split into multiple trades
  </Card>
</CardGroup>

## Tips for Better Trading

<CardGroup cols={2}>
  <Card title="Monitor Liquidity" icon="droplet">
    Check pool depth before large trades to minimize price impact.
  </Card>

  <Card title="Time Your Trades" icon="clock">
    Trade during high activity periods for better prices.
  </Card>

  <Card title="Monitor Gas Prices" icon="gauge">
    NEAR gas is cheap, but timing still matters for large trades.
  </Card>

  <Card title="Save Favorite Pairs" icon="star">
    Quick access to your most traded tokens saves time.
  </Card>
</CardGroup>

## Troubleshooting

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

    ### Insufficient Balance

    * Check you have enough tokens to swap
    * Reserve some NEAR for gas fees
    * Remember decimal differences (VITA: 18, NEAR: 24)

    ### Slippage Too Low

    * Increase slippage tolerance in settings
    * Try 1-3% for volatile tokens

    ### Price Moved

    * Refresh the quote
    * Use a higher slippage tolerance
  </Accordion>

  <Accordion title="Can't Find My Token" icon="magnifying-glass">
    If your token doesn't appear:

    1. Use the search bar in token selector
    2. Enter the token contract address
    3. Verify it's the correct token
    4. Add to your favorites for quick access
  </Accordion>

  <Accordion title="High Gas Fees" icon="fire">
    To minimize gas costs:

    * Swap during low network activity
    * Use direct routes when possible
    * Batch multiple trades together
  </Accordion>
</AccordionGroup>

## Related Features

<CardGroup cols={2}>
  <Card title="Earn While You Hold" icon="droplet" href="/guides/provide-liquidity">
    **Provide Liquidity**

    Earn fees from every trade in your chosen AMM pools
  </Card>

  <Card title="Maximize Your VITA" icon="coins" href="/concepts/xvita-staking">
    **Stake for xVITA**

    Earn protocol revenue and governance rights
  </Card>
</CardGroup>

***

<Note>
  **Need help?** Join our [Discord community](https://discord.gg/vitafinance) or check the [troubleshooting section](#troubleshooting) above.
</Note>
