๐Ÿช™ Chapter 4: Phase 1 Data Format - Transaction Schema & UTXO Model

WIA-FIN-003: Cryptocurrency Standard | English Edition

Phase 1 of WIA-FIN-003 defines the fundamental data structures that form the bedrock of cryptocurrency interoperability. In this chapter, we dive deep into the technical specifications for transaction schemas, the UTXO (Unspent Transaction Output) model, address formats, and validation rules.

Understanding these data formats is crucial because they enable different blockchain systems to represent information in a unified way, making cross-chain analytics, wallets, and applications possible without requiring separate implementations for each blockchain.

4.1 Universal Transaction Schema

The WIA transaction schema is designed to represent any cryptocurrency transactionโ€”whether from Bitcoin, Ethereum, Solana, or future blockchainsโ€”in a consistent JSON format. This blockchain-agnostic approach enables developers to build tools that work across the entire cryptocurrency ecosystem.

Core Transaction Fields

Field Type Required Description
wia_version string Yes WIA standard version (e.g., "1.0")
transaction_id string Yes Unique transaction identifier (hash)
blockchain string Yes Source blockchain ("bitcoin", "ethereum", "solana")
network string Yes Network type ("mainnet", "testnet", "devnet")
type string Yes Transaction type ("transfer", "contract_call", "deployment")
timestamp string Yes ISO 8601 timestamp (UTC)
block_number integer No Block containing this transaction (null if pending)
confirmations integer Yes Number of confirmations (0 for pending)
status string Yes "pending", "confirmed", "failed", "dropped"
from object Yes Sender information (address, balance)
to object No Recipient information (null for contract deployment)
amount object Yes Transfer amount with currency and value
fee object Yes Transaction fee paid
metadata object No Blockchain-specific additional data

Complete Transaction Example: Ethereum Transfer

{
  // WIA Standard version
  "wia_version": "1.0",

  // Transaction identification
  "transaction_id": "0x1a2b3c4d5e6f7890abcdef1234567890abcdef1234567890abcdef1234567890",
  "blockchain": "ethereum",
  "network": "mainnet",
  "type": "transfer",

  // Timing and confirmation
  "timestamp": "2025-12-25T10:30:00.000Z",
  "block_number": 18500000,
  "block_hash": "0xabcdef...",
  "confirmations": 12,
  "status": "confirmed",

  // Sender (from)
  "from": {
    "address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
    "balance_before": "10.500000000000000000",
    "balance_after": "9.498000000000000000"
  },

  // Recipient (to)
  "to": {
    "address": "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed",
    "balance_before": "5.000000000000000000",
    "balance_after": "6.000000000000000000"
  },

  // Transfer amount
  "amount": {
    "value": "1.000000000000000000",
    "currency": "ETH",
    "decimals": 18,
    "usd_value": "3500.00",
    "usd_timestamp": "2025-12-25T10:30:00Z"
  },

  // Transaction fee
  "fee": {
    "value": "0.002000000000000000",
    "currency": "ETH",
    "decimals": 18,
    "usd_value": "7.00",
    "gas_used": "21000",
    "gas_price": "100000000000"
  },

  // Ethereum-specific metadata
  "metadata": {
    "nonce": 42,
    "gas_limit": "21000",
    "chain_id": 1,
    "v": "0x1b",
    "r": "0x...",
    "s": "0x...",
    "input": "0x"
  }
}

4.2 Bitcoin Transaction Example (UTXO Model)

Bitcoin uses a fundamentally different transaction model called UTXO (Unspent Transaction Outputs). Unlike Ethereum's account-based model, Bitcoin transactions consume previous outputs and create new ones. WIA-FIN-003 represents this elegantly while maintaining format consistency.

