The transaction lifecycle in TAC represents the complete journey of a cross-chain operation from initial user action to final confirmation. Understanding this lifecycle helps developers build better applications, implement proper status tracking, and troubleshoot issues effectively.

Lifecycle Overview

Every cross-chain transaction follows a predictable path through multiple validation and execution stages across different blockchain networks and consensus systems.

Complete transaction lifecycle showing all stages from initiation to completion

The lifecycle involves three main phases: Initiation (user action), Processing (validation and consensus), and Execution (target chain operations). Each phase includes multiple stages that ensure security and reliability.

Stage Progression

Cross-chain transactions progress through specific stages that can be monitored and tracked for status updates.

TON-Side Stages

User Initiation

User connects their TON wallet and approves a transaction in a hybrid dApp. The TAC SDK formats the request and prepares assets for cross-chain transfer.

Asset Locking

User’s tokens are locked in the TON Adapter contracts, creating the foundation for cross-chain asset representation on the target chain.

Message Creation

A structured cross-chain message is created containing all operation details, target information, and asset specifications.

Event Emission

The TON transaction completes and emits events that sequencers monitor for cross-chain processing.

Sequencer Processing Stages

The sequencer network handles message validation and consensus formation:

EVM Execution Stages

Return Path Stages (If Applicable)

For operations that send results back to TON:

Operation Types

Different transaction patterns result in different lifecycle flows, each with distinct characteristics and completion criteria.

  • One-Way Operations: Transactions that move assets or data from TON to TAC EVM without requiring a return path.
  • Examples: Simple token deposits, contract calls that store results on EVM, or operations where users only need confirmation.
  • Completion: These operations complete at the EXECUTED_IN_TAC stage, making them faster than round-trip operations.
  • Use Cases: Token bridging for holding, deposits into EVM protocols, or data submissions that don’t require responses.

Timing and Performance

Understanding transaction timing helps developers set appropriate user expectations and design responsive interfaces.

Typical Timeframes

Fast Operations

TON_TAC Operations: 3-5 minutes Simple one-way operations complete relatively quickly since they don’t require a return path through the consensus system.

Complete Operations

TON_TAC_TON Operations: 6-12 minutes Round-trip operations take longer due to the additional consensus and execution cycles required for the return path.

Factors Affecting Speed

  • Epoch Duration: The length of sequencer processing windows directly affects how quickly transactions progress through consensus stages.

  • Network Participation: Higher sequencer participation generally leads to faster consensus formation and execution.

  • Target Chain Congestion: Busy periods on either TON or TAC EVM can slow execution stages.

  • Operation Complexity: Simple operations process faster than complex multi-token or multi-contract interactions.

Status Tracking

Applications can monitor transaction progress through various tracking mechanisms that provide different levels of detail.

Simplified Status Tracking

For user-facing interfaces, simplified status provides clear, understandable progress information:

const tracker = new OperationTracker(Network.TESTNET);
const status = await tracker.getSimplifiedOperationStatus(transactionLinker);

switch (status) {
  case "PENDING":
    // Transaction is progressing through stages
    break;
  case "SUCCESSFUL":
    // Operation completed successfully
    break;
  case "FAILED":
    // Operation failed and assets were rolled back
    break;
  case "OPERATION_ID_NOT_FOUND":
    // Transaction not yet detected by sequencers
    break;
}

Detailed Stage Tracking

For debugging or advanced interfaces, detailed tracking shows exact stage progression:

const operationId = await tracker.getOperationId(transactionLinker);
const detailedStatus = await tracker.getOperationStatus(operationId);

console.log(`Current stage: ${detailedStatus.stage}`);
console.log(`Success status: ${detailedStatus.success}`);
console.log(`Stage timestamp: ${new Date(detailedStatus.timestamp * 1000)}`);

Performance Profiling

Advanced tracking provides timing information for each stage:

const stageProfile = await tracker.getStageProfiling(operationId);

// Shows timing for each completed stage
Object.keys(stageProfile).forEach((stageName) => {
  if (stageName === "operationType") return;

  const stage = stageProfile[stageName];
  if (stage.exists) {
    console.log(`${stageName}: ${stage.stageData.timestamp}`);
  }
});

Error Handling Throughout the Lifecycle

The transaction lifecycle includes comprehensive error handling at every stage to protect user assets and provide clear feedback.

Pre-Execution Validation

Execution-Time Errors

  • EVM Execution Failures: If target contract calls fail on TAC EVM, the system automatically initiates rollback procedures.

  • Timeout Handling: Operations that don’t complete within expected timeframes trigger timeout procedures.

  • Network Issues: Temporary network problems are handled through retry mechanisms and status preservation.

Comprehensive Rollback System

When transactions fail after assets have been transferred, TAC automatically protects user funds through secure rollback mechanisms with the same security guarantees as successful transactions.

Rollback Merkle Tree Creation

When execution failures occur on TAC EVM Layer, the system immediately implements a sophisticated recovery process:

Automatic Asset Recovery

Upon finalization of rollback consensus, the recovery process provides comprehensive user protection:

Safe Return Mechanisms:

  • Locked assets on TON blockchain automatically released to original owners
  • No manual intervention required from users or developers
  • Asset amounts precisely match original transaction parameters
  • Recovery transactions include original transaction references for auditability

Rollback as Core UX Guarantee:

  • Users always have clear outcome: successful execution OR safe asset return
  • Eliminates fund loss risk from transaction failures
  • Maintains user confidence in cross-chain interactions
  • Transparent failure communication with detailed error reporting

Monitoring and Debugging

Real-Time Monitoring

Applications can implement real-time monitoring to provide users with live updates:

async function monitorTransaction(transactionLinker) {
  const tracker = new OperationTracker(Network.TESTNET);

  // Poll for operation ID
  let operationId = null;
  while (!operationId) {
    operationId = await tracker.getOperationId(transactionLinker);
    if (!operationId) {
      await new Promise((resolve) => setTimeout(resolve, 5000));
    }
  }

  // Monitor until completion
  let completed = false;
  while (!completed) {
    const status = await tracker.getOperationStatus(operationId);

    // Update UI with current status
    updateUserInterface(status);

    // Check for completion
    if (status.stage === "EXECUTED_IN_TON" || !status.success) {
      completed = true;
    } else {
      await new Promise((resolve) => setTimeout(resolve, 10000));
    }
  }
}

Debugging Failed Transactions

  • Status Analysis: Detailed status information helps identify where transactions failed and why.

  • Stage Timing: Performance profiling can reveal if transactions are stuck at particular stages.

  • Error Messages: When available, error messages provide specific information about failure causes.

  • Asset Tracking: Applications can verify that rollback procedures properly returned user assets.

Best Practices for Developers

User Experience Design

  • Clear Expectations: Inform users that cross-chain operations take several minutes to complete.
  • Progress Indicators: Show users which stage their transaction is currently in using progress bars or step indicators.
  • Time Estimates: Provide realistic time estimates based on current network conditions and operation type.

Integration Patterns

  • Status Webhooks: For applications that need server-side monitoring, implement webhook endpoints for status updates.

  • Background Processing: Handle long-running transaction monitoring in background processes rather than blocking user interfaces.

  • Retry Logic: Implement appropriate retry logic for temporary network issues while avoiding excessive API usage.

What’s Next?

Understanding the complete transaction lifecycle prepares you to explore the specific validation mechanisms that ensure security throughout the process.