# Agenda for Socratic Seminar 7
###### tags: `BitDevs Agenda`
[Discussion topics](https://bitdevs.tw/2022-09-26-socratic-seminar-7) | [Meetup event](https://www.meetup.com/taiwan-bitdevs/events/288662252/)
## 東東
* **Self Introductions**
* Name, background.
* Thoughts on Bitcoin? / What topics interest you?
* **Introduction to BitDevs, history and house rules**
* Started in New York.
* Learn from one another. Ask questions and share experiences. "Socratic"
* https://en.wikipedia.org/wiki/Socratic_method
* "I know that I know nothing." -- 蘇格拉底
* No shilling coins, no talk on trading and profits.
* Learn more: https://bitdevs.org/cities
* **Why Bitcoin is important (to Bitcoiners)**
* Human rights: https://www.youtube.com/watch?v=KG0Q05Lnm7s
```sequence
Dan->Calson: Hey Calson, I'm in the US right now.\nCould you handle the socratic?
Note right of Calson: Calson realized he will be in the US too.
Calson->Louis: Get the space ready for the socratic.
Calson->Evan: You're gonna handle the socratic.
Calson->Koji: You're gonna handle the socratic.
Louis->Louis: Hmm...
Evan->Evan: Hmm...
Koji->Koji: Hmm...
Louis->Calson: Okay.
Evan->Calson: Okay.
Koji->Calson: Okay.
Calson->Dan: Louis, Evan, Koji have got this.
```
## Discussion Topics
#### `bdk_core` Coin Selection Library
* How are Bitcoin transactions structured?
* For every tx, we 冶煉 our old coins.
* UTXO model v.s. Account model.
* https://bitcoin.stackexchange.com/questions/49853/utxo-model-vs-account-balance-model
* Blocks have limited space (weight). Miners earn fees. Miners include transactions that have the greatest fee-to-weight ratio.
* HD wallets/keys
* https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki
* How to break heuristics?
* Address reuse
* Decimal places
* Script type
* Unnecessary input
* Equal-output coin join
* How to reduce waste?
* Branch and bound + Knapsack problem: https://en.wikipedia.org/wiki/Knapsack_problem
#### Fedimint Shenanigans
Let's start with basics...
**Blind signatures:**
* Bob is the signer.
* Alice is some random that wants something signed.
```sequence
Note left of Alice: M . r -> M'
Alice->Bob: M' (blinded message)
Note right of Bob: M' . b -> σ'
Bob->Alice: σ' (blinded signature)
Note left of Alice: σ' . r' -> σ
```
**Fedimint Peg-In:**
* User generates an array of nonces (`N`). The number of nonces correspond to the number of ecash tokens the user wants to have issued. (In reality, these nonces are actually public keys. The private keys associated with these "nonces", we will denominate with `n`).
```sequence
Note left of User: N . r -> N'\n(for each nonce)
User -> Mint: proof of deposit + [N'] (blinded nonces)
Note right of Mint: N' . b -> σ' \n(for each blinded nonce)
Mint -> User: [σ'] (blinded signatures)
Note left of User: σ' . r' -> σ\n(for each blinded signature)
```
* Hence, an e-cash token is `(N, σ)`, and we require `n` to "spend" the ecash token.
#### DriveChains
* Fundamentals: https://bitcoinops.org/en/topics/sighash_anyprevout/
* The proposal with APO: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-September/020919.html
#### Lightning
* Fundamentals: https://www.derpturkey.com/revocable-transactions-with-ln-penalty/