Withdrawals to L1
Learn about the process of withdrawing LRC-20 tokens from Spark to Bitcoin L1
This feature is currently under development and will be available in a future release of Spark.
TLDR
- Users can withdraw their tokens to L1 Bitcoin at any time - Withdrawals follow Spark’s unilateral exit mechanism - Token metadata is preserved during the withdrawal process
Unilateral Exit
When a receiver wants to withdraw their funds to L1 they must create a Bitcoin transaction with the TTXO they want to withdraw and an L1 UTXO as an input to cover newtork fees and the required withdrawalBond in Sats. All output addresses must be P2TR with following conditions:
- Can be spent instantly either by using revocation secret (as key-spend path) or
- With receiver signature after timelockForSpendingOfWithdrawedFunds timelock (as script-spend path).
What prevents a Wallet from Broadcasting a Transaction with a Different Revocation Commitment, Script, or Bond?
This is a valid concern. Any TTXO Owner could broadcast an L1 transaction with unexpected parameters that the Bitcoin Network would consider valid and include in a block.
However, this is where the LRC-20 Node network comes into play. While this document doesn’t go deep into the LRC-20 network, LRC-20 nodes are essential for providing final confirmation of the current state of token holdings on both the Spark Network and on Bitcoin L1.
If a modified / unexpected transaction were to be broadcast (with different withdrawal bond, revocation public key, script, etc), it would still be confirmed on-chain but the LRC-20 nodes would recognize that the transaction does not meet the required criteria and would mark this transaction as ‘invalid’ and not consider the funds moved.
Any LRC-20-enabled L1 wallet can communicate with a trusted LRC-20 node in order to distinguish valid LRC-20 exit transactions from invalid transactions.