Economic Model
dregg's economic model is based on computrons (resource units), budget channels,
and bounded counters. This prevents DoS attacks and aligns incentives without
requiring a global token or cryptocurrency.
Computrons
Every turn consumes computrons proportional to its execution cost. Cells hold computron balances. A turn with insufficient balance is rejected before execution. The faucet (devnet only) dispenses initial computrons for testing.
Budget Channels
Based on the Stingray model (bounded counters), budget channels allow decentralized rate limiting without global consensus per operation. Each channel tracks a counter with a maximum value, enabling fine-grained resource control across distributed cells.
Fees and Deposits
- Turn execution fee: Proportional to computational cost (computrons consumed)
- Storage deposit: Refundable deposit for state that persists across epochs
- Intent posting fee: Small anti-spam fee for broadcasting intents
Comparison
| System | dregg Difference |
|---|---|
| Ethereum gas | No global token. Computrons are per-federation, not tradeable. |
| Sui object model | Similar per-object gas, but dregg cells are capability-gated (no ambient access). |
| Mina | Mina has a fixed supply token. dregg computrons are a resource accounting mechanism, not a store of value. |
Storage Economics
Space Banks
Each federation maintains a total storage budget partitioned into space banks. Cells draw from their assigned bank. Over-allocation triggers a queue until space is freed via GC or governance increases the allocation.
Computron-Metered Storage
| Operation | Cost (computrons) | Notes |
|---|---|---|
| Write (per byte, per epoch) | 1 | Ongoing cost for persistent state |
| Read (per byte) | 0.01 | Cheap reads encourage verification |
| MerkleQueue enqueue | 10 + message_size | Anti-spam deposit (refunded on receipt) |
| Erasure shard (per byte, per epoch) | 0.5 | Redundancy at half price |
| Sovereign commitment | Fixed 10/epoch | Regardless of actual state size |
MerkleQueue Inboxes
Every cell has a MerkleQueue inbox for pending messages. Senders pay a deposit (refunded when the message is processed, burned if it expires). This is the primary anti-spam mechanism: flooding inboxes is expensive.
deposit = base_fee + (message_size * per_byte_rate) + (ttl_blocks * per_block_rate)
Erasure Coding
Sovereign cells can opt into erasure-coded availability: state is encoded as k-of-n Reed-Solomon shards distributed across federation nodes. Any k shards reconstruct the full state. Priced at 0.5x the full hosting rate.
State Lifecycle (Deep GC)
| Phase | Condition | Behavior |
|---|---|---|
| Birth | Factory creation or genesis | Active participant |
| Active | Recent turn within TTL | Normal operation |
| Decay | No turn for > TTL, rent unpaid | Frozen; pay rent to reactivate |
| Forced Sovereignty | Decay exceeds grace period | Ejected; must self-host from IVC proof |
The GC cycle runs at epoch boundaries. Forced sovereignty is not state deletion -- the cell's owner retains their IVC proof and can re-register at any time.
Fee Market (EIP-1559 Adaptation)
A base fee adjusts per-block to target 50% utilization:
base_fee[n+1] = base_fee[n] * (1 + (actual - target) / target * 0.125)
Target: 1M computrons/block, max 2M. Users specify max_fee and priority_fee. The base fee is split 50/30/20 (proposer/treasury/burn); priority goes entirely to the proposer.
Validator Staking
Federation membership requires a deposit (initially 100,000 computrons), proven via a STARK range proof (value hidden, threshold satisfaction proven). Slash conditions: 100% for equivocation, 5%/epoch for inactivity, 50% for invalid attestation.