# Wallet Authentication

## Why Non-Custodial Matters

### Your Keys, Your Control

* **Zero Custody Risk**: We never hold your private keys or funds
* **No Centralized Storage**: Your wallet stays in your control
* **Instant Withdrawals**: No waiting periods or withdrawal limits
* **Regulatory Independence**: Your assets aren't subject to platform restrictions

### Enterprise-Grade Security

* **Hardware Wallet Support**: Ledger, Trezor, and other hardware wallets
* **Multi-Signature Ready**: Support for smart contract wallets
* **Bank-Level Encryption**: All communications use military-grade encryption
* **Audit Trail**: Every action is cryptographically verifiable

## Advanced Wallet Architecture

### Turnkey Embedded Wallets

QuantsEdge uses **Turnkey's institutional-grade wallet infrastructure** to provide enterprise security:

* **Hardware Security Module (HSM)**: Private keys stored in certified hardware
* **Multi-Party Computation**: Keys split across multiple secure locations
* **Audit Logging**: Every transaction cryptographically signed and logged
* **Compliance Ready**: SOC 2 Type II, ISO 27001 certified infrastructure

### Hyperliquid Agent Wallets

For **Hyperliquid trading**, we create dedicated agent wallets:

* **Isolated Trading**: Separate wallets for each trading strategy
* **Risk Management**: Individual position limits per agent wallet
* **Automated Execution**: Direct integration with Hyperliquid's order book
* **Real-time Monitoring**: Live PnL tracking across all agent wallets

### Hybrid Security Model

```
Your Wallet (Authentication) → Turnkey (Trading Wallets) → Hyperliquid (Execution)
     ↑                              ↑                           ↑
Private Keys (Your Control)    HSM Security              Agent Automation
```

## How Our Security Works

### Challenge-Response Authentication

```
Your Wallet → Unique Challenge → Cryptographic Signature → Secure Session
     ↑                                                              ↓
Private Key (Never Leaves Your Device)                    QuantsEdge Access
```

### Security Features That Set Us Apart

* **Zero-Knowledge Architecture**: We never see your private keys
* **Time-Limited Challenges**: 5-minute expiration prevents replay attacks
* **IP-Bound Sessions**: Tokens tied to your network for extra security
* **Hardware Wallet Integration**: Direct Ledger/Trezor support
* **Rate Limiting**: Protection against brute force attacks

## Supported Wallets

### Hardware Wallets (Recommended)

* **Ledger**: Nano S, Nano X, and Stax support
* **Trezor**: Model T and One support
* **KeepKey**: Full hardware wallet integration

### Software Wallets

* **MetaMask**: Browser and mobile app support
* **WalletConnect**: Connect any mobile wallet
* **Coinbase Wallet**: Secure mobile and browser options
* **Trust Wallet**: Multi-chain wallet support

## Security Architecture

### What We Never See

* Your private keys
* Your seed phrases
* Your wallet passwords
* Your transaction history

### What We Do See

* Your public wallet address (for authentication)
* Cryptographic signatures (for verification)
* Trading preferences (for strategy execution)

### Session Security

* **HMAC-Signed Tokens**: SHA-256 cryptographic signatures
* **24-Hour Expiry**: Automatic session expiration
* **Server-Side Validation**: Every request verified
* **Address Verification**: Prevents token misuse

## Trading Infrastructure

### Turnkey Wallet Provisioning

When you authenticate, we automatically provision secure trading wallets. This creates:

* **Organization ID**: Your dedicated Turnkey organization
* **Wallet ID**: Your trading wallet ID
* **Account ID**: Your account identifier
* **Addresses**: Generated wallet addresses for trading

### Hyperliquid Agent Integration

Each trading strategy gets its own **agent wallet** on Hyperliquid:

* **Strategy Isolation**: Each bot runs in its own wallet
* **Risk Containment**: Individual position limits per agent
* **Automated Funding**: Smart contract-based capital allocation
* **Performance Tracking**: Real-time PnL per agent wallet

### Multi-Layer Security

```
Your Wallet → Turnkey HSM → Hyperliquid Agents → Trading Execution
     ↑              ↑              ↑                    ↑
Authentication   Secure Storage   Isolated Trading   Live Markets
```

## Testing Your Setup

### Prerequisites

1. **Hardware Wallet**: Ledger or Trezor (recommended)
2. **Software Wallet**: MetaMask or WalletConnect
3. **QuantsEdge Account**: Visit platform and connect wallet

### Authentication Flow

1. **Connect Wallet**: Click "Connect Wallet" button
2. **Sign Challenge**: Sign the authentication message (no transaction)
3. **Access Granted**: Full platform access with your wallet

## Troubleshooting

### Common Issues

**"Challenge expired"**

* Solution: Reconnect wallet (challenges expire in 5 minutes)

**"Signature verification failed"**

* Solution: Ensure you're signing the exact challenge message

**"Authentication required"**

* Solution: Connect your wallet first

**"Invalid token"**

* Solution: Re-authenticate (tokens expire in 24 hours)

## Getting Started

1. **Choose Your Wallet**: Hardware wallet (recommended) or software wallet
2. **Connect to QuantsEdge**: Visit platform and click "Connect Wallet"
3. **Sign Authentication**: Sign the challenge message (no transaction required)
4. **Automatic Provisioning**: Turnkey creates your secure trading infrastructure
5. **Agent Deployment**: Hyperliquid agents are ready for your strategies
6. **Start Trading**: Access all features with complete security

### What Happens After Authentication

* **Turnkey Organization**: Your dedicated secure workspace is created
* **Trading Wallets**: HSM-protected wallets for each strategy
* **Hyperliquid Agents**: Isolated trading agents on Hyperliquid
* **Risk Management**: Individual position limits per agent

***

**Status**: **PRODUCTION READY**

QuantsEdge's non-custodial architecture combines your wallet authentication with Turnkey's institutional security and Hyperliquid's agent-based trading for the most secure and efficient trading experience available.


---

# 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://quantsedge.gitbook.io/quantsedge-docs/wallets-and-security/wallet-authentication.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.