{
  "wia_version": "1.0",

  "transaction_id": "d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5",
  "blockchain": "bitcoin",
  "network": "mainnet",
  "type": "transfer",

  "timestamp": "2025-12-25T10:30:00Z",
  "block_number": 820000,
  "block_hash": "00000000000000000001a2b3c4d5e6f7...",
  "confirmations": 6,
  "status": "confirmed",

  // Bitcoin uses inputs (spending UTXOs) instead of single "from"
  "inputs": [
    {
      "previous_output": {
        "txid": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2",
        "vout": 0
      },
      "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
      "amount": {
        "value": "1.50000000",
        "currency": "BTC",
        "decimals": 8,
        "usd_value": "67500.00"
      },
      "script_sig": "483045022100...",
      "sequence": 4294967295
    }
  ],

  // Bitcoin creates multiple outputs
  "outputs": [
    {
      "address": "1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2",
      "amount": {
        "value": "1.00000000",
        "currency": "BTC",
        "decimals": 8,
        "usd_value": "45000.00"
      },
      "script_pubkey": "76a914...",
      "vout": 0
    },
    {
      // Change output back to sender
      "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
      "amount": {
        "value": "0.49950000",
        "currency": "BTC",
        "decimals": 8,
        "usd_value": "22477.50"
      },
      "script_pubkey": "76a914...",
      "vout": 1
    }
  ],

  "fee": {
    "value": "0.00050000",
    "currency": "BTC",
    "decimals": 8,
    "usd_value": "22.50"
  },

  "metadata": {
    "version": 2,
    "locktime": 0,
    "size": 226,
    "vsize": 226,
    "weight": 904,
    "witness": []
  }
}

4.3 UTXO Model Deep Dive

Understanding the UTXO model is crucial for working with Bitcoin and similar blockchains. In this model, a "coin" is not tracked by account balance but rather by unspent outputs from previous transactions.

UTXO Transaction Flow:

Transaction 1 (Previous):
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Outputs:                             โ”‚
โ”‚ [0] Alice โ†’ 1.5 BTC โœ“ (Unspent)     โ”‚
โ”‚ [1] Bob   โ†’ 0.3 BTC   (Already spent)โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

                โ–ผ (Alice spends UTXO)

Transaction 2 (Current):
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Inputs:                              โ”‚
โ”‚ โ€ข Tx1[0]: 1.5 BTC (from Alice)       โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Outputs:                             โ”‚
โ”‚ [0] Carol โ†’ 1.0 BTC โœ“ (New UTXO)    โ”‚
โ”‚ [1] Alice โ†’ 0.4995 BTC โœ“ (Change)   โ”‚
โ”‚                                      โ”‚
โ”‚ Fee: 0.0005 BTC (1.5 - 1.0 - 0.4995)โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Key UTXO Concepts

UTXO Set

The UTXO set is the collection of all unspent transaction outputs in the blockchain. This set represents the current state of who owns what in Bitcoin. Full nodes maintain this set in memory for fast transaction validation.

UTXO Reference Address Amount (BTC) Block Height
tx123...:0 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa 0.49950000 820000
tx456...:1 1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2 1.00000000 820000
tx789...:0 1HQ3Go3ggs8pFnXuHVHRytPCq5fGG8Hbhx 2.50000000 819995

4.4 Address Normalization

Different blockchains use different address formats. WIA-FIN-003 normalizes these into a consistent structure while preserving blockchain-specific information.

Universal Address Format

{
  "wia_version": "1.0",
  "address": {
    "raw": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
    "blockchain": "ethereum",
    "network": "mainnet",
    "type": "eoa",  // Externally Owned Account (vs. contract)
    "checksummed": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
    "validation": {
      "is_valid": true,
      "checksum_valid": true
    }
  }
}

Address Types Across Blockchains

Blockchain Example Address Format Length
Bitcoin (P2PKH) 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa Base58Check 26-35 chars
Bitcoin (P2SH) 3J98t1WpEZ73CNmYviecrnyiWrnqRhWNLy Base58Check 26-35 chars
Bitcoin (Bech32) bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4 Bech32 42-62 chars
Ethereum 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb Hexadecimal 42 chars
Solana 7EqQdEULxWcraVx3mXKFqJy6z3bK4W5X2LjBqQKx8zQ5 Base58 32-44 chars
Cardano addr1qxy...xyz Bech32 Variable

Bitcoin Address Types Explained

๐Ÿช™ Bitcoin Address Evolution
  • P2PKH (Pay to Public Key Hash): Original format, starts with "1". Example: 1A1zP1eP...
  • P2SH (Pay to Script Hash): Multisig and complex scripts, starts with "3". Example: 3J98t1W...
  • Bech32 (SegWit): Native SegWit, lower fees, starts with "bc1". Example: bc1qw508...
  • Taproot (P2TR): Latest format for privacy and efficiency, also Bech32. Example: bc1p5d7r...

