# Minting/Redemption

### ➕ **BTC Deposit a.k.a. Minting**

1. **A user registers** their Ethereum address in the UserActivator smart contract via an on-chain transaction.
2. A unique Bitcoin **Taproot deposit address** is generated using the validators' joint public key + user’s ETH address. The generated address can be double-checked by the user in the UserActivator smart contract.
3. The user sends BTC to this deposit address.
4. Validators detect the BTC deposit, based on Bitcoin on-chain data independently from each other, approve the minting operation, and construct a **minting message** containing:
   * Incoming Bitcoin transaction hash
   * Transaction output index
   * Amount
   * Users Ethereum address
5. Validators sign the message using FROST and send it to the user.
6. The user submits the message + signature to the `strBTC` smart contract.
7. Contract verifies the signature and **mints an `strBTC` token** to the user's wallet.

📌 All Bitcoin transaction details (transaction hash + output) are marked as “used” to prevent double minting.

***

### ➖ **Redemption a.k.a. BTC Withdrawal**

1. A user burns `strBTC`, specifying their Bitcoin payout address. The validity of a Bitcoin address is checked in the `strBTC` Smart Contract during a burning transaction.
2. The burn transaction is recorded with a **unique redemption ID**.
3. Validators detect the burn, independently of each other, validate the transaction, and prepare a BTC payout transaction.
4. The redemption ID is inserted in the Bitcoin transaction sequence number to prevent duplicate payouts for the same redemption.
5. A FROST signature is produced and used to sign the Bitcoin transaction.
6. All validators post the resulting payout transaction to the Bitcoin network.
