fxyz Documentation

website·Indexed 30 days ago

https://www.fxyz.network

Technical documentation for the fxyz network, including API references for GraphQL and REST, technical architecture, tokenomics for Florin, and routing and scoring algorithms.

Tokens
5.8K
Snippets
30
Records
43
Agent score
50%

What's inside fxyz

  1. Overview of ƒxyz Network Tokens

    The ƒxyz economic architecture uses four tokens on Solana mainnet-beta to track value, work, knowledge, and governance score. Governance is based on a non-transferable 'score' calculated via Formula B, not on simple token balances.

    • Florin (ƒ / FLORIN): Settlement value. Transferable. Feeds the score only through specific public-register events (not by holding).
    • Joule (J / JOULE): Approved work. Non-transferable. Transforms into the score over a 180-day window.
    • House of Wisdom (ℏ / HOW): Accepted knowledge. Non-transferable. Transforms into the score over a 365-day window.
    • ƒ(xyz) (FXYZ): The tradable materialization of the score, minted against recorded contributions.
  2. Understand the ƒxyz network entity structure

    The ƒxyz network is designed as a multi-entity network to ensure regulatory and compliance readiness. The primary node is FXYZ Sp. z o.o., based in Poland (KRS 0000816477). The architecture allows for the addition of further nodes in other jurisdictions as the network expands.
  3. FX Routing Architecture Overview

    The fxyz Network routes foreign exchange (FX) conversions using a weighted directed currency graph where nodes are currencies and edges are exchange rate pairs. To convert multiplicative exchange rates into additive path weights, the engine uses logarithmic exchange rates: edge weight w(u,v) = -log(rate(u → v)).

    Key components include:

    • Route Queries: Answered by bestSimplePathBounded, a branch-and-bound depth-first search on log-rate weights (exact within its hop bound).
    • Arbitrage Detection: Uses Bellman-Ford relaxation with a super-source to screen for negative cycles.
    • Admin Comparison: Uses a line-graph transformation to analyze routing performance.
  4. ƒxyz Network Technical Stack Overview

    The ƒxyz Network is built on Next.js 16 and React 19. It is deployed via Coolify on bare metal servers and protected by Cloudflare edge infrastructure. The system utilizes a Neo4j knowledge graph to manage members, personas, circles, expertise, relationships, and scoring state.
  5. Set up the ƒxyz Network for local development

    To run the ƒxyz Network locally, you must have access to the private monorepo. The setup involves installing dependencies, starting the Neo4j database via Docker, and launching the workspace using Turbo.
    # 1. Install dependencies
    pnpm install
    
    # 2. Start Neo4j
    docker compose -f docker/neo4j/docker-compose.yml up -d
    
    # 3. Start the workspace
    pnpm dev
  6. Detect Arbitrage Opportunities using Bellman-Ford

    Arbitrage opportunities occur when the product of exchange rates along a cycle exceeds 1.0. In log-space, this is represented as a negative-weight cycle where the sum of log-costs is negative. The engine detects these by running Bellman-Ford for |V|-1 iterations and then performing a |V|-th pass; any edge that can still be relaxed indicates a negative cycle.

    Implementation Details:

    • Service: findNegativeCycles() in packages/neo4j-network/src/services/routing-engine.ts.
    • GraphQL Query: detectArbitrage.
    • Constraint: Raw rate arbitrage is filtered by configurable spread models to ensure cycles are profitable after bid-ask spreads.
    // findNegativeCycles() in packages/neo4j-network/src/services/routing-engine.ts
    findNegativeCycles(
      nodes: string[],
      edges: WeightedEdge[],
      maxCycleLength?: number,
      maxIterations?: number
    ): string[][]
    // Returns an ordered list of node IDs, e.g., ["EUR", "USD", "JPY", "EUR"]
  7. Implement Sybil-resistant reputation with MeritRank

    MeritRank uses personalized PageRank to create a Sybil-tolerant reputation system. Instead of a global score, it computes reputation from the perspective of an individual member (the teleport vector). This ensures that clusters of fake accounts cannot boost their global ranking unless they receive vouches from legitimate members.
    MR_i(v) = (1 - d) * e_i(v) + d * sum_u [A_uv * MR_i(u) / k_u]
    
    Where:
      d     = damping factor (typically 0.85)
      e_i(v) = 1 if v == i (personalized teleport vector), else 0
      A_uv   = edge weight from u to v (trust/vouch strength)
      k_u    = out-degree of u
  8. Understand the conservation-based scoring transformation

    The scoring system uses a conservation model rather than a decay model. Instead of destroying pending work-token mass via applyDecay (removed in migration 447 on 2026-05-25), the system uses applyTransform. This ensures that total mass is conserved: approved contributions remain unchanged, while pending portions are split into a surviving share and a transformed share. The transformed share is routed to the f(xyz) governance score via Formula B, meaning the 'half-life' represents a transfer rate to governance rather than a loss of value.
    // Logic implemented in packages/neo4j-scoring/src/ces-kernel.ts
    // applyTransform returns:
    {
      remaining: approved + survived,
      transformed: pending - survived
    }
  9. Calculate member contribution scores using Option B synthesis

    The ƒxyz Network uses 'Option B' synthesis to combine three token-denominated inputs—Florin (capital), Joule (work), and House of Wisdom (knowledge)—into a single score. This method is strictly monotonic, meaning any increase in contribution on any axis raises the final score. It rewards balanced contributions across all three dimensions via a breadth bonus without penalizing specialists.
    Final Score = A * (w_F*F + w_J*J + w_H*H) * (1 + k*(1 - HHI))
    
    Where:
      F, J, H       = effective Florin / Joule / House of Wisdom contributions
      w_F, w_J, w_H = per-input weights (default 1.0 each)
      A             = total factor productivity (network-wide scaling constant)
      k             = breadth-bonus coefficient (default 0.3)
      HHI           = Herfindahl-Hirschman Index of contribution concentration
  10. Convert Joule and HoW to ƒ(xyz)

    Held Joule and HoW tokens can be converted to ƒ(xyz) on a one-for-one basis. The process involves the owner burning the tokens, the network verifying the burn, and the network re-minting ƒ(xyz) in batches.

    Crucially, this conversion does not change the member's total score because the minting process debits the member's off-chain accumulator by the same amount minted.

  11. Understand ƒxyz Scoring and Identity Model

    Member identity is tracked across four separate axes: Standing, contribution level, ring, and expertise. Scoring is handled via 'Option B' (weighted magnitude with an HHI breadth bonus), which feeds the Formula B accumulator. A daily cron job reconciles cached scores.
  12. Configure contribution synthesis weights and coefficients

    Contribution weights and the breadth-bonus coefficient are stored in NetworkConfig governance parameters. By default, all token types are weighted equally to ensure that 'work trumps money' via emission design rather than weight multipliers.
    // contribution-score.ts SYNTHESIS_WEIGHTS defaults
    w_F = 1.0   // Florin capital weight
    w_J = 1.0   // Joule work weight
    w_H = 1.0   // House of Wisdom knowledge weight
    k   = 0.3   // breadth-bonus coefficient