HyperPaxeer NetworkPaxeer Network

ChainFlow

Decentralized proprietary trading platform with on-chain evaluation and automated profit distribution

Overview

ChainFlow is a fully on-chain, trustless proprietary trading platform that revolutionizes how traders access capital. Built on Paxeer Network, ChainFlow eliminates centralized gatekeepers through smart contract-enforced rules, soulbound reputation NFTs, and automated profit distribution.

Why ChainFlow is Revolutionary

Traditional prop firms operate as black boxes with opaque processes, manual evaluations, and delayed payouts. ChainFlow solves these problems through radical transparency and automation.

Architecture

ChainFlow's architecture consists of 6 distinct layers with 11 interconnected smart contracts:

Layer 1: Core Libraries

Mathematical foundation powering PnL calculations, liquidations, and risk metrics.

ContractAddressPurpose
Math0xD4d37681FBd276d45B867A28668C09fB115C47DeAdvanced mathematical operations
SafetyChecks0x9EE12BEe3f246f4Cb30Be3b558b49ec9c60afB20Risk validation logic
PositionManager0xf233245A1Ed5A118c2e3085d564B03e87ADCd8D6Position tracking and management

Layer 2: Reputation System

Soulbound NFTs representing trader credentials and performance history.

ReputationNFT


Layer 3: Oracle Infrastructure

Decentralized price feeds with staleness protection and deviation limits.

ETH/USD Oracle

Address: 0xc60792a2de58D4D822BF2C7fBA56528e0c3701C5

Initial Price: $3,000.00

Features:

  • 5% maximum price deviation
  • Staleness protection
  • Modular design (add pairs without redeployment)

Layer 4: Treasury Management

Multi-vault system managing capital with sophisticated allocation logic.

VaultAddressBalancePurpose
TreasuryManager0x4B2E8B4850f9EDf3509eeeAf664f5D6Cc2178fF8500,000 USDCFirm capital
TradingVault0x7aA4C34351905Ea0521C3c327ED44558157bb5Ac200,000 USDCTrading capital

Total Deployed Capital: 700,000 USDC


Layer 5: Evaluation System

Virtual trading environment for trader qualification.

EvaluationManager

Features:

  • Gas-efficient virtual position tracking
  • Off-chain execution with on-chain verification
  • 90% cost reduction vs fully on-chain

Layer 6: Production Trading

Funded trading vaults with automated profit distribution.

TraderVaultFactory

How It Works

Trader Registration

User connects wallet and completes KYC verification

// Connect wallet
const { address } = useAccount();

// Register for evaluation
await evaluationManager.registerTrader();

Virtual Evaluation

Trader enters evaluation with virtual capital

Rules:

  • 10,000 USDC virtual balance
  • Reach 11,000 USDC (10% profit)
  • Stay above 9,500 USDC (5% max drawdown)
  • Execute minimum 5 trades
// Open virtual position
await evaluationManager.openPosition(
  'BTC-USD',
  10000, // $10,000 size
  true,  // Long
  50000  // Entry price
);

Reputation NFT Issuance

Upon successful evaluation, receive soulbound NFT

// NFT automatically minted on evaluation success
const tokenId = await reputationNFT.tokenOfOwner(address);
const metadata = await reputationNFT.tokenURI(tokenId);

Funded Account Deployment

Factory deploys personal trading vault with real capital

// Factory creates funded vault
const vaultAddress = await traderVaultFactory.createVault(trader);
// Vault receives 100,000 USDC

Live Trading

Execute trades with real capital through trading vault

// Execute trade through vault
await traderVault.openPosition(
  'BTC-USD',
  50000, // $50,000 position
  true   // Long
);

Profit Distribution

Automatic 80/20 profit split on withdrawal

// Withdraw profits
await traderVault.withdrawProfits();
// 80% to trader, 20% to firm (automatic)

Smart Contract Interfaces

Evaluation Manager

interface IEvaluationManager {
    // Register for evaluation
    function registerTrader() external;
    
    // Virtual trading
    function openPosition(
        string memory symbol,
        uint256 size,
        bool isLong,
        uint256 price
    ) external;
    
