智慧型合約

本頁使用了標題或全文手工轉換
維基百科,自由的百科全書

智慧型合約(英語:Smart contract)是一種智慧型協定,在區塊鏈內製定合約時使用,當中內含了程式碼函式 (Function),亦能與其他合約進行互動、做決策、儲存資料及傳送以太幣等功能。智慧型合約主力提供驗證及執行合約內所訂立的條件。[1]智慧型合約允許在沒有第三方的情況下進行可信交易。這些交易可追蹤且不可逆轉。[2]智慧型合約概念於1994年由一名身兼電腦科學家及密碼學專家的學者尼克·薩博首次提出。[3][4]

智慧型合約的目的是提供優於傳統合約方法的安全,並減少與合約相關的其他交易成本

安全問題[編輯]

智慧型合約是「執行合約條款的電腦交易協定」。[5] 區塊鏈上的所有使用者都可以看到基於區塊鏈的智慧型合約。但是,這會導致包括安全漏洞在內的所有漏洞都可見,並且可能無法迅速修復。[6]

這樣的攻擊難以迅速解決,例如,2016年6月The DAO英語The DAOEther的漏洞造成損失5000萬美元,而開發者試圖達成共識的解決方案。[7] DAO的程式在駭客刪除資金之前有一段時間的延遲。以太坊軟體的一個硬分叉在時限到期之前完成了攻擊者的資金回收工作。[8]

以太坊智慧型合約中的問題包括合約編程Solidity、編譯器錯誤、以太坊虛擬機器錯誤、對區塊鏈網路的攻擊、程式錯誤的不變性以及其他尚無文件記錄的攻擊。[9]

2018年4月22日, BeautyChain智慧型合約出現重大漏洞,駭客通過此漏洞無限生成代幣,導致 BitEclipse (BEC)的價值接近歸零。[10][11] 同月25日,SmartMesh出現疑似重大安全漏洞,宣佈暫停所有SMT交易和轉賬直至另行通知,導致損失約1.4億美金。[12] 28日,EOS被指可能存在BEC代幣合約類似的整數溢位漏洞,但沒訊息詳細説明。5月24日, BAI交易存在大量異常問題, 損失金額未知。 [13] 8月22日, GODGAME 合約被駭客入侵,GOD智慧型合約上的以太坊總數歸零。[14]

案例[編輯]

部署智慧型合約的案例有:

流行文化[編輯]

卡爾·施羅德英語Karl Schroeder的2002年小說《續航力英語Permanence (novel)》提出了一種「權利經濟」,其中所有的物理對象都有合同要求的奈米標記,這樣就可以對專有資訊的所有用途實施付款,例如,深空軍事任務必須不斷證明每艘船舶的效益比率否則將停止工作。

參考資料[編輯]

  1. ^ Schueffel, Patrick; Groeneweg, Nikolaj; Baldegger, Rico. The Crypto Encyclopedia: Coins, Tokens and Digital Assets from A to Z. Bern, 瑞士: Growth Publisher. 2019 [2020-02-18]. (原始內容存檔於2020-05-29). 
  2. ^ Smart Contracts, Explained. Cointelegraph. 2017-10-31 [2018-01-21]. (原始內容存檔於2018-01-21). 
  3. ^ 陳 恭. 智能合約的發展與應用 (PDF). [2019-02-20]. (原始內容存檔 (PDF)於2019-02-20). 
  4. ^ Nick Szabo -- Smart Contracts: Building Blocks for Digital Markets. www.fon.hum.uva.nl. [2017-07-29]. (原始內容存檔於2018-04-27). 
  5. ^ Tapscott, Don; Tapscott, Alex. The Blockchain Revolution: How the Technology Behind Bitcoin is Changing Money, Business, and the World. May 2016: 72, 83, 101, 127. ISBN 978-0670069972. 
  6. ^ Peck, M. Ethereum’s $150-Million Blockchain-Powered Fund Opens Just as Researchers Call For a Halt. IEEE Spectrum. Institute of Electrical and Electronics Engineers. 2016-05-28 [2018-01-21]. (原始內容存檔於2016-05-30). 
  7. ^ DuPont, Quinn. Experiments in Algorithmic Governance: A history and ethnography of “The DAO,” a failed Decentralized Autonomous Organization (PDF). 2017 [2017-07-29]. (原始內容 (PDF)存檔於2017-07-30). 
  8. ^ Coy, Peter; Kharif, Olga. This Is Your Company on Blockchain. Bloomberg Businessweek. 2016-08-25 [2016-12-05]. (原始內容存檔於2016-09-14). 
  9. ^ 9.0 9.1 Atzei, Nicola; Bartoletti, Massimo; Cimoli, Tiziana, A survey of attacks on Ethereum smart contracts (PDF), 6th International Conference on Principles of Security and Trust (POST), European Joint Conferences on Theory and Practice of Software, 2017 [2018-01-21], (原始內容存檔 (PDF)於2017-07-10) 
  10. ^ Yuan, Michael. Building a safer crypto token. CyberMiles. 2018-04-25 [2019-02-11]. (原始內容存檔於2019-01-25). 
  11. ^ De, Nikhilesh. Crypto Exchanges Pause Services Over Contract Bugs. CoinDesk. 2018-04-25 [2019-02-11]. (原始內容存檔於2019-01-25) (美國英語). 
  12. ^ SMT Security Update. SmartMesh. 2018-04-26 [2019-02-11]. (原始內容存檔於2019-01-25) (美國英語). 
  13. ^ Abnormal BAI Trading Activities(2018-05-24 ). KKcoin. [2019-02-13]. (原始內容存檔於2019-02-13) (美國英語). 
  14. ^ 游戏平台God.Game称遭黑客攻击,智能合约中以太坊总量归零. bcsec.org. [2019-02-19]. (原始內容存檔於2019-02-19). 
  15. ^ Vitalik Buterin on Tweeter (verified). 2017-04-18. (原始內容存檔於2017-12-11). 
  16. ^ RSK – Rootstock Open-Source Smart Contract Bitcoin Technology?. [2018-01-21]. (原始內容存檔於2017-10-19). 
  17. ^ Digrate Express rating report on Project Rootstock (PDF). [2018-01-21]. (原始內容 (PDF)存檔於2017-10-20). 
  18. ^ Thomas Bocek. Digital Marketplaces Unleashed. Springer-Verlag GmbH. 2017-09-15: 169-184 [2018-01-21]. ISBN 978-3-662-49274-1. (原始內容存檔於2017-10-20). 
  19. ^ A Solution for the Problems of Translation and Transparency in Smart Contracts (PDF). [2018-01-21]. (原始內容存檔 (PDF)於2017-10-20). 
  20. ^ Trust in Smart Contracts is a Process, As Well (PDF). [2018-01-21]. (原始內容存檔 (PDF)於2018-04-03). 
  21. ^ Scripting smart contracts for distributed ledger technology (PDF). [2018-01-21]. (原始內容存檔 (PDF)於2017-10-20). 
  22. ^ He X, Qin B, Zhu Y; et al. Spesc: A specification language for smart contracts. 2018 IEEE 42nd Annual computer software and applications conference (COMPSAC). IEEE, 2018, 1: 132-137. 
  23. ^ Chinese Institute of Electronics, Formal Expression of Blockchain Smart Contract, group standard. Formal Expression of Blockchain Smart Contract (PDF) T/CIE 095-2020. [失效連結]

參見[編輯]

外部連結[編輯]