Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
writer authored and writer committed Oct 15, 2024
1 parent c5bc3a6 commit fc59a65
Show file tree
Hide file tree
Showing 34 changed files with 811 additions and 98 deletions.
1 change: 0 additions & 1 deletion .github/.gitkeep

This file was deleted.

101 changes: 12 additions & 89 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,92 +1,15 @@
# notes and resources on protocol economy


<br>



### 👉 start with [how blockchain works](blockchains)


<br>

---

## 🕹 game theory

<br>

* [columbia cryptoeconomics workshop 2022](https://www.youtube.com/playlist?list=PLpktWkixc1gUqkyc1-iE6TT0RWQTBJELe)

* [standford class on game theory](https://www.coursera.org/learn/game-theory-1#syllabus) and [advanced course](https://www.coursera.org/learn/game-theory-2)

* [finding pure strategy nash equilibrium in finite simultaneous games](https://www.youtube.com/watch?v=gINERi_wbbg)

* [censorship resistance in on-chain auctions, pai et al.](https://github.com/eljhfx/Decentralized-Auctions/blob/main/Censorship_Resistance_in_On-Chain_Auctions.pdf)
- single proposer blockchains are not ideal for holding time sensitive auctions when the number of potential bidders is large. collusion arrangements are extremely profitable for the colluding bidder but only marginally profitable for the proposer. order agnostics mechanism should solve mev.

<br>


-----

## 🛵 protocol design

<br>

### proposer-builder separation

* [notes on pbs, by barnabe.eth](https://barnabe.substack.com/p/pbs)
- thoughts on in-protocol pbs, market structure and allocation mechanism, whole vs. partial block building, block vs. slot auctions, inclusion lists, capturing true pbs value via consensus bid and protocol capture.

* [decentralizing the builder role, by j. charbonneau](https://joncharbonneau.substack.com/p/decentralizing-the-builder-role)

* [exploring cryptokitties midwives](https://medium.com/block-science/exploring-cryptokitties-part-2-the-cryptomidwives-a0df37eb35a6)
- `giveBirth()` as an example of flawed economic incentive and randomization.

* [bookmark list for consensus researchers, by a. obadia](https://collective.flashbots.net/t/bookmarks-relevant-for-consensus-researchers/1204)
- nice list from flashbots on canonical papers on consensus


<br>

### eip-1559

* [transaction fee mechanism design for ethereum, by tim roughgarden](https://timroughgarden.org/papers/eip1559.pdf)
- thoughts on how eip-1559 proposes a major change to ethereum's transaction fee mechanism, the market for ethereum transactions, incentive-compatible transaction fee mechanisms, and alternative designs.

* [congestion control and eip1559, by barnabe.eth](https://barnabe.substack.com/p/congestion-control-and-eip1559)
* [understanding fees in eip-1559](https://barnabe.substack.com/p/understanding-fees-in-eip1559)
* [mev and eip1559](https://github.com/MEV-WAIFU-LABS/mev/blob/main/MEV_on_Ethereum/eip-1559.md)
## ⛓🧱 decentralized protocols

<br>

### mev-smoothing

* [burning mev through block proposer auctions, by domothy](https://ethresear.ch/t/burning-mev-through-block-proposer-auctions/14029)


<br>

### algorithmic game theory

* [algorithmic game theory, by tim roughgarden](https://theory.stanford.edu/~tim/papers/cacm.pdf)


<br>

### inclusion lists

* [inclusion list economics](https://efdn.notion.site/Inclusion-list-economics-b0d61d0e21a74963a54448e48d9adc8a)


<br>

------

## 👾 models

<br>

* [CADlabs's ethereum economic model](https://github.com/CADLabs/ethereum-economic-model)

* **[how blockchains work](blockchains)**
* **[game theory](game_theory)**
* **[scalability](scalability)**
* **[rollups](rollups)**
* **[consensus](consensus_protocols)**
* **[data availability](data_availability)**
* **[optimization methods](optimization)**
* **[applied cryptography](cryptography)**
* **[yul and formal verification](yul)**
* **[economic models](economic_models)**
* **[auction mechanisms](auction_mechanisms)**
5 changes: 5 additions & 0 deletions auction_mechanisms/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## auction mechanisms

<br>

* **[auction-zoo, from a16z](https://github.com/a16z/auction-zoo)**
45 changes: 37 additions & 8 deletions blockchains/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,42 @@
## 🧱⛓ how blockchain works
## 🧱⛓ intros to blockchain

<br>


### tl; dr

<br>
* **blockchains have the following core functions** (although modular blockchains specialize in one or two):
* execution: transaction execution and state update.
* settlement: finality and dispute resolution.
* consensus: agreement on transaction ordering.
* data availability: prove data was published to the network.

* **in a blockchain, each block consists of two pieces**:
* a block header: metadata for the block, which consists of some basic information about the block, including the Merkle root of txs.
* the transaction data: making up the majority of the block, and consisting of actual transactions.

* **in general, a blockchain has two types of nodes**:
* full nodes (fully validating nodes): they download and check that every tx in the blockchain is valid, and require lots of resources.
* light clients: they don't download or validate any tx, but instead thye only download the block header and assume that the block only contains valid txs (less secure). light clients can rely on full nodes sending them a fraud proof if a block contains a invalid tx.

* **the data availability problem:**
- in order to a full node to generate a fraud proof for a block, they need to know the tx data for that block. if a block producer just publishes the block header, but not the tx data, then full nodes won't be able to check if the txs are valid and generate fraud proofs.
- it's a requirement that block producers must publish all the data for the blocks, but this needs to be enforced.
- to solve this problem, there need to be a way for light clients to check that the tx data for a block was actually published to the network so full nodes can check it.


#### tries


<br>

---

#### light clients
### in this dir

<br>

* light clients receive the block headers which contain a merkle root (more on this later) that can be used to query full nodes to verify if a transaction is included in a particular block.
* **[ethereum blockchain](ethereum.md)**
* **[solana blockchain](solana.md)**


<br>
Expand All @@ -26,6 +47,14 @@

<br>

* [geth code for stateDB](https://github.com/ethereum/go-ethereum/blob/d4d288e3f1cebb183fce9137829a76ddf7c6d12a/core/state/statedb.go#L64)
* [understanding trie databases, by d. brickwood](https://medium.com/shyft-network/understanding-trie-databases-in-ethereum-9f03d2c3325d)

* **[ef's ethereum protocol wiki](https://epf.wiki/#/)**
* **[celestia's namespaced merkle tree](https://github.com/celestiaorg/nmt)**
* **[jellyfish merkle tree, by z. gao et al](https://developers.diem.com/papers/jellyfish-merkle-tree/2021-01-14.pdf?ref=127.0.0.1)**
* **[leaves of hash, by trail of bits](https://blog.trailofbits.com/2019/06/17/leaves-of-hash/)**
* **[how merkle trees work, by consensys](https://media.consensys.net/ever-wonder-how-merkle-trees-work-c2f8b7100ed3)**
* **[neo-cypherpunk toolkit, by go outside labs](https://github.com/go-outside-labs/neo-cypherpunk-toolkit)**
* **[bitcoin memory pool](https://www.blockchain.com/explorer/mempool/btc)**
* **[a survey of execution client diversity, from ethstaker](https://paragraph.xyz/@ethstaker/execution-client-diversity)**
* **[on a rusty sparse merkle tree experiment, by mia stein](https://mirror.xyz/go-outside.eth/zX1BaGZLHAcQOKdhFnSSM0VW67_-OFCi5ZegGFPryvg)**
* **[on uploading your soul to the interplanetary sys, by mia stein](https://mirror.xyz/go-outside.eth/A3iJGhXTJI5fgQoZVgIu3ovPV1P8zrxigpwngm0n4I0)**
* **[ethereum transaction visualizer](https://github.com/naddison36/tx2uml)**
41 changes: 41 additions & 0 deletions blockchains/ethereum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## ethereum blockchain

<br>

#### evm execution

* in native execution, evm will load the bytecode and execute the opcodes in the bytecodes one by one from the beginning.
* each opcode can be thought as doing the following steps:
1. read elements from stack, memory, or storage.
2. perform some computation on these elements.
3. write back results to stack, memory, or storage.


<br>


#### light clients


* light clients receive the block headers, which contain a merkle root (more on this later) that can be used to query full nodes to verify if a transaction is included in a particular block.


<br>

#### ethereum roadmap

<br>

<img width="600" src="https://user-images.githubusercontent.com/1130416/234419153-76ab9f89-00e8-48e7-93c4-c8d880ec2007.png">


<br>

----

### external resources

<br>

* [geth code for stateDB](https://github.com/ethereum/go-ethereum/blob/d4d288e3f1cebb183fce9137829a76ddf7c6d12a/core/state/statedb.go#L64)
* [understanding trie databases, by d. brickwood](https://medium.com/shyft-network/understanding-trie-databases-in-ethereum-9f03d2c3325d)
5 changes: 5 additions & 0 deletions blockchains/solana.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## solana blockchain

<br>

* **[solana handbook, by ackee](https://ackeeblockchain.com/solana-handbook.pdf)**
17 changes: 17 additions & 0 deletions consensus_protocols/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## consensus protocols

<br>

* **[ethereum](ethereum)**
* **[snowman](snowman)**
* **[tendermint](tendermint)**
* **[mechanisms](mechanisms)**
* **[decentralized sequencers](decentralized_sequencers)**

<br>

---

### references

* **[shared sequencing, by expresso](https://hackmd.io/@EspressoSystems/SharedSequencing)**
21 changes: 21 additions & 0 deletions consensus_protocols/decentralized_sequencers/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## tl; dr

<br>

![](https://github.com/go-outside-labs/decentralized-protocols-research/assets/138340846/1e892bc0-a2a5-4064-b5dc-a321c13e1b87)


<br>

---

### resources

<br>


* **[espresso systems](https://docs.espressosys.com/sequencer/espresso-sequencer-architecture/readme)**
* **[shared sequencers, by bridge harris](https://bridgeharris.substack.com/p/a-primer-on-shared-sequencers)**
* **[shared sequencers, by maven11](https://maven11.substack.com/p/the-shared-sequencer)**
* **[shared sequencers, dba](https://dba.mirror.xyz/NTg5FSq1o_YiL_KJrKBOsOkyeiNUPobvZUrLBGceagg)**
* **[shared sequencers, by celestia](https://forum.celestia.org/t/sharing-a-sequencer-set-by-separating-execution-from-aggregation/702)**
47 changes: 47 additions & 0 deletions consensus_protocols/ethereum/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
## 🛵 consensus protocols

<br>

#### proposer-builder separation

* [seeing like a protocol](https://barnabe.substack.com/p/seeing-like-a-protocol)
- barnabe delights us with an overview of this mind thinking about protocols mev.

* [notes on pbs, by barnabe.eth](https://barnabe.substack.com/p/pbs)
- thoughts on in-protocol pbs, market structure and allocation mechanism, whole vs. partial block building, block vs. slot auctions, inclusion lists, capturing true pbs value via consensus bid and protocol capture.

* [decentralizing the builder role, by j. charbonneau](https://joncharbonneau.substack.com/p/decentralizing-the-builder-role)

* [exploring cryptokitties midwives](https://medium.com/block-science/exploring-cryptokitties-part-2-the-cryptomidwives-a0df37eb35a6)
- `giveBirth()` as an example of flawed economic incentive and randomization.

* [bookmark list for consensus researchers, by a. obadia](https://collective.flashbots.net/t/bookmarks-relevant-for-consensus-researchers/1204)
- nice list from flashbots on canonical papers on consensus


<br>

#### eip-1559

* [transaction fee mechanism design for ethereum, by tim roughgarden](https://timroughgarden.org/papers/eip1559.pdf)
- thoughts on how eip-1559 proposes a major change to ethereum's transaction fee mechanism, the market for ethereum transactions, incentive-compatible transaction fee mechanisms, and alternative designs.

* [congestion control and eip1559, by barnabe.eth](https://barnabe.substack.com/p/congestion-control-and-eip1559)
* [understanding fees in eip-1559](https://barnabe.substack.com/p/understanding-fees-in-eip1559)
* [mev and eip1559](https://github.com/MEV-WAIFU-LABS/mev/blob/main/MEV_on_Ethereum/eip-1559.md)

<br>

#### mev-smoothing

* [burning mev through block proposer auctions, by domothy](https://ethresear.ch/t/burning-mev-through-block-proposer-auctions/14029)




<br>

#### inclusion lists

* [inclusion list economics](https://efdn.notion.site/Inclusion-list-economics-b0d61d0e21a74963a54448e48d9adc8a)

5 changes: 5 additions & 0 deletions consensus_protocols/mechanisms/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## protocol mechanisms

<br>

* **[leader election](leader_election.pdf)**
Binary file not shown.
1 change: 1 addition & 0 deletions consensus_protocols/snowman/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## snowman
28 changes: 28 additions & 0 deletions consensus_protocols/tendermint/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## tendermint

<br>

* consensus protocol for ordering events in a distributed network under adversarial conditions (aka byzantine fault tolerant consenus, or atomic broadcast).
* tendermint consists of two technical components: a blockchain consensus engine and a generic application interface, and works even if up to 1/3 of machines fail in arbitrary ways.
* tendermint core (the consensus engine) performs BFT state machine replication (SMR) for arbitrary deterministic, finite state machines.
* the application interface (abci) enables the transactions to be processed in any programming language.

<br>
<br>

<p align="center">
<img src="https://github.com/go-outside-labs/decentralized-protocols-research/assets/138340846/fbb43593-d1d0-4efe-ae7e-80d880333a60" width="60%" align="center" style="padding:1px;border:1px solid black;" title="Jan 7th"/>
</p>


<br>
<br>

---

### references


* **[tendermint docs](https://docs.tendermint.com/)**
* **[tenderming abci](https://github.com/tendermint/tendermint/tree/v0.34.x/abci)**
* **[the latest gossip on BFT consensus, e. buchman et al.](https://arxiv.org/abs/1807.04938)**
46 changes: 46 additions & 0 deletions cryptography/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
## applied cryptography

<br>


#### zkps

* **[check the autism-symposium's zero-knowledge-proofs repo](https://github.com/autistic-symposium/zero-knowledge-proofs-toolkit)**

<br>

#### math

* **[pairing-friendly elliptic curves of prime order](https://eprint.iacr.org/2005/133.pdf)**
* **[intro to differential power analysis](https://link.springer.com/content/pdf/10.1007/s13389-011-0006-y.pdf)**
* **[the 12 commandments of synchronization](https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.227.3871&rep=rep1&type=pdf)**
* **[ring confidential transactions](https://eprint.iacr.org/2015/1098.pdf)**
* **[galois fields, part one](https://www.youtube.com/watch?v=yBVqk4YM2VY)**

<br>

#### authenticated data structures

* **[authenticated data structures as a library](https://bentnib.org/posts/2016-04-12-authenticated-data-structures-as-a-library.html)**
* **[authenticated data structures, generically](https://www.cs.umd.edu/~mwh/papers/gpads.pdf)**
* **[optimizing sparse merkle trees](https://ethresear.ch/t/optimizing-sparse-merkle-trees/3751)**

<br>

#### pir

* **[on simple private information retrieval experiments](https://mirror.xyz/go-outside.eth/4G5bsqUkjLxhQ0M9so3f25o4cABwN--tC40N3jkReug)**

<br>

#### bls multisig

* **[bls multi-signatures with pub-key aggregation](https://crypto.stanford.edu/~dabo/pubs/papers/BLSmultisig.html)**

<br>

#### general

* **[how to leak a secret](https://people.csail.mit.edu/rivest/pubs/RST01.pdf)**
* **[bitcoin-monero cross-chain atomic swap](https://eprint.iacr.org/2020/1126.pdf)**
* **[atomic swaps between bitcoin and monero](https://arxiv.org/pdf/2101.12332.pdf)**
Loading

0 comments on commit fc59a65

Please sign in to comment.