Ledger System
The Conduct Protocol ledger implements a unique approach to tracking currency movement that combines the best aspects of traditional cash systems with cryptographic security.
Overview
Rather than create individual accounts with a balance, each user controls several independent dollar bills in the form of Unspent Transaction Outputs (UTxOs for short).
This design philosophy creates a more intuitive and secure way to handle digital currency transactions, similar to how physical cash operates in the real world.
Core Concepts
Unspent Transaction Outputs (UTxOs)
What are UTxOs?
- Digital equivalents of physical dollar bills
- Each UTxO represents a specific amount of currency
- Users can own multiple UTxOs of different denominations
- Each UTxO is cryptographically secured and independently spendable
UTxO Characteristics:
- Indivisible: Like physical bills, UTxOs must be spent entirely
- Unique: Each UTxO has a unique identifier on the blockchain
- Transferable: Ownership can be transferred through transactions
- Verifiable: Anyone can verify UTxO ownership and validity
Transaction Structure
Transaction Inputs
Transactions "spend some of these outputs in the form of 'transaction inputs'" to:
- Reference existing UTxOs that the sender owns
- Provide cryptographic proof of ownership
- Authorize the spending of those UTxOs
Transaction Outputs
Transactions produce new "transaction outputs" that:
- Create new UTxOs for recipients
- Split or combine value from input UTxOs
- Include necessary spending conditions
Security Model
An individual transaction output is locked by a small computer script. To spend a transaction output, you need to provide the correct parameters to its computer script.
Script-Based Security:
- Each UTxO is protected by a cryptographic script
- Scripts define the conditions required to spend the UTxO
- Most common script requires a specific cryptographic signature
- Prevents unauthorized spending and double-spending attacks
Authentication Process:
- User attempts to spend a UTxO
- Provides necessary parameters (usually a cryptographic signature)
- Network validates the parameters against the UTxO's script
- If valid, the UTxO can be spent in the transaction
Currency Denominations
Each transaction output includes a quantity (similar to the different denominations of USD: $1, $5, $10, $20, etc.).
Flexible Denominations:
- UTxOs can represent any amount of CNDT tokens
- Users naturally accumulate UTxOs of various sizes
- Provides flexibility for different transaction amounts
- Enables efficient transaction construction
Transaction Fees
To create a transaction output with some desired quantity, the transaction's inputs must spend at least that amount with some room left over for a "transaction fee"
Fee Mechanism:
- Total input value must exceed total output value
- The difference becomes the transaction fee
- Fees incentivize validators to include transactions
- Fee market determines transaction priority
Example Transaction:
Inputs: UTxO A (50 CNDT) + UTxO B (30 CNDT) = 80 CNDT
Outputs: UTxO C (25 CNDT) + UTxO D (50 CNDT) = 75 CNDT
Fee: 80 - 75 = 5 CNDT
Advantages of the UTxO Model
Privacy Benefits
- Transaction Mixing: Multiple UTxOs can obscure transaction patterns
- Address Reuse Avoidance: New addresses can be used for each transaction
- Parallel Processing: UTxOs can be spent independently
Security Benefits
- Atomic Transactions: Either all inputs are spent or none are
- Replay Protection: Each UTxO can only be spent once
- Script Flexibility: Complex spending conditions can be implemented
Scalability Benefits
- Parallel Validation: UTxOs can be validated independently
- Stateless Validation: Validators don't need to maintain account balances
- Efficient Synchronization: Mobile clients can sync relevant UTxOs only
Mobile Optimization
The UTxO model is particularly well-suited for mobile devices:
Efficient Storage:
- Mobile wallets only need to track user's UTxOs
- No need to store complete blockchain state
- Selective synchronization reduces bandwidth usage
Offline Capabilities:
- Transactions can be constructed offline
- UTxO validity can be verified independently
- Enables better mobile user experience
Comparison with Account-Based Models
| Aspect | UTxO Model (Conduct) | Account-Based Model |
|---|---|---|
| State Storage | Individual outputs | Global account balances |
| Privacy | Better mixing potential | More transparent |
| Parallelization | High | Limited |
| Mobile Efficiency | Optimized | Requires full state |
| Transaction Complexity | Script-based flexibility | Simpler operations |
Script System
The Conduct Protocol ledger supports a flexible script system for UTxO spending conditions:
Common Script Types:
- Pay-to-Public-Key: Requires a specific signature
- Multi-signature: Requires multiple signatures
- Time-locked: Can only be spent after a certain time
- Conditional: Spending based on external conditions
This script system enables advanced features like:
- Escrow transactions
- Multi-party agreements
- Automated payments
- Complex smart contracts