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

# Wallets

> Connect and manage your Polymarket wallet

## Overview

To trade on Polymarket through LuckyLobster, you need to connect your Polymarket Magic Proxy Safe wallet.

## Wallet Types

<CardGroup cols={2}>
  <Card title="Proxy Wallet" icon="wallet">
    The recommended wallet type. Uses Polymarket's Magic Proxy for seamless trading.
  </Card>

  <Card title="Safe Wallet" icon="shield">
    Gnosis Safe multisig wallet for institutional users.
  </Card>
</CardGroup>

## Connecting Your Wallet

### Prerequisites

1. A Polymarket account with a deployed wallet
2. Your wallet private key (EOA key from Magic)
3. Your proxy/Safe address

### Step-by-Step

<Steps>
  <Step title="Navigate to Wallets">
    Go to **Dashboard > Settings > Wallets** and click **Import Wallet**
  </Step>

  <Step title="Enter Private Key">
    Paste your Magic EOA private key. This is encrypted immediately with AES-256-GCM.

    ```
    0x1234567890abcdef...
    ```

    <Warning>
      Never share your private key with anyone. LuckyLobster encrypts it immediately and it's only decrypted server-side during order signing.
    </Warning>
  </Step>

  <Step title="Enter Proxy Address">
    Your Polymarket proxy address (starts with `0x`)

    ```
    0xABCD1234...
    ```
  </Step>

  <Step title="Verify Connection">
    LuckyLobster will verify the wallet and display your balances.
  </Step>
</Steps>

## Finding Your Wallet Details

### From Polymarket

1. Log in to [polymarket.com](https://polymarket.com)
2. Go to **Settings** or click your profile
3. Your proxy address is displayed in the wallet section

### Getting Your Private Key

Your Magic wallet private key can be exported from your Magic account. Be extremely careful with this key.

<Warning>
  Your private key gives full control over your wallet. Only enter it on trusted sites and never share it.
</Warning>

## Wallet Security

Your wallet is protected with:

| Security Layer             | Description                                  |
| -------------------------- | -------------------------------------------- |
| **AES-256-GCM Encryption** | Private key encrypted at rest                |
| **Per-Wallet IV**          | Unique initialization vector for each wallet |
| **Server-Side Only**       | Keys never sent to browser/client            |
| **Secure Key Derivation**  | Master key stored in secure environment      |

## Wallet Approvals

Before selling tokens, your wallet needs to approve the Polymarket contracts:

* **USDC Approval** - For buying shares
* **CTF Approval** - For selling shares (Conditional Token Framework)

LuckyLobster handles these approvals automatically when needed.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Wallet not showing balance">
    * Verify your proxy address is correct
    * Check that you have USDC in your Polymarket wallet. All funding is done through Polymarket directly - see [How to Deposit](https://help.polymarket.com/en/articles/13369887-how-to-deposit)
    * Ensure you're connected to Polygon network
  </Accordion>

  <Accordion title="Orders failing with insufficient balance">
    * Check the `/balance` endpoint for current balance
    * Verify funds are in your proxy wallet, not EOA
    * If you need to add funds, deposit through Polymarket directly - see [How to Deposit](https://help.polymarket.com/en/articles/13369887-how-to-deposit)
  </Accordion>

  <Accordion title="CTF approval errors">
    LuckyLobster auto-approves CTF when needed. If you get approval errors:

    * Try the `/wallet/approve` endpoint manually
    * Check for pending transactions on PolygonScan
  </Accordion>
</AccordionGroup>

## API Endpoints

<Card title="Wallet Approval API" icon="check" href="/api-reference/trading">
  Approve tokens for trading via POST /wallet/approve
</Card>
