Address Structure
Each deposit address is a BIP-341 Taproot output with:- Key path: 2-of-2 MuSig2 aggregate of user + platform public keys
- Leaf U (user recovery): user single-sig, timelocked (default ~30 days)
- Leaf P (platform recovery): platform single-sig, timelocked (default ~60 days)
User Self-Recovery (Leaf U)
The user can recover funds without any platform cooperation after the CSV timelock expires. Default timelock: 4320 blocks (approximately 30 days) Eligibility: The CSV countdown begins when the deposit UTXO is confirmed on-chain, not when the deposit was initiated. Each deposit UTXO has its own independent countdown.Check eligibility
Review your deposit UTXOs, their confirmation heights, and whether each UTXO has passed the CSV threshold. The confirmations field reflects actual on-chain confirmations.
Build the recovery spend plan
Construct a transaction spending the eligible UTXO(s) to a destination address controlled by the user. The transaction must set
nSequence on each input to the CSV value (4320 by default) to satisfy the timelock.Compute the sighash
Calculate the BIP-341 script-path sighash for Leaf U. This is a standard Taproot script-path spend, not a MuSig2 aggregation.
Sign with the user's private key
Produce a plain BIP-340 Schnorr signature over the sighash. No nonce exchange or partial-signature protocol is required.
Assemble the witness
The witness stack for a Taproot script-path spend is:
signature— the BIP-340 Schnorr signatureleaf_script— the serialized Leaf U scriptcontrol_block— the Taproot control block proving Leaf U is committed in the Taproot tree
Platform Recovery (Leaf P)
The platform can recover funds from dormant accounts after a longer CSV timelock expires. Default timelock: 8640 blocks (approximately 60 days) This path is intended for accounts where the user has stopped interacting and funds would otherwise remain locked indefinitely.- An administrator initiates recovery through the platform.
- The platform signs the transaction using Leaf P’s script path and broadcasts it.
- Recovered funds are returned to the platform treasury or forwarded according to the configured recovery policy.
Important Notes
- Normal operations do not use recovery. The MuSig2 key-path is the default spending mechanism. It is cheaper (smaller witness), faster (no timelock wait), and private (looks like a single-sig Taproot spend).
- Recovery is non-custodial for Leaf U. The user does not need the platform’s key, cooperation, or any interaction beyond the eligibility check.
- Timelock values are fixed at address creation. The CSV block counts are embedded in the Taproot leaf scripts when the deposit address is generated. They cannot be changed after the fact.
- Recovery does not affect LP positions. LP shares are tracked separately from deposit UTXOs. Recovering a deposit UTXO does not automatically withdraw any associated liquidity position.