4.5 Token Metadata Schema

Beyond native blockchain currencies (BTC, ETH), most blockchains support custom tokens. WIA-FIN-003 provides a standard format for describing these tokens.

{
  "wia_version": "1.0",
  "token": {
    "contract_address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
    "blockchain": "ethereum",
    "network": "mainnet",
    "standard": "ERC-20",

    "details": {
      "name": "Tether USD",
      "symbol": "USDT",
      "decimals": 6,
      "total_supply": "95000000000.000000",
      "logo_uri": "https://assets.example.com/usdt.png"
    },

    "market_data": {
      "price_usd": "1.00",
      "market_cap_usd": "95000000000",
      "volume_24h_usd": "50000000000",
      "circulating_supply": "95000000000.000000",
      "timestamp": "2025-12-25T10:30:00Z"
    },

    "metadata": {
      "verified": true,
      "issuer": "Tether Limited",
      "website": "https://tether.to",
      "whitepaper": "https://tether.to/wp-content/uploads/2016/06/TetherWhitePaper.pdf"
    }
  }
}

Token Standards Across Blockchains

Blockchain Fungible Tokens Non-Fungible Tokens Notes
Ethereum ERC-20 ERC-721, ERC-1155 Most widely adopted standards
Binance Smart Chain BEP-20 BEP-721 Compatible with ERC standards
Solana SPL Token Metaplex NFT Different architecture than EVM
Cardano Native Tokens Native NFTs First-class token support
Polkadot PSP-22 PSP-34 Substrate-based standards

4.6 Block Structure

WIA-FIN-003 also standardizes how blocks themselves are represented, enabling blockchain explorers and analytics tools to work across different blockchains.

{
  "wia_version": "1.0",
  "block": {
    "blockchain": "ethereum",
    "network": "mainnet",
    "number": 18500000,
    "hash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
    "parent_hash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "timestamp": "2025-12-25T10:30:00Z",

    "miner": {
      "address": "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed",
      "reward": {
        "value": "2.5",
        "currency": "ETH",
        "usd_value": "8750.00"
      }
    },

    "transactions": {
      "count": 150,
      "transaction_ids": [
        "0x1a2b3c4d...",
        "0x5e6f7g8h...",
        // ... (truncated for brevity)
      ]
    },

    "statistics": {
      "size_bytes": 125000,
      "gas_used": "15000000",
      "gas_limit": "30000000",
      "difficulty": "58750000000000000",
      "total_difficulty": "58750000000000000000000"
    },

    "metadata": {
      "extra_data": "0x...",
      "nonce": "0x1234567890abcdef",
      "mix_hash": "0x..."
    }
  }
}

4.7 Validation Rules

All WIA-FIN-003 data must pass rigorous validation. The standard provides JSON Schema definitions for automated validation.

Transaction Validation Checklist

Required Field Validation

  • โœ“ wia_version must match supported version (currently "1.0")
  • โœ“ transaction_id must be valid hash for specified blockchain
  • โœ“ blockchain must be from allowed list
  • โœ“ timestamp must be valid ISO 8601 format
  • โœ“ status must be one of: "pending", "confirmed", "failed", "dropped"

Amount Validation

  • โœ“ amount.value must be positive number
  • โœ“ amount.decimals must match currency specification
  • โœ“ amount.currency must be valid ticker symbol
  • โœ“ USD values must include timestamp for price reference

Address Validation

  • โœ“ Address format must match blockchain specification
  • โœ“ Checksum validation for formats that support it (Ethereum, Bitcoin Bech32)
  • โœ“ Network identifier must match address prefix (mainnet vs. testnet)

UTXO-Specific Validation (Bitcoin)

  • โœ“ Input references must point to existing, unspent outputs
  • โœ“ Sum of outputs must not exceed sum of inputs
  • โœ“ Fee must be positive (inputs sum - outputs sum > 0)
  • โœ“ Scripts must be valid and properly formatted

Example Validation Code (TypeScript)

import Ajv from 'ajv';
import { wiaTransactionSchema } from '@wia/schemas';

const ajv = new Ajv();
const validate = ajv.compile(wiaTransactionSchema);

