Skip to main content

Transaction Lifecycle

This section provides a technical breakdown of the end-to-end data flow for a VelumX-sponsored transaction, from initial client-side intent to on-chain finality.

Data Flow Overview

The lifecycle of a VelumX transaction is a secure multi-hop process designed to protect sensitive credentials while ensuring high-throughput sponsorship.

Detailed Phases

1. Intent Construction & Signing

The user initiates an interaction via the SDK. The SDK constructs a Stacks transaction with the sponsored flag set to true. Crucially, at this stage, the transaction is partially signed: the user authorizes the logic and the fee transfer but does not commit STX for the gas.

2. The Secure Proxy Handshake

To prevent the exposure of the VELUMX_API_KEY in client-side bundles, the SDK communicates with a developer-managed Secure Proxy. This proxy validates the request context and injects the API credentials before forwarding the payload to the Relayer Network.

3. Relayer Validation & Sponsorship

The VelumX Relayer performs a multi-point validation check:
  • Authentication: Verifies the developer’s API key and project status.
  • Economic Integrity: Inspects the transaction to ensure the included fee covers the estimated STX gas plus protocol markup.
  • Liquidity Check: Ensures the user has sufficient SIP-010 tokens to settle the fee.
If successful, the Relayer appends its Sponsorship Signature and calculates the optimal STX fee for prioritization.

4. Broadcast & Finality

The unified transaction—containing both the User and Sponsor signatures—is broadcast to the Stacks network. Once the transaction is included in a block, the network atomically settles the SIP-010 fee to the Relayer and executes the user’s primary business logic.