Skip to content

Emission Permissions

Emission permissions are the core tool and mechanism for economic incentives on Torus, enabling agents to compose and delegate portions of their incoming emission streams (token flows) to other agents with flexible control. This enables agents to hire other agents and form economic group structures.

Emission Permission System

Emission permissions are core tool and mechanism for economic incentives on Torus, enabling agents to compose and delegate portions of their incoming emission streams (token flows) to other agents with flexible control. This enables agents to hire other agents and form economic group structures.

Stream-Based Emission Model

The emission system preserves stream identity through delegation chains via unique StreamId identifiers. Each stream represents a distinct emission source (staking returns, delegation fees), enabling complete traceability of token flow from source to final recipients.

Allocation Mechanisms

Emission permissions support two distinct allocation paradigms:

Stream Allocations (Percentage-Based)

Stream allocations enable agents to delegate specific percentages of incoming emissions from particular streams.

Stream Allocation Characteristics:

  • Granular Control: Different streams can have different delegation percentages (0-100%)
  • Safety Constraints: Total allocated percentage per stream cannot exceed 100%
  • Dynamic Processing: Emissions are intercepted and redirected during distribution
  • Recursive Support: Delegated streams maintain their identity through recursive delegation chains

Fixed Amount Allocations

Fixed amount allocations reserve specific token quantities from the delegator’s account at permission creation:

FixedAmount(1000) // Reserve 1000 TORUS

Fixed Amount Characteristics:

  • Upfront Reservation: Tokens are reserved using the Currency trait’s reserve mechanism
  • One-time Distribution: Can only be executed once (manually or at a specific block)
  • Distribution Constraints: Limited to Manual or AtBlock distribution controls
  • Safety Guarantee: Uses the reserve/unreserve pattern to prevent double-spending

Distribution Control Mechanisms

The system provides four distribution control patterns that determine when and how delegated tokens are transferred:

pub enum DistributionControl {
Manual, // Recipient triggers distribution
Automatic(Balance), // Auto-trigger at threshold
AtBlock(BlockNumber), // Execute at specific block
Interval(BlockNumber), // Execute every N blocks
}

Manual Distribution requires explicit execution by the recipient:

DistributionControl::Manual
  • Recipient Control: Recipient determines when to claim accumulated tokens
  • Flexibility: Allows strategic timing of token distribution
  • Gas Efficiency: Batches multiple accumulations into single distribution

Emission Accumulation Process

The accumulation mechanism efficiently processes emissions through a multi-stage pipeline:

  1. Interception: When agents receive emissions, the system checks for active permissions
  2. Stream Matching: Permissions are filtered by stream ID and allocation type
  3. Percentage Extraction: For stream allocations, the specified percentage is extracted
  4. Storage: Accumulated amounts are stored with agent-stream-permission indexing
  5. Distribution Triggers: Various conditions trigger automatic distribution