# <center><i class="fa fa-edit"></i> 3.3 Applications of Bitcoin Scripts </center>
###### tags: `Blockchain`
The following notes are taken from [Coursera](https://www.coursera.org/learn/cryptocurrency/home/week/2)
---
### 1. Escrow Transactions
:::danger
**Problem:**
- A wants to buy online from B
- A doesn't want to pay until B ships
- B doesn't want to ship until A pays
:::
:::success
**Solution:**
- `MULTISIG`: Pay `x`to 2-of-3 of A, B, J (Judge to decide who is honest of necessary)
- Any 2 can specify where coins can go
- Extra transaction in blockchain
:::
### 2. Green Address
- Not really used due to previous history of double-spending in exectuion
:::danger
**Problem:**
- A wants to pay B
- B can't wait 6 verifications to guard against double-spends or is offline
:::
:::success
**Solution:**
- Pay `x` to B, `y` to Bank -> no double-spend
- `SIGNED(Bank)`
:::
### 3. Efficient Micro-Payments
:::danger
**Problem:**
- A wants to pay B for each minute of phone service
- A doesn't want to incur transaction fees per minute
:::
:::success
**Solution:**

:::
What if B never signs last payment? Use Lock-Time
### `Lock_Time`
- Specify any value other than 0
- Tells miners don't publish transaction until this time or specific block number


### More Advanced Scripts
- Multiplayer lotteries
- Hash pre-image challenges
- Coin-swapping protocols