Broadcast Lifecycle
This documentation provides a high-level overview of how the protocol works. While the core concepts and flows are accurate, certain implementation details and design choices may evolve over time as the system matures. Please treat this as a conceptual guide rather than a source of exact specifications.
Constructing and broadcasting a Token Transaction takes three steps for transfers and two steps for minting. For a full breakdown of the communication flow, refer to the Swimlane Diagram.
Step 1: StartTokenTransaction()
StartTokenTransaction is the first step where an issuer (via a wallet) signals to a group of Spark Operators its intent to Mint or Transfer funds. This step is non-binding—no funds are moved yet. Instead, it sets the stage for the Issuer and Spark Operators to agree on a Final Token Transaction by determining key transaction parameters, including revocation keys.
At this stage, a Sender or Issuer constructs a Partial Token Transaction, specifying the outputs they intend to spend and the public keys of the intended recipients. To prove authorization, they sign this partial transaction for each output they wish to spend, allowing the Spark Entity to verify their permission to proceed.
Sample Partial Token Transaction
Upon receiving the request, the Spark Operators validates and process the transaction. After validating, the Spark Operator fills empty fields in the Partial Token Transaction to create the Final Token Transaction, which includes additional parameters for each output:
Key Parameters
- Output ID: A shared reference that allows both the Wallet and Spark Operator to track the TTXO created by this operation.
- Revocation Commitment: An immutable public key corresponding to a unique shared secret owned collectively by the Spark Oper3ators. Enables secure spending of outputs in transfer transactions.
- Withdrawal Bond & Withdrawal Locktime: Immutable parameters that define the conditions for a valid unilateral exit transaction of this output to Bitcoin L1.
Step 2: SignTokenTransaction()
Next, the wallet uses the FinalTokenTransaction from the previous step and retrieves a unique signature from each SO.
Each Spark Operator validates the request and, if valid, responds with the revocation keyshares for each spent TTXO. Additionally, the SO signs the transaction and sends this signature to an LRC-20 node, which propagates it across the LRC-20 Gossip Network.
Once a threshold of SOs have signed and responded, the issuer can now derive the Revocation Key.
Step 3: FinalizeTokenTransaction()
The final step is for the issuer to send the Revocation Key it derived to each Spark Operator involved in the transaction. (For Mint operations, this step is unnecessary since mint inputs are not tied to a Revocation Key.)
At this point, the input outputs are officially revoked once the SOs communicate this update to their watchtowers. This make sure that the receiver of the funds can be confident that the sender cannot later attempt to double-spend the revoked outputs by broadcasting an outdated transaction on-chain.