Technology That Powers Digital FinanceSmart TradingCrypto MarketsDeFi InnovationGlobal Payments
Enterprise-grade arbitrage engine, wallet infrastructure, swap protocols, and fiat gateway — built for institutions, available as whitelabel.
import { WebSocket } from 'ws';
import { RedisTimeSeries } from '@redis/time-series';
import { OrderBook, SpreadSignal, ExchangeFeed } from './types';
const MIN_SPREAD_BPS = 12; // 0.12% minimum profitable spread
const STALE_THRESHOLD_MS = 150;
export class CrossExchangeDetector {
private books: Map<string, OrderBook> = new Map();
private redis: RedisTimeSeries;
async onOrderBookUpdate(exchange: string, pair: string, book: OrderBook) {
this.books.set(`${exchange}:${pair}`, { ...book, ts: Date.now() });
const signals = this.detectArbitrage(pair);
for (const s of signals.filter(s => s.spreadBps >= MIN_SPREAD_BPS)) {
await this.emitSignal(s);
await this.redis.add(`arb:${pair}`, s.spreadBps);
}
}
private detectArbitrage(pair: string): SpreadSignal[] {
const results: SpreadSignal[] = [];
const books = this.getActiveBooksForPair(pair);
for (let i = 0; i < books.length; i++)
for (let j = i + 1; j < books.length; j++) {
const spread = books[j].bestBid - books[i].bestAsk;
if (spread > 0) results.push({
pair, buyEx: books[i].exchange, sellEx: books[j].exchange,
spreadBps: spread / books[i].bestAsk * 10000,
depth: Math.min(books[i].askDepth, books[j].bidDepth),
});
}
return results.sort((a, b) => b.spreadBps - a.spreadBps);
}
}
import { HDNodeWallet } from 'ethers';
import { KMSClient, EncryptCommand } from '@aws-sdk/client-kms';
import { ChainAdapter, VaultEntry } from '@sourcex/wallet-core';
export class MultiChainWallet {
private kms: KMSClient;
private adapters: Map<string, ChainAdapter>;
async createWallet(chain: string, userId: string) {
const adapter = this.adapters.get(chain);
const entropy = await this.kms.send(
new EncryptCommand({ KeyId: this.masterKeyId })
);
const wallet = HDNodeWallet.fromSeed(entropy);
const encrypted = await this.encryptWithHSM(wallet.privateKey);
await this.vault.store({
userId, chain, address: wallet.address,
encryptedKey: encrypted, hdPath: adapter.derivationPath,
createdAt: new Date(),
});
return { address: wallet.address, chain };
}
async signAndBroadcast(chain: string, tx: TxRequest) {
const key = await this.decryptFromHSM(tx.from);
const signed = await this.adapters.get(chain).sign(key, tx);
return await this.adapters.get(chain).broadcast(signed);
}
}
use anchor_lang::prelude::*;
use anchor_spl::token::{Token, TokenAccount, Transfer};
#[program]
pub mod swap_aggregator {
use super::*;
pub fn execute_best_route(
ctx: Context<SwapRoute>,
amount_in: u64,
min_out: u64,
route: Vec<PoolHop>,
) -> Result<()> {
let mut current = amount_in;
for hop in &route {
let pool = &ctx.remaining_accounts[hop.pool_idx];
let quote = get_pool_quote(pool, current, hop.a_to_b)?;
require!(quote.price_impact < 300, SwapError::HighImpact);
execute_pool_swap(pool, current, quote.expected_out)?;
current = quote.expected_out;
}
require!(current >= min_out, SwapError::SlippageExceeded);
emit!(SwapCompleted {
user: ctx.accounts.user.key(),
amount_in, amount_out: current, hops: route.len() as u8,
});
Ok(())
}
}
import { Controller, Post, Body } from '@nestjs/common';
import { PaymentProcessor } from '@sourcex/payments';
import { KycService, ComplianceCheck } from '@sourcex/compliance';
@Controller('/api/v1/fiat')
export class FiatGatewayController {
constructor(
private processor: PaymentProcessor,
private kyc: KycService,
) {}
@Post('/onramp')
async buyWithFiat(@Body() dto: OnRampRequest) {
await this.kyc.verify(dto.userId, ComplianceCheck.FULL);
const rate = await this.processor.lockRate({
fiat: dto.currency, crypto: dto.asset,
amount: dto.fiatAmount, direction: 'BUY',
});
const payment = await this.processor.chargeFiat({
userId: dto.userId, amount: dto.fiatAmount,
currency: dto.currency, method: dto.paymentMethod,
rateId: rate.id,
});
const tx = await this.processor.releaseCrypto({
asset: dto.asset, amount: rate.cryptoAmount,
toAddress: dto.walletAddress, paymentRef: payment.id,
});
return { txHash: tx.hash, amount: rate.cryptoAmount };
}
}
package deployer
import (
"context"
"github.com/sourcexpro/platform/tenant"
"github.com/sourcexpro/platform/infra"
)
type WhitelabelConfig struct {
TenantID string `json:"tenant_id"`
Domain string `json:"domain"`
Branding BrandingConfig `json:"branding"`
Modules []string `json:"modules"`
}
func (d *Deployer) ProvisionTenant(
ctx context.Context, cfg WhitelabelConfig,
) (*tenant.Instance, error) {
ns := fmt.Sprintf("wl-%s", cfg.TenantID)
if err := d.k8s.CreateNamespace(ctx, ns); err != nil {
return nil, err
}
for _, mod := range cfg.Modules {
if err := d.deployModule(ctx, ns, mod); err != nil {
return nil, fmt.Errorf("module %s: %w", mod, err)
}
}
cert := d.certManager.IssueTLS(ctx, cfg.Domain)
d.ingress.AddRoute(ctx, cfg.Domain, ns, cert)
return &tenant.Instance{ID: cfg.TenantID, URL: cfg.Domain}, nil
}
Five Products. One Platform.
Every layer of blockchain financial infrastructure — designed to work independently or as a unified ecosystem.
AI Arbitrage Engine
NEXUS v4 scans 50+ exchanges in real-time, detecting and executing cross-exchange price inefficiencies in under a millisecond.
Wallet System
Multi-chain wallet infrastructure supporting 100+ assets. HSM-secured key management with institutional-grade custody.
Swap Engine
Instant cross-chain token swaps with optimized routing. Best-price aggregation across DEX and CEX liquidity pools.
Fiat Gateway
Seamless fiat-to-crypto and crypto-to-fiat conversion. Bank transfers, card payments, and local payment methods globally.
Whitelabel Platform
Launch your own branded crypto platform in weeks. Full customization, your domain, your design — our battle-tested infrastructure.
More Coming Soon
Staking, lending, and advanced DeFi tools are on our roadmap.
Built for Speed and Scale
Infrastructure metrics that matter when milliseconds equal money.
Trade Execution Latency
From signal detection to order confirmation
Exchange Coverage
Direct WebSocket feeds across major exchanges
Uptime Guarantee
Cloudflare-backed global infrastructure
Daily Arbitrage Scans
NEXUS AI processes market data continuously
Supported Chains
Multi-chain wallet and swap infrastructure
Ready to Build on Our Infrastructure?
Whether you're launching a new platform or upgrading existing systems — we provide the technology layer.