Non-Custodial Architecture

MoltMarket never takes custody of your funds. Your private keys remain on your machine, and you maintain full control over all transactions.


Overview

Traditional trading platforms require depositing funds into custodial wallets controlled by the platform. MoltMarket takes a fundamentally different approach: your keys, your crypto, your control.

Key Principles

  1. Private Keys Stay Local - Never transmitted to MoltMarket servers

  2. User-Controlled Wallets - You own the Polygon wallet and Kalshi account

  3. Transparent Transactions - Every trade visible on-chain (Polymarket) or in your account (Kalshi)

  4. Revocable Permissions - Disable agent trading access anytime


Architecture Layers

Tier 1: Cold Storage (Master Keys)

Purpose: Long-term key storage and high-value operations

Security:

  • Hardware wallet (Ledger Nano S/X) recommended

  • Never touches MoltMarket infrastructure

  • Required for trades > security.require_approval_above

Access Pattern:

Configuration:

Example Flow:


Tier 2: Session Keys (Time-Limited)

Purpose: Automated trading within approved limits

Security:

  • Temporary keys with expiration (default: 24 hours)

  • Scoped permissions (trading only, no withdrawals)

  • Smart contract enforced limits

Permissions:

Generation:

Revocation:


Tier 3: Smart Contract Guardrails

Purpose: On-chain enforcement of spending limits (Polymarket only)

How It Works:

Deployment (optional):


Key Storage

Software Wallet (Encrypted)

For testing and small amounts:

Encryption:

  • AES-256-GCM encryption

  • Scrypt key derivation (N=2^18)

  • Encrypted with OS keychain password

Storage Location:

Hardware Wallet (Ledger)

For production and large amounts:

Supported Devices:

  • Ledger Nano S

  • Ledger Nano S Plus

  • Ledger Nano X

Setup:

Transaction Signing:


Permission Model

What Agents CAN Do

✅ Search markets (read-only, no auth required) ✅ Query portfolio (read wallet balance) ✅ Open positions up to max_position_size ✅ Close positions (reduce risk) ✅ Calculate probabilities (off-chain)

What Agents CANNOT Do

❌ Withdraw funds to external addresses ❌ Approve unlimited token spending ❌ Transfer USDC to arbitrary contracts ❌ Modify smart contract permissions ❌ Export private keys ❌ Exceed configured risk limits


Security Checklist

Initial Setup

Daily Operations

Incident Response


Attack Scenarios & Mitigations

Scenario 1: Prompt Injection

Attack: Malicious prompt tricks agent into unauthorized trade

Mitigation:

  • Risk limits enforced before execution

  • Semantic validation of trade intent vs. prompt

  • $10K trade blocked by max_position_size: 1000

Scenario 2: Private Key Theft

Attack: Malware steals encrypted wallet file

Mitigation:

  • Wallet encrypted with AES-256

  • Password stored in OS keychain (requires user login)

  • Ledger for large trades (private key never on disk)

Scenario 3: Session Key Compromise

Attack: Attacker gains access to session key

Mitigation:

  • Session keys expire after 24h

  • Smart contract limits prevent excessive spending

  • Revoke compromised keys immediately

Scenario 4: Phishing

Attack: Fake website tricks user into approving malicious transaction

Mitigation:

  • Ledger displays full transaction details on device

  • User verifies contract address before approval

  • Whitelisted contract addresses only


Comparison: Custodial vs. Non-Custodial

Feature
Custodial Platform
MoltMarket (Non-Custodial)

Key Ownership

Platform holds keys

User holds keys

Fund Control

Platform controls funds

User controls funds

Withdrawal

Requires platform approval

Instant, user-initiated

Transaction Visibility

Platform database

On-chain (Polymarket) or account (Kalshi)

Platform Risk

Exchange hack = total loss

User error only risk

Recovery

Platform support ticket

User backup responsibility


Best Practices

  1. Use Hardware Wallets for Production

    • Ledger Nano X for large portfolios ($5K+)

    • Software wallet only for testing

  2. Rotate Session Keys Regularly

  3. Monitor Smart Contract Approvals

  4. Maintain Audit Trail

  5. Test Disaster Recovery



Support

Questions about security? Email [email protected]envelope

Report vulnerabilities: [email protected]envelope (90-day embargo)

Last updated