function validateWIATransaction(data: any): boolean {
  const valid = validate(data);

  if (!valid) {
    console.error('Validation errors:', validate.errors);
    return false;
  }

  // Additional business logic validation
  if (data.blockchain === 'bitcoin') {
    return validateBitcoinUTXO(data);
  } else if (data.blockchain === 'ethereum') {
    return validateEthereumAddress(data);
  }

  return true;
}

4.8 Implementation Examples

Converting blockchain-specific data to WIA format is straightforward. Here are examples for major blockchains.

Bitcoin to WIA Conversion

async function convertBitcoinToWIA(bitcoinTx: BitcoinTransaction): Promise {
  return {
    wia_version: "1.0",
    transaction_id: bitcoinTx.txid,
    blockchain: "bitcoin",
    network: "mainnet",
    type: "transfer",
    timestamp: new Date(bitcoinTx.blocktime * 1000).toISOString(),
    block_number: bitcoinTx.blockheight,
    confirmations: bitcoinTx.confirmations,
    status: bitcoinTx.confirmations > 0 ? "confirmed" : "pending",

    inputs: bitcoinTx.vin.map(input => ({
      previous_output: {
        txid: input.txid,
        vout: input.vout
      },
      address: input.address,
      amount: {
        value: input.value.toFixed(8),
        currency: "BTC",
        decimals: 8,
        usd_value: (input.value * btcPrice).toFixed(2)
      },
      script_sig: input.scriptSig.hex,
      sequence: input.sequence
    })),

    outputs: bitcoinTx.vout.map(output => ({
      address: output.scriptPubKey.addresses[0],
      amount: {
        value: output.value.toFixed(8),
        currency: "BTC",
        decimals: 8,
        usd_value: (output.value * btcPrice).toFixed(2)
      },
      script_pubkey: output.scriptPubKey.hex,
      vout: output.n
    })),

    fee: {
      value: calculateFee(bitcoinTx).toFixed(8),
      currency: "BTC",
      decimals: 8
    }
  };
}

4.9 Benefits of Standardized Data Formats

The practical benefits of Phase 1 implementation are substantial and immediate:

๐ŸŽฏ Real-World Benefits
  • Unified Analytics: Build one analytics platform that works across all blockchains instead of separate dashboards for each chain.
  • Simplified Wallets: Multi-chain wallets can use a single codebase for transaction history, balance tracking, and display.
  • Cross-Chain DEX: Decentralized exchanges can list assets from multiple blockchains with consistent data handling.
  • Regulatory Compliance: Tax reporting and audit tools work across all cryptocurrency holdings without chain-specific plugins.
  • Developer Experience: New developers learn one format instead of mastering dozens of blockchain-specific schemas.
  • API Aggregation: Services can aggregate data from multiple blockchain APIs into a single, consistent format for clients.

4.10 Getting Started with Phase 1

Ready to implement WIA-FIN-003 Phase 1 in your project? Follow these steps:

Step 1: Install the WIA SDK

npm install @wia/cryptocurrency-standard
# or
pip install wia-cryptocurrency-standard
# or
go get github.com/wia-official/cryptocurrency-standard

Step 2: Import Schemas and Validators

import {
  WIATransaction,
  validateTransaction,
  convertBitcoinToWIA,
  convertEthereumToWIA
} from '@wia/cryptocurrency-standard';

Step 3: Convert Your Data

const ethTx = await web3.eth.getTransaction(txHash);
const wiaFormat = convertEthereumToWIA(ethTx);

if (validateTransaction(wiaFormat)) {
  // Store, display, or process the standardized data
  await database.transactions.insert(wiaFormat);
}

Step 4: Test Your Implementation

npm run wia:test
# Runs validation against official test vectors

๐Ÿ“š Chapter Summary

โ“ Review Questions

  1. What are the required fields in the WIA Universal Transaction Schema? Explain the purpose of each and why blockchain-agnostic design is important.
  2. Explain the UTXO model used by Bitcoin. How does it differ from Ethereum's account model, and how does WIA-FIN-003 represent both in a unified format?
  3. Describe the three main Bitcoin address types (P2PKH, P2SH, Bech32). What are their differences, and how does WIA normalize them?
  4. How are transaction fees handled differently in Bitcoin vs. Ethereum? How does the WIA standard represent fees consistently across both?
  5. What is the UTXO set, and why is it important? How would you query an address's balance using the UTXO model versus the account model?
  6. Walk through the process of converting a native Ethereum transaction to WIA format. What information needs to be added, transformed, or calculated?

๐Ÿ”ฎ Looking Ahead

With a solid understanding of Phase 1 data formats, Chapter 5 will explore Phase 2: API & Communication Layer. We'll examine how WIA-FIN-003 standardizes RESTful APIs, WebSocket protocols, authentication mechanisms, and best practices for building interoperable cryptocurrency services.

You'll learn about endpoint design patterns, real-time event streaming, rate limiting strategies, pagination approaches, and error handling conventions that enable seamless integration between different cryptocurrency platforms and applications.

Korea Standardization Infrastructure Mapping

Korea operates a comprehensive standards governance system through inter-ministerial cooperation. National Standards Council (under Prime Minister's Office, per Framework Act on National Standards Article 5) coordinates KATS (Korean Agency for Technology and Standards), MFDS (Ministry of Food and Drug Safety), MOTIE (Ministry of Trade, Industry and Energy), MSIT (Ministry of Science and ICT), MOIS (Ministry of the Interior and Safety), MOE (Ministry of Environment), MOHW (Ministry of Health and Welfare), MND (Ministry of National Defense), MCST (Ministry of Culture, Sports and Tourism), MOFA (Ministry of Foreign Affairs), MOJ (Ministry of Justice), and FSC (Financial Services Commission). Accreditation and Testing: KOLAS (Korea Laboratory Accreditation Scheme) accredits 800+ testing laboratories. KAS (Korea Accreditation System) accredits 50+ certification bodies. KTC (Korea Testing Certification), KTR (Korea Testing & Research Institute), KTL (Korea Testing Laboratory), and KCL (Korea Conformity Laboratories) provide conformance testing. Telecom and Cyber: KCC (Korea Communications Commission), KCA (Korea Communications Agency), TTA (Telecommunications Technology Association), IITP (Institute for Information & Communications Technology Planning & Evaluation), NIPA (National IT Industry Promotion Agency), KISA (Korea Internet & Security Agency), KCMVP (Korea Cryptographic Module Validation Program), NIS (National Intelligence Service), NSR (National Security Research Institute), and NCSC (National Cyber Security Center). National R&D Centers: KIST, ETRI, KAIST, Seoul National University, Yonsei University, Korea University, POSTECH, UNIST, GIST, DGIST, KISTI, KIER, KIMM, KRICT, KFRI, KRIBB. International Standards Cooperation: ISO TC/SC Korean secretariats, IEC TC/SC Korean secretariats, ITU-T Study Group Korean chairs, 3GPP RAN/SA Korean chairs, IEEE 802 Korean chairs, W3C Korea office, OASIS Korea office, IETF Korea cooperation, OECD CSTP, UN ESCAP, APEC SCSC Korean cooperation. Korean Industrial Standards (KS) Catalog: KS X (Information) 25,000+, KS A (Basic) 15,000+, KS B (Machinery) 25,000+, KS C (Electrical) 18,000+, KS D (Metallurgy) 12,000+, KS E (Mining) 5,000+, KS F (Construction) 18,000+, KS H (Food) 8,000+, KS I (Environment) 5,000+, KS J (Biology) 3,000+, KS K (Textile) 15,000+, KS L (Ceramics) 7,000+, KS M (Chemistry) 12,000+, KS P (Medical) 5,000+, KS Q (Quality Mgmt) 4,000+, KS R (Transport) 12,000+, KS S (Service) 3,000+, KS T (Packaging) 4,000+, KS V (Shipbuilding) 5,000+, KS W (Aerospace) 3,000+ โ€” totaling 220,000+ Korean Industrial Standards. Key Acts: Personal Information Protection Act (Act 19234, effective Sept 15, 2024), Electronic Government Act, Electronic Signature Act, Act on Promotion of Information and Communications Network Utilization and Information Protection, Information and Communications Infrastructure Protection Act, Data Industry Act, Public Data Act, AI Framework Act (Act 20212, effective July 2026), Industrial Technology Innovation Promotion Act, Framework Act on Science and Technology โ€” 70+ Korean standardization-related laws.