Solidity

分佈式智能合約的基本問題

  • August 25, 2017

分佈式智能合約的基本問題。讓我們假設,我正在編寫一個智能合約並將其部署在公共網路中。

My Contract Specification
•   My contract would allow anyone to register. 
•   Fund 10 Ether to the contract 
•   Contract will in turn return 12 Ether on Dec 31st 2017

契約所有者錯誤地沒有將其限制在 12 月 31 日,而是在契約中提到了 1 月 31 日。

設想 :

•   Owner A sits in USA, deploys the contract in public chain 
•   User B from Australia funds 10 ether to the contract on August 31st, 2017
•   User B now expects 12 Ether on Dec 31st but he never receives it .

問題

Even though the contract is distributed among all the nodes, 
1.  How would user B come to know what is written in the contract ( assuming B has zero coding knowledge) ?
2.  If only User B is interested in this contract, who will verify this smart contract 

一旦部署在乙太坊上的智能合約是公開的,可以查看。人們必須通過查看智能合約來了解他們正在註冊的內容(沒有其他出路)。

如果我是使用者 B,我會向使用者 A 請求契約的原始碼,並且驗證生成的字節碼與原始碼匹配所需的所有指令。如果我對智能合約一無所知,我應該向了解它們的人尋求幫助。

就像現實生活中發生的那樣,如果您想簽訂契約,您可以讓您信任的人對其進行審查。這顯然取決於契約,對於更嚴肅的契約,您可能想要專業人士,對於更簡單的契約,您可以在網際網路上詢問。

引用自:https://ethereum.stackexchange.com/questions/25043