Exploring Taproot Assets in Ark

Exploring Taproot Assets in Ark

As Bitcoin infrastructure matures, so do the ways developers explore asset representation on-chain. Taproot Assets offer a compact and Bitcoin-native format for token issuance, built atop Taproot and Merkle-Sum Sparse Merkle Trees (MS-SMT). In this post, we experiment with integrating Taproot Assets into Ark’s offchain batching layer. Specifically, we introduce tVTXOs—virtual outputs that embed Taproot Asset commitments—alongside standard Ark transaction flows.

What’s a Colored Tree?

In Ark, batches are organized as offchain transaction trees anchored by a single onchain output. When asset commitments are introduced, such as those used by Taproot Assets, certain outputs within this tree carry additional proof data. We refer to any transaction that produces these outputs as a colored transaction, and any tree that includes one or more colored transactions as a Colored Tree. The presence of asset commitments does not alter the underlying batch mechanics. Coloring simply extends this model by attaching deterministic asset proofs alongside standard virtual transaction outputs.

This allows Ark to process both asset-bearing and non-asset-bearing flows within the same offchain structure, without changing the batch construction process or compromising exit guarantees.

tVTXOs and Transfer Proofs

A tVTXO behaves like any other VTXO, spendable in Ark’s offchain layer, pre-signable for unilateral exit, but includes two key additions:

Asset Commitments are embedded in the PkScript using Taproot’s internal key and TapTree structure.

Transfer Proof Files, a deterministic chain of cryptographic witnesses, trace the asset’s inclusion path through the offchain tree. These proofs can be activated with onchain metadata, enabling exit into the Taproot Asset ecosystem.

Transaction Batching of Taproot Assets

The construction of a Batch Colored Tree extends the standard offchain Tree construction process by recursively computing Asset Commitments and assembling Asset Transfer Proofs at each colored virtual branch transaction, beginning from the root transaction of the offchain tree. For each colored transaction, the Transfer Proofs and Asset Commitments corresponding to its colored outputs are deterministically derived from the outputs of the parent transaction that spends into the transaction’s inputs.

Unilateral Exit 

At creation, Transfer Proofs are Inactive, as they lack the necessary onchain metadata, specifically, the BlockHeader,BlockHash, BlockHeight, and TransactionIndex;  required for validation by a tapd node. To enable a unilateral exit, the proofs must be activated by augmenting them with metadata extracted from the confirmed Bitcoin transaction, thereby binding the proofs to an immutable onchain state. The activation process for Inactive Transfer Proofs proceeds as follows:

  1. Fetch broadcasted onchain transaction metadata: For each Transfer Proof contained within the tVTXO Transfer Proof file, retrieve the associated Bitcoin transaction metadata from the bitcoin network.
  2. Augment the Transfer Proof with onchain metadata: Embed the retrieved transaction metadata into the corresponding Inactive Transfer Proof. This augmentation finalizes the proof, producing a complete and valid Active Transfer Proof.

Finally, the Active Transfer Proof file can be imported into Tapd to update the user's token balance and to further spend the token onchain.

Proof-of-Concept Architecture

This PoC comprises:

  • A CLI tool for constructing colored Ark batches
  • Integration with tapd for issuing and resolving tokens
  • Dockerized test environment (Regtest, Signet)

The setup involves three parties: an Ark Server (Operator), an Onboarding User (sender), and an Exiting User (recipient). Batches embed token-bearing branches, outputting both BTC VTXOs and tVTXOs.

In this PoC, the constructed Ark Batch above has:

  • An input of 100,000 sats and 40 tokens,
  • A 1-level colored offchain tree structure,
  • Two outputs per virtual transaction, where outputs are split equally from the unroll to the ark transactions.
  • 10,000 sats fee per transaction 

As a result, the batch produces four VTXOs:

  • Two VTXOs of 29,500 sats each,
  • Two tVTXOs of 20 tokens each.

Demo Flow Overview

The sequence diagram below outlines the key steps demonstrated in the demo video, from token onboarding, batch creation, to unilateral exit.This provides a structured view of the interactions between the Onboarding User, Exiting User, Ark Operator and the Bitcoin network.

%%{ init: { 'themeVariables': { 'actorBorder': '#FC8D4E', 'actorBkg': '#2a2a2a', 'actorTextColor': '#fff', 'sequenceLifelineColor': '#fff' } } }%%

sequenceDiagram
  participant Onboarding User
  participant Exit User
  participant Ark Operator
  participant Bitcoin 
   
  %% Phase 1: Token Minting
  rect rgb(230, 250, 230)
  note over Onboarding User: Phase 1 - Mint Token
  Onboarding User->>Onboarding User: Create Mint Txn For 100k Token 
  Onboarding User->>Bitcoin: Publish Mint Txn
  end
  
  %% Phase 2: Onboarding into Ark
  rect rgb(240, 240, 255)
      note over Onboarding User: Phase 2 - Onboarding BTC and Tokens
      Onboarding User->>Ark Operator: Fetch Boarding Addresses (BTC, Token)
      Ark Operator -->>Ark Operator: Construct Boarding Addresses (BTC, Token)
      Ark Operator -->>Onboarding User: Return Boarding (BTC, Token)
      Onboarding User->>Bitcoin: Onboard 100K Sats and 40 tokens 
      Onboarding User->>Ark Operator: Send Onboarded Token Transfer Proof
  end
  
  %% Phase 3: Batch Construction
   rect rgb(255, 240, 240)
      note over Ark Operator,Exit User: Phase 3 - Batch Construction
      Ark Operator ->>Ark Operator: Construct Batch Commitment Txn <br>[100k Sats, 40 token]
      Ark Operator ->> Onboarding User: Get Inputs Signature <br> [100k sats , 40 tokens]
      Onboarding User-->>Ark Operator: Return Input Signatures
      Ark Operator ->>Ark Operator: Construct Batch Tree <br> [100k Sats, 40 token]
      Ark Operator ->> Exit User: Fetch Tree Signatures
      Exit User -->> Ark Operator: Return Tree Signatures 
      Ark Operator ->> Bitcoin: Publish Batch Commitment Txn
  end
  
  %% Phase 3: Unilateral Exit
     rect rgb(230, 230, 255)
        note over Exit User: Phase 4 - Unilateral Exit 
        Exit User -->> Bitcoin: Publish Batch Unroll Transactions  
        Exit User ->> Bitcoin: Fetch Transfer Proofs Anchor Txn Metadata
        Bitcoin -->>Exit User: Return Transfer Proofs Anchor Txn Metadata
       Exit User -->> Exit User:  Update and Upload Token Transfer Proof File
     end

Why This Matters

What this PoC shows is that Taproot Assets can ride the same rails as BTC inside Ark, without forking, bridging, or breaking consensus rules. By incorporating Taproot Asset proofs into Ark’s offchain transaction lifecycle, we unlock atomic, low-latency BTC ↔ token swaps.

Next Steps

Future improvements could include:

  • Streaming proof activation using Taproot Asset Universes
  • Simplified transfer proof validation for unilateral exits
  • Integration into Arkd for token logic

The full codebase and demo are available on GitHub.