    function closePosition(uint256 positionId) external;
    
    // Check status
    function getEvaluationStatus(address trader) 
        external view returns (
            uint256 balance,
            uint256 profitTarget,
            uint256 maxDrawdown,
            uint256 trades,
            bool passed
        );
}

Trader Vault Factory

interface ITraderVaultFactory {
    // Create funded vault
    function createVault(address trader) 
        external returns (address vault);
    
    // Query vault
    function getVault(address trader) 
        external view returns (address);
    
    // Vault configuration
    function getInitialCapital() 
        external view returns (uint256);
    
    function getProfitSplit() 
        external view returns (uint256);
}

Reputation NFT

interface IReputationNFT {
    // Soulbound NFT (non-transferable)
    function mint(address trader, string memory uri) external;
    
    // Query trader reputation
    function tokenOfOwner(address owner) 
        external view returns (uint256);
    
    function hasReputation(address trader) 
        external view returns (bool);
}

Integration Example

Complete example of integrating ChainFlow:

import { ethers } from 'ethers';

const EVALUATION_MANAGER = '0xB03A50e11f9dF169B46dF31189A4544ad727Acb5';
const REPUTATION_NFT = '0x202B81a89Adc1039656E78ea1749A038155d8540';
const FACTORY = '0x53A2d0aAF2d405C34940b8507003Af0D98f1CA12';

async function joinChainFlow(signer: ethers.Signer) {
  const evaluationManager = new ethers.Contract(
    EVALUATION_MANAGER,
    EVALUATION_MANAGER_ABI,
    signer
  );

  // 1. Register for evaluation
  const registerTx = await evaluationManager.registerTrader();
  await registerTx.wait();
  console.log('✅ Registered for evaluation');

  // 2. Trade in virtual environment
  const openTx = await evaluationManager.openPosition(
    'BTC-USD',
    ethers.parseUnits('10000', 6), // 10K USDC
    true,  // Long
    50000  // $50,000 entry
  );
  await openTx.wait();
  console.log('✅ Position opened');

  // 3. Check evaluation status
  const status = await evaluationManager.getEvaluationStatus(
    await signer.getAddress()
  );
  
  if (status.passed) {
    console.log('✅ Evaluation passed!');
    
    // 4. Get reputation NFT
    const repNFT = new ethers.Contract(REPUTATION_NFT, NFT_ABI, signer);
    const tokenId = await repNFT.tokenOfOwner(await signer.getAddress());
    console.log('✅ Reputation NFT ID:', tokenId);
    
    // 5. Get funded vault
    const factory = new ethers.Contract(FACTORY, FACTORY_ABI, signer);
    const vaultAddress = await factory.getVault(await signer.getAddress());
    console.log('✅ Funded vault:', vaultAddress);
  }
}

Technology Stack

Smart Contracts

  • Language: Solidity 0.8.20+
  • Framework: Hardhat
  • Libraries: OpenZeppelin
  • Testing: Mocha, Chai
  • Network: Paxeer Network (Chain ID: 125)
npm install --save-dev hardhat @openzeppelin/contracts
npx hardhat test

Web Application

  • Framework: Next.js 14
  • Language: TypeScript
  • UI Library: shadcn/ui, Tailwind CSS
  • State: React hooks, wagmi
  • Features: PWA support
pnpm create next-app@latest chainflow-frontend
pnpm add wagmi viem @tanstack/react-query

API Server

  • Runtime: Node.js
  • Framework: Express
  • Language: TypeScript
  • Database: PostgreSQL (Sequelize ORM)
  • Real-time: WebSockets
pnpm add express sequelize pg ws
pnpm add -D @types/express @types/node

Deployment

  • Web Server: Nginx (Reverse Proxy)
  • Process Manager: PM2
  • SSL/TLS: Certbot (Let's Encrypt)
  • Monitoring: Prometheus + Grafana
sudo apt install nginx
npm install -g pm2
sudo certbot --nginx -d dashboard.paxeer.app

Key Features

Protocol Layer (Smart Contracts)

Application Layer

Deployed Contracts

Production Deployment

Deployment Date: October 4, 2025
Network: Paxeer Mainnet (Chain ID: 125)
Status: 🟢 Production Ready
Tests: 24/24 Passing ✅

Getting Started

For Traders

Connect Wallet

Visit dashboard.paxeer.app and connect your wallet

Complete KYC

Verify your identity through the KYC process

Start Evaluation

Begin trading with 10,000 USDC virtual capital

Pass Evaluation

Achieve 10% profit with max 5% drawdown

Receive Funding

Get 100,000 USDC funded account automatically

Trade & Earn

Keep 80% of profits, firm keeps 20%

For Developers

git clone https://github.com/paxeer/chainflow
cd chainflow
pnpm install
cd contracts
npx hardhat run scripts/deploy.js --network paxeer
cd backend
pnpm build
pm2 start dist/index.js --name chainflow-api
cd frontend
pnpm build
pm2 start npm --name chainflow-app -- start

API Documentation

REST Endpoints

curl https://dashboard.paxeer.app/api/public/announcements
curl https://dashboard.paxeer.app/api/settings
curl -H "Authorization: Bearer TOKEN" \
  https://dashboard.paxeer.app/api/user/kyc/level
curl -X POST -H "Authorization: Bearer TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"documents": [...]}' \
  https://dashboard.paxeer.app/api/user/kyc/application
curl https://dashboard.paxeer.app/api/trading/markets
curl -X POST -H "Authorization: Bearer TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "symbol": "BTC-USD",
    "size": 10000,
    "side": "long"
  }' \
  https://dashboard.paxeer.app/api/trading/order

WebSocket Streams

const ws = new WebSocket('wss://dashboard.paxeer.app/ws');

ws.onopen = () => {
  // Subscribe to market data
  ws.send(JSON.stringify({
    type: 'subscribe',
    channel: 'market.BTC-USD'
  }));
};

ws.onmessage = (event) => {
  const data = JSON.parse(event.data);
  console.log('Market update:', data);
};

Security & Compliance

Security is paramount. ChainFlow implements multiple layers of protection:

Protocol Security

  • ✅ OpenZeppelin security libraries
  • ✅ Role-based access control (RBAC)
  • ✅ Pausable emergency-stop
  • ✅ Reentrancy guards
  • ✅ SafeMath operations
  • ✅ Input validation
  • ✅ Event audit trail

Application Security

  • ✅ End-to-end TLS encryption
  • ✅ KYC verification
  • ✅ Fine-grained permissions
  • ✅ Input validation & sanitization
  • ✅ CSRF/XSS protection
  • ✅ Rate limiting
  • ✅ Comprehensive logging

Deployment Statistics

Total Development Time: ~4 hours
Deployment Duration: 47 minutes
Failed Attempts: 5 (all resolved)
Final Tests: 24/24 passing ✅

Capital Deployed

  • Treasury Manager: 500,000 USDC
  • Trading Vault: 200,000 USDC
  • Total: 700,000 USDC

Gas Consumption

  • Total Deployment: ~0.02 ETH
  • Average per Contract: ~0.0018 ETH
  • All Transactions: < $1 total cost

Innovation Highlights

Roadmap

Phase 1: Alpha Testing

  • Internal testing with 5 traders
  • Frontend integration
  • Bug fixes and optimizations

Phase 2: Security Audit

  • Professional third-party audit
  • Bug bounty program launch
  • Security improvements

Phase 3: Public Beta

  • 50 trader limit
  • Real-time announcements
  • Community feedback

Phase 4: Full Launch

  • Unlimited traders
  • Additional trading pairs (10+ assets)
  • Advanced features (copy trading, automation)

Resources

Success Metrics

What Makes ChainFlow Different

FeatureTraditional Prop FirmsChainFlow
Trust ModelCentralizedTrustless (Smart Contracts)
TransparencyOpaqueFully transparent on-chain
Evaluation TimeDays/WeeksReal-time
Payout Time7-30 daysInstant (automated)
Rule EnforcementManualAutomated (100%)
Credential PortabilityNoneSoulbound NFT
ScalabilityLimitedUnlimited
Profit SplitVariesFixed 80/20

Next Steps

How is this guide?

On this page