Audit

Raze.bot Security Audit Documentation

Executive Summary

Raze.bot is a multi-wallet Solana trading platform that prioritizes user security through local transaction processing and client-side private key management. This audit documentation demonstrates that Raze.bot implements industry-standard security practices to ensure that private keys never leave the user's device and all sensitive operations are performed locally.

🔐 Core Security Principles

1. Local Private Key Management

Private keys are generated, stored, and used exclusively on the client-side:

  • Key Generation: New wallets are created using Solana's Keypair.generate() method locally in the browser

  • Key Storage: Private keys are encrypted using AES encryption before storage

  • Key Usage: Transaction signing occurs entirely in the browser using local keypairs

  • Zero Server Transmission: Private keys are never sent to any server or external service

2. Client-Side Transaction Signing

All transaction signing happens locally in the user's browser:

// Transaction signing is performed locally
const signTransaction = (transactionBase58: string, privateKey: string): string => {
  // Create keypair from private key (locally)
  const keypair = web3.Keypair.fromSecretKey(bs58.decode(privateKey));
  
  // Deserialize transaction
  const txBuffer = bs58.decode(transactionBase58);
  const transaction = web3.VersionedTransaction.deserialize(txBuffer);
  
  // Sign the transaction locally
  transaction.sign([keypair]);
  
  // Return signed transaction
  return bs58.encode(transaction.serialize());
};

3. Encrypted Local Storage

Wallet data is encrypted before storage:

  • Encryption Method: AES encryption using CryptoJS

  • Storage Locations: IndexedDB (primary) and localStorage (backup)

  • Key Protection: Encryption key is hardcoded in client code (standard for client-side apps)

  • Migration Support: Automatic migration from unencrypted to encrypted storage

🛡️ Security Architecture

Transaction Flow Security

  1. Unsigned Transaction Request

    • Client requests unsigned transaction from server

    • Server returns transaction template without signatures

    • No private keys involved in this step

  2. Local Transaction Signing

    • Client deserializes unsigned transaction

    • Private key is used locally to sign transaction

    • Signed transaction is serialized for transmission

  3. Signed Transaction Submission

    • Only the signed transaction is sent to server

    • Server forwards to Jito Bundle Service or RPC

    • Private keys remain on client device

Wallet Management Security

Wallet Creation

export const createNewWallet = async (): Promise<WalletType> => {
  const keypair = Keypair.generate(); // Local generation
  const address = keypair.publicKey.toString();
  const privateKey = bs58.encode(keypair.secretKey);
  
  return {
    id: Date.now(),
    address,
    privateKey, // Stored locally only
    isActive: false
  };
};

Wallet Import

export const importWallet = async (
  privateKeyString: string
): Promise<{ wallet: WalletType | null; error?: string }> => {
  // Validation and keypair creation happens locally
  const privateKeyBytes = bs58.decode(privateKeyString);
  const keypair = Keypair.fromSecretKey(privateKeyBytes);
  const address = keypair.publicKey.toString();
  
  // Private key remains in local memory only
  return { wallet: { id: Date.now(), address, privateKey: privateKeyString, isActive: false } };
};

Data Encryption Implementation

// Encryption utilities
const encryptData = (data: string): string => {
  return CryptoJS.AES.encrypt(data, ENCRYPTION_KEY).toString();
};

const decryptData = (encryptedData: string): string => {
  const bytes = CryptoJS.AES.decrypt(encryptedData, ENCRYPTION_KEY);
  return bytes.toString(CryptoJS.enc.Utf8);
};

// Secure wallet storage
export const saveWalletsToCookies = (wallets: WalletType[]): void => {
  const walletData = JSON.stringify(wallets);
  const encryptedData = encryptData(walletData); // Encrypt before storage
  localStorage.setItem(ENCRYPTED_STORAGE_KEY, encryptedData);
};

🔍 Security Audit Findings

✅ Strengths

  1. Local Key Management

    • Private keys are generated using secure Solana libraries

    • Keys never leave the client environment

    • All cryptographic operations performed locally

  2. Transaction Security

    • Transactions are signed client-side using local keypairs

    • Only signed transactions are transmitted to servers

    • No private key exposure during transaction processing

  3. Data Protection

    • Wallet data encrypted using AES before storage

    • Multiple storage backends (IndexedDB + localStorage)

    • Automatic migration from unencrypted to encrypted storage

  4. Code Transparency

    • Open-source codebase allows for public security review

    • Clear separation between client and server responsibilities

    • Well-documented security practices

⚠️ Considerations

  1. Client-Side Encryption Key

    • Encryption key is embedded in client code (standard limitation for client-side apps)

    • Users should be aware that client-side encryption protects against casual access, not determined attackers with code access

  2. Browser Security Dependency

    • Security relies on browser's built-in protections

    • Users should use updated browsers and avoid compromised devices

  3. Phishing Protection

    • Users must verify they're using the official Raze.bot domain

    • No additional phishing protection mechanisms implemented

🛠️ Security Dependencies

Core Security Libraries

  • @solana/web3.js: Official Solana library for blockchain interactions

  • bs58: Base58 encoding/decoding for Solana addresses and keys

  • crypto-js: AES encryption for local data protection

  • js-cookie: Secure cookie management

Security-Relevant Dependencies

{
  "@solana/web3.js": "^1.95.8",
  "bs58": "^6.0.0",
  "crypto-js": "^4.2.0",
  "js-cookie": "^3.0.5"
}

🔒 Best Practices Implemented

1. Principle of Least Privilege

  • Server only receives unsigned transaction templates and signed transactions

  • No unnecessary data transmission

  • Minimal server-side private data handling

2. Defense in Depth

  • Multiple storage mechanisms (IndexedDB + localStorage)

  • Encryption at rest

  • Client-side validation and error handling

3. Secure Development Practices

  • TypeScript for type safety

  • Comprehensive error handling

  • Input validation for private keys and transactions

📋 Security Checklist

  • ✅ Private keys generated locally using secure libraries

  • ✅ Private keys never transmitted to servers

  • ✅ All transaction signing performed client-side

  • ✅ Wallet data encrypted before storage

  • ✅ Multiple storage backends for redundancy

  • ✅ Open-source code for transparency

  • ✅ Secure dependency management

  • ✅ Proper error handling and validation

  • ✅ Clear separation of client/server responsibilities

🔍 Competitor Security Analysis

Overview

To provide context for Raze.bot's security approach, we analyzed how major Solana trading bot competitors handle private keys and transaction security. This comparison highlights the varying approaches to user security in the trading bot ecosystem.

Security Trade-offs Analysis

Feature
Raze.bot
BullX
GMGN
Photon
Axiom
Padre.gg

Local Key Storage

Client-Side Signing

Zero Server Transmission

Open Source Security

✅ = Implemented, ❌ = Not implemented, ❓ = Unclear/Unverified

🎯 Conclusion

Raze.bot implements a security-first architecture that ensures:

  1. Private keys remain local - Never transmitted or stored on servers

  2. Local transaction signing - All cryptographic operations performed in the browser

  3. Encrypted storage - Wallet data protected at rest

  4. Transparent security - Open-source code allows for public audit

Compared to competitors, Raze.bot offers the most secure approach to private key management by keeping all sensitive operations local to the user's device. While some competitors offer additional features like MEV protection, Raze.bot's focus on fundamental security principles provides users with the highest level of asset protection.

Users can confidently use Raze.bot knowing that their private keys and sensitive data remain under their complete control on their local device.


📞 Security Contact

For security-related questions or to report vulnerabilities:


This security audit documentation demonstrates Raze.bot's commitment to user security and transparency. The platform's architecture ensures that users maintain complete control over their private keys while providing a seamless trading experience.

Last updated