<!-- .slide: data-background="https://upload.cc/i1/2022/10/24/Zacl5b.png"--> <style> .small {font-size: 24px;} .medium {font-size: 30px;} .hl {color: #fcba03;} </style> # Bitcoin Oridinals # BRC20 --- # Agenda - How Ordinals NFTs Work - Where and How to inscribe (Inscriptions) - BRC20 - 其他衍生協議 - 總結 --- ## Ordinals - <span class="medium">總共有 21,000,000 顆BTC</span> - <span class="medium">1顆 BTC 可分成最小單位 100,000,000 Satoshi (聰 SAT)</span> - <span class="medium">Ordinal Theory Rarity</span> -- <span class="medium">common: Any sat that is not the first sat of its block</span> -- <span class="medium">uncommon: The first sat of each block</span> -- <span class="medium">rare: The first sat of each difficulty adjustment period</span> -- <span class="medium">epic: The first sat of each halving epoch</span> -- <span class="medium">legendary: The first sat of each cycle (6 halving)</span> -- <span class="medium">mythic: The first sat of the genesis block</span> <span class="small">Ref: [Ordinal Theory Handbook](https://docs.ordinals.com/overview.html)</span> --- ## UTXO ![](https://hackmd.io/_uploads/HymRadJL2.png) --- ## UTXO Coinbase ![](https://hackmd.io/_uploads/B1V8CuJI2.png =400x) - Coinbase Transaction: -- special tx -- no input and one or more outputs -- rewards + gas fee [Bitcoin Exploer](https://www.blockchain.com/explorer/blocks/btc/) --- ## Where to inscribe - 從2017年 SegWit 升級 (BIP141) 後,Witness data 從交易數據中分離出來 - SegWit升級後,Transaction size (body + witness) 最大是 4MB - 錢包地址開頭為 bc1q ![](https://hackmd.io/_uploads/Hk_rWF1I2.png =600x) --- ## How to inscribe - 從2021年 Taproot 升級後 (BIP342),可以在bitcoin上寫智能合約(tapscript) - 錢包地址開頭為 bc1p ```bash! OP_FALSE OP_IF OP_PUSH "ord" OP_1 OP_PUSH "text/plain;charset=utf-8" OP_0 OP_PUSH "Hello, world!" OP_ENDIF ``` <span class="small">Ref: [Ordinal Theory Handbook](https://docs.ordinals.com/inscriptions.html)</span> --- ## Witness brc20 example - $ORDI [deploy] -- [blockchain explorer](https://www.blockchain.com/explorer/transactions/btc/b61b0172d95e266c18aea0c624db987e971a5d6d4ebc2aaed85da4642d635735) -- [unisat](https://unisat.io/inscription/b61b0172d95e266c18aea0c624db987e971a5d6d4ebc2aaed85da4642d635735i0) - $ORDI [mint] -- [blockchain explorer](https://www.blockchain.com/explorer/transactions/btc/85defa9d5eabcd4694a69d1194324e305c6a541d569835fc609f1e0f736dde11) -- [ordinals](https://ordinals.com/tx/85defa9d5eabcd4694a69d1194324e305c6a541d569835fc609f1e0f736dde11) --- ## Ordinals Dune 統計 ![](https://hackmd.io/_uploads/BJE7siyU3.png =600x) <span class="medium">Ref: https://dune.com/cryptokoryo/brc20</span> --- ### BRC-20 起源 <a href="https://twitter.com/domodata/status/1633658974686855168">![](https://hackmd.io/_uploads/HJOOec0N3.png =450x)</a> <span class="medium">[brc-20-experiment](https://domo-2.gitbook.io/brc-20-experiment/)</span> --- ## BRC-20 operation - deploy, mint, transfer ![](https://hackmd.io/_uploads/HytT2jyU3.png) --- ## ORC-20 ![](https://hackmd.io/_uploads/H1N8HfgU2.png) <span class="small">https://docs.orc20.org/</span> --- ## ORC-20 ![](https://hackmd.io/_uploads/SJZFrMgU2.png =800x) --- ### BRC-21 <a href="https://twitter.com/alexeiZamyatin/status/1655178428180492289">![](https://hackmd.io/_uploads/Bk_-A56En.png =450x)</a> <span class="small">[BRC-21 Token Standard](https://interlay-labs.gitbook.io/brc-21/)</span> --- ## 總結 - 在 bitcoin 的 witness 寫 inscription 而創造 brc-20 token - bitcoin 的智能合約 tapscript 受限,無法使用合約交互得知各個地址brc-20目前狀態 - 依賴於中心化的 indexer 解析 inscription 數據而拆分出brc-20狀態 - 因 bitcoin 網路出塊時間約10分鐘,而brc-20的Transfer需兩步驟,導致UX很差 --- ## Reference - https://medium.portto.com/dive-into-how-bitcoin-ordinals-nfts-work-ca5634da73d - https://domo-2.gitbook.io/brc-20-experiment/ - https://unisat.io/ - https://thebitcoinmanual.com/articles/btc-ordinal-explorer/ --- # Q & A --- ## Bitcoin Unlock / Locking Script ![](https://hackmd.io/_uploads/Hk3a-FkL3.png) --- ### Bitcoin address type - Legacy (P2PKH) 開頭為 1 -- 傳統地址 -- <span class="hl">1</span>5e15hWo6CShMgbAfo8c2Ykj4C6BLq6Not - P2SH 開頭為 3 -- 支援多簽 -- <span class="hl">3</span>5PBEaofpUeH8VnnNSorM1QZsadrZoQp4N --- ### Bitcoin address type - SegWit、bech32 (P2WPKH) 開頭為 bc1q -- 交易跟簽名分離 -- 允許 3MB 簽名數據和 1MB 的交易數據 -- <span class="medium"><span class="hl">bc1q</span>42lja79elem0anu8q8s3h2n687re9jax556pcc</span> - Taproot (P2TP) 開頭為 bc1p -- Schnorr簽章 (BIP340) -- Taproot (BIP341) -- Tapscript (BIP342) -- <span class="medium"><span class="hl">bc1p</span>mzfrwwndsqmk5yh69yjr5lfgfg4ev8c0tsc06e</span> --- ## Bitcoin address type ![](https://hackmd.io/_uploads/By1l70JS3.png) ![](https://hackmd.io/_uploads/HJm0zCySh.png) <span class="medium">Reference: https://dune.com/queries/1883950/3103481</span> --- ### Bitcoin UTXO ![](https://hackmd.io/_uploads/r1KA3hlBn.png =700x) Example: - <span class="medium">[2 input => 1 output](https://blockstream.info/tx/d99a97db36c665ae9c070fe604c2bcb62b43e79791752380b527cf72c26411d7)</span> - <span class="medium">[1 input => n output](https://blockstream.info/tx/dea2e11bea2e6e47988c72965d83376b60b90b62afdfb98769216ab69f8ff13b)</span> <span class="medium">Ref: https://ithelp.ithome.com.tw/articles/10216976</span>
{"metaMigratedAt":"2023-06-18T06:15:42.554Z","metaMigratedFrom":"YAML","title":"Bitcoin Oridinals","breaks":true,"contributors":"[{\"id\":\"9ef7cf5b-bb4a-4e8b-a4ec-3decd4deef26\",\"add\":5227,\"del\":0}]"}
    389 views