Authentication

Overview

Frontier Chain uses signature-based authentication, eliminating traditional usernames and passwords. Your Ethereum wallet IS your account - sign messages to prove ownership, no registration required.

Key Features:

  • No Passwords: Wallet signatures replace passwords

  • Self-Custody: You control your identity via private keys

  • No Registration: Connect wallet and start trading

  • Session Management: Optional session wallets for convenience

  • Multi-Wallet: Use different wallets for different strategies


How It Works

Basic Authentication Flow

1. Connect Wallet:

User clicks "Connect Wallet"
→ MetaMask (or other wallet) prompts for connection
→ User approves wallet connection
→ App receives wallet address

2. Prove Ownership (optional, for session creation):

3. Trade:


Authentication Methods

Direct Wallet Authentication

Process:

  • Connect wallet to app

  • Every order signed by main wallet

  • MetaMask popup for each signature

  • Maximum security, some friction

Use Cases:

  • Cautious traders

  • Large transactions

  • Infrequent trading

  • Maximum control

Pros:

  • No delegation needed

  • Explicit approval of every action

  • Private key never exported

Cons:

  • MetaMask popup for every order

  • Not suitable for high-frequency trading

  • User must be present for each action


Agent Wallet Authentication

Process:

  1. Connect main wallet

  2. Create/authorize agent wallet (one-time signature)

  3. Agent signs subsequent orders

  4. No more MetaMask popups

Use Cases:

  • High-frequency trading

  • Automated bots

  • Seamless UX

  • Active traders

Pros:

  • One-click trading

  • No repeated popups

  • API/bot integration

  • Faster execution

Cons:

  • Must trust agent key security

  • Limited additional risk (funds still in main wallet)

  • Must manage agent lifecycle


Session Management

Browser Sessions (Session Wallets)

Lifecycle:

Security:

  • Private key in SessionStorage (auto-clears)

  • Never hits server

  • Can't persist across sessions

  • Expires with browser tab


Persistent Sessions (API Wallets)

Lifecycle:

Security:

  • You control private key storage

  • Responsibility to secure key

  • Revocable anytime

  • Independent of browser


Wallet Connection

MetaMask

Connection Flow:

Permissions:

  • Read wallet address

  • Request signatures

  • No automatic transactions

  • User approves each signature


WalletConnect

Connection Flow:

Benefits:

  • Use mobile wallet on desktop

  • Hardware wallet support (via mobile)

  • Cross-device trading

  • Enhanced security


Hardware Wallets (Ledger/Trezor)

Connection:

  • Via MetaMask or direct integration

  • Physical device confirmation required

  • Private keys never leave device

  • Maximum security

Trade-Off:

  • Physical confirmation for every signature

  • Not suitable for high-frequency trading

  • Recommended for large accounts

  • Best used with agent wallets


Security Considerations

Main Wallet Security

Protect Your Private Key:

  • Never share with anyone

  • Never enter on suspicious sites

  • Use hardware wallet for large amounts

  • Keep seed phrase offline and secure

Verify Before Signing:

  • Check the site URL

  • Read signature prompts carefully

  • Verify amounts and addresses

  • Confirm correct network (mainnet vs testnet)


Agent Wallet Security

Session Wallets:

  • Automatically cleared when browser closes

  • Only in memory during session

  • Can't be stolen if you close browser

  • Re-authorization needed each session

API Wallets:

  • Private key storage is YOUR responsibility

  • Use environment variables, not hardcoded

  • Secrets managers for production

  • Rotate keys periodically

  • Delete when no longer needed


Authentication vs Authorization

Authentication

"Who are you?"

Frontier Chain:

  • Wallet address is identity

  • Signature proves ownership

  • No usernames/passwords

  • Cryptographic proof


Authorization

"What can you do?"

Direct Wallet:

  • Full control over account

  • Can trade, withdraw, modify settings

  • All permissions

Agent Wallet:

  • Limited to trading operations

  • Cannot withdraw funds

  • Cannot change core settings

  • Scoped permissions


Multi-Wallet Management

Multiple Accounts

Use Cases:

  • Different strategies in separate wallets

  • Personal vs business trading

  • Risk isolation

  • Testing vs production

Management:

  • Switch wallets in MetaMask

  • Each wallet is independent account

  • Separate balances and positions

  • No cross-wallet operations


Subaccounts

Structure:

Benefits:

  • Unified main wallet

  • Isolated risk per subaccount

  • Separate P&L tracking

  • Team member delegation


Common Workflows

First-Time User


Daily Trader (Session Wallet)


Bot Trader (API Wallet)


Troubleshooting

"Connection Failed"

Causes:

  • MetaMask not installed

  • Wallet locked

  • Wrong network selected

  • Browser extension disabled

Solutions:

  1. Install MetaMask

  2. Unlock wallet

  3. Switch to correct network (usually Ethereum mainnet or testnet)

  4. Enable browser extension

  5. Refresh page


"Signature Rejected"

Causes:

  • User clicked "Reject"

  • Timeout waiting for signature

  • Wallet locked during signing

Solutions:

  1. Try again

  2. Check wallet is unlocked

  3. Verify correct account selected

  4. Confirm network matches


"Invalid Session"

Causes:

  • Browser refreshed (SessionStorage cleared)

  • Session wallet expired

  • Agent was revoked

Solutions:

  1. Reconnect wallet

  2. Sign new authorization

  3. Create new session


"Wrong Network"

Causes:

  • Wallet on different chain

  • App expects different network

Solutions:

  1. Open MetaMask

  2. Click network dropdown

  3. Select correct network (e.g., "Ethereum Mainnet" or custom RPC)

  4. Refresh app


Best Practices

For Security

Do:

  • Use hardware wallet for large accounts

  • Verify all signature prompts

  • Keep wallet software updated

  • Use unique seed phrase

  • Enable 2FA on exchanges (if depositing from exchanges)

Don't:

  • Share seed phrase ever

  • Use same seed on multiple devices unnecessarily

  • Sign on public computers

  • Trust suspicious sites

  • Ignore security warnings


For Convenience

Do:

  • Use session wallets for active trading

  • Create API wallets for bots

  • Label different wallets clearly

  • Keep multiple accounts for different purposes

Don't:

  • Use same wallet for everything

  • Mix test and production

  • Leave sessions open on shared computers


Technical Details

Signature Challenge

Purpose:

  • Prove wallet ownership

  • Establish session

  • Prevent replay attacks

Message Format:

Verification:


Session Tokens

JWT (JSON Web Tokens):

Storage:

  • Server-side: Secure database

  • Client-side: SessionStorage or memory

  • Not in cookies (prevent CSRF)

  • Short-lived (expire after session)


Conclusion

Frontier Chain's authentication model provides strong security through cryptographic signatures while enabling user-friendly trading through agent wallets. No passwords to remember, no accounts to create - your wallet is your identity.

Key Takeaways:

  • Wallet address is your account

  • Signatures prove ownership

  • No passwords or registration

  • Agent wallets for convenience

  • Self-custody maintained

Next Steps:

EIP-712 SigningAgent WalletsNonce Management

Last updated