Understanding Cooperative Exits
Exiting Bitcoin to L1 involves a cooperative exit. This requires coordination between your wallet and the SSP to process your withdrawal efficiently. It’s the preferred method because:- Lower fees than unilateral exits
- It’s faster (no timelocks)
Initiating the Withdraw
The minimum amount to withdraw is 10,000 sats
Fee Considerations
- Network fees are required for the Bitcoin transaction.
- By default (
deductFeeFromWithdrawalAmount = true
), fees are deducted fromamountSats
. When set tofalse
, fees are deducted from remaining wallet balance. - The total cost can include:
- Bitcoin network fee
- Spark service fee (if applicable, charged by the SSP)
- Example: If
amountSats
is 10,000 sats, Bitcoin fees are 2,000 sats, and SSP fees are 1,000 sats, you’ll receive 7,000 sats at your L1 address (with default fee deduction).
Performance Note
- For latency reasons, the SDK does not automatically fetch a fee quote during
withdraw
when one is not provided. Pre-fetch the quote withgetWithdrawalFeeQuote
and pass it towithdraw
.
Best Practices
- Verify the withdrawal address before confirming
- Keep track of your exit transaction ID
- Wait for sufficient confirmations
Common Issues
- Network congestion delays
- Address format issues
- Insufficient balance for fees
Need Help?
- Check our FAQ
- Review the API Reference
- Follow our Testing Guide