Skip to content

Repository files navigation

AgentBrokoSwap ⚡

Simple. Fast. Direct-to-wallet.
A production crypto swap application powered by the Agent Broko ($BROKO) ecosystem and non-custodial routing infrastructure.


📌 Features

  • Core Exchange Pairs: Instant, non-custodial swaps for major crypto pairs with 1-click direction flipping.
  • Fixed-Rate Guarantee Engine: Live quote calculation with fixed-rate locks and integrated commission.
  • No Account / Non-Custodial: Users never need an account, custody wallets, or KYC credentials.
  • Enterprise-Grade Security:
    • Zero private secrets or internal shift IDs exposed to client bundles or public URLs.
    • Public swap IDs formatted as secure random identifiers (e.g., ABS-8F4K2M).
    • Network-aware cryptographic address validation (Bitcoin Legacy, P2SH, Native SegWit Bech32, Taproot Bech32m, Ethereum ERC-20, Tron TRC-20, Solana).
    • Rate limiting & double-click submission idempotency.
  • Adaptive Polling & Live Progress:
    • Live 15-minute countdown expiration timer with refresh protection.
    • Adaptive status polling (0-2m: 5s, 2-10m: 10s, 10m+: 20s) with clean unmount and termination on finalized states.
    • Payment QR code generation supporting Bitcoin URI protocols.
    • Direct links to blockchain explorers upon on-chain transaction detection.
  • Dual Engine (Mock & Production): Full-fidelity mock simulator (SIDESHIFT_MOCK_MODE=true) for offline development and automated testing alongside real production integration (SIDESHIFT_MOCK_MODE=false).
  • Admin Dashboard: Protected metric overview displaying total swaps, completed/pending/failed counts, transaction volumes, and estimated commission revenue.
  • Confirmed BROKO Airdrop: Complete any swap before December 31, 2026 to qualify destination wallets for the community airdrop snapshot.

🛠️ Technology Stack


🚀 Quick Start

1. Installation

git clone https://github.com/sajidhossain8272/agent-broko-swap.git
cd agent-broko-swap
npm install

2. Configure Environment Variables

Copy .env.example to .env:

cp .env.example .env

3. Database Setup & Prisma

npx prisma generate
npx prisma db push

4. Run Development Server

npm run dev

🔒 Security Best Practices

  1. Server-Side Credentials: SIDESHIFT_SECRET, SIDESHIFT_AFFILIATE_ID, and database passwords never leave the server.
  2. Shift ID Obfuscation: The internal SideShift Shift ID is never exposed to the client; all client references use ABS-XXXXXX.
  3. Idempotency: Duplicate shift submissions within a 30-second window for the same quote and addresses return cached results rather than triggering duplicate shifts.
  4. Header Protection: Standard security headers configured in next.config.mjs (X-Frame-Options: DENY, X-Content-Type-Options: nosniff, strict referrer policy).

About

⚡ Instant Non-Custodial Multi-Chain Crypto Swaps. Zero KYC, guaranteed fixed rates, direct-to-wallet execution across 20+ chains.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages