Legal

Technical-Legal Memo – Bitcoin Key Backup via Miniscript (Liana)
Date: 23. April 2025
Author: Tobias Grünenfelder, ResKey
​
1.Introduction and Objective
This memo outlines the planned operation of a Bitcoin key backup service using Miniscript via the open-source software Liana. The goal is to describe the technical structure of the wallet setup and demonstrate why this setup does not fall under the definition of "custody of digital assets" according to Swiss financial market law – particularly under Article 2, Paragraph 3 of the Anti-Money Laundering Act (GwG) and FINMA interpretation.
​
2.Overview of the Wallet Setup
The wallet is based on a multi-stage, time-dependent control model using Miniscript (via Liana). It is a deterministic script that allows different spending paths depending on the block height:
Phase 1 – 2-of-2 Multisig (initial phase): Both keys (client + service) must sign. The service provider can never act alone. This protects against unauthorized or fraudulent transactions.
Phase 2 – 1-of-1 Single-Sig (after timeout): After a certain number of blocks without client activity, sole control shifts to the client. The service loses all signing capabilities.
Phase 3 – Emergency fallback (1-of-2 access by the service): Only if the client remains inactive for an extended period does the service gain optional access to act on behalf of the client. Spending still requires a signature from the service provider.
Optional: At the client's request, the spending policy can be modified to include a client-owned backup key (e.g., stored in a bank vault). This results in a 2-of-3 multisig setup, in which the service provider can never act alone.
​
3.Technical Safeguards (Miniscript, Liana)
Use of timelocked spending paths via OP_CHECKSEQUENCEVERIFY. The service provider has no access to client funds before the technical condition is met. The setup is verifiable by third parties via publicly visible ScriptPubKeys. The software (Liana) is fully open source and auditable.
​
4.Regulatory Assessment
According to FINMA guidelines, custody is deemed to exist if:
-
There is effective control over client assets.
-
Transactions can be executed on behalf of clients.
-
There is technical or economic access to the assets.
In the described model, none of these apply in Phase 1 and 2, as the service provider has no sole control. In Phase 3, access only becomes possible due to long-term client inactivity. The service is therefore to be understood as a backup and security function, not as custody.
​
5.Summary
The described model does not constitute traditional custody but a technically limited, delayed backup function. It complies with FINMA interpretations – in particular, because there is no immediate or sole authority over client